PDA

View Full Version : JFreeReportListener and org.jfree.resourceloader



dhartford
09-05-2007, 02:48 PM
Hey all,
I got the following snippet from an error during the deploy of Pentaho 1.6.0-RC2-813 (both on Jboss 4.0.5.GA and 4.2.1.GA) as an EAR deployment from j2ee-deployment package of jboss-mysql-no-portal-ear:

==========
13:57:28,317 ERROR [Logger] misc-org.pentaho.core.system.PentahoSystem: PentahoSystem.ERROR_0014 - Error while trying to
execute startup sequence for org.pentaho.plugin.jfreereport.JFreeReportSystemListener
org.pentaho.core.system.PentahoSystemException: PentahoSystem.ERROR_0014 - Error while trying to execute startup sequenc
e for org.pentaho.plugin.jfreereport.JFreeReportSystemListener
.........
Caused by: java.lang.NoSuchMethodError: org.jfree.resourceloader.ResourceManager.deriveKey(Lorg/jfree/resourceloader/Res
ourceKey;Ljava/lang/String;)Lorg/jfree/resourceloader/ResourceKey;
at org.jfree.fonts.encoding.EncodingRegistry.registerDefaults(EncodingRegistry.java:155)
at org.jfree.fonts.encoding.EncodingRegistry.getInstance(EncodingRegistry.java:95)
at org.jfree.fonts.ByteAccessUtilities.readString(ByteAccessUtilities.java:157)
at org.jfree.fonts.truetype.NameTable$NameRecord.<init>(NameTable.java:69)
at org.jfree.fonts.truetype.NameTable.<init>(NameTable.java:157)
at org.jfree.fonts.truetype.TrueTypeFont.readTable(TrueTypeFont.java:318)
at org.jfree.fonts.truetype.TrueTypeFont.getTable(TrueTypeFont.java:298)
at org.jfree.fonts.truetype.TrueTypeFontRegistry.registerTrueTypeFont(TrueTypeFontRegistry.java:255)
at org.jfree.fonts.truetype.TrueTypeFontRegistry.addFont(TrueTypeFontRegistry.java:239)
at org.jfree.fonts.registry.AbstractFontFileRegistry.registerFontFile(AbstractFontFileRegistry.java:180)
at org.jfree.fonts.registry.AbstractFontFileRegistry.registerFontPath(AbstractFontFileRegistry.java:149)
at org.jfree.fonts.registry.AbstractFontFileRegistry.registerWindowsFontPath(AbstractFontFileRegistry.java:123)
at org.jfree.fonts.registry.AbstractFontFileRegistry.registerDefaultFontPath(AbstractFontFileRegistry.java:65)
at org.jfree.fonts.registry.AbstractFontFileRegistry.initialize(AbstractFontFileRegistry.java:28)
at org.jfree.report.modules.output.support.itext.BaseFontFactory.registerDefaultFontPath(BaseFontFactory.java:19
=========

In the EAR, I have the following pentaho reporting jars:

lib/jfreereport-0.8.8-01.jar
lib/jfreereport-ext-0.8.8-01.jar
lib/pentaho-reporting-engine-classic-0.8.9-pre10.jar
lib/pentaho-reporting-engine-classic-ext-0.8.9-pre10.jar

None have the org.jfree.resourceloader package. Where is this located?

Taqua
09-05-2007, 03:19 PM
Remove the jfreereport* jars. They are no longer needed. We renamed jfreereport to pentaho-reporting-classic with version 0.8.9. Then check for old versions of libfonts and libloader and remove them as well.

Seems you upgraded from an older version by simply copying the newer version of the platform over an older installation. You asked for it, now you got it: Welcome to the DLL-hell in Java-land :)

Have fun,
said Thomas

dhartford
09-05-2007, 04:02 PM
Thanks Thomas, you hit it right on.

The application.xml that is being deployed with J2ee-deployment dist (RC2-813) contains the old jars, making the classpath dirty.

<!--
<module>
<java>lib/jfreereport-0.8.8-01.jar</java>
</module>
<module>
<java>lib/jfreereport-ext-0.8.8-01.jar</java>
</module>
-->


<!--
<module>
<java>lib/libfonts-0.2.2.jar</java>
</module>
<module>
<java>lib/libformula-0.1.3.jar</java>
</module>
<module>
<java>lib/libloader-0.2.2.jar</java>
</module>
<module>
<java>lib/libxml-0.9.0.jar</java>
</module>
-->

Taqua
09-05-2007, 04:26 PM
The application.xml file is auto-generated from within ant. So ultimately it comes from the third-party/lib directory (which (I assume) get copied to the deployment directory, which then get used to generate that file).

At least the version from the SVN repository is clean and does not contain the jfreereport-jars anymore. If you work with a SVN version, then such obsolete files are usually caused by manual changes done to a previous version. If you only use release versions, then it is up to you to make sure that there are no old files. (And for a project like pentaho, with its numerous dependencies, this can be a tough job.)

Have fun,
said Thomas

dhartford
09-06-2007, 08:23 AM
That explains a lot -- been doing updates from SVN since RC1, but never 'cleaned' out those directories (no changes, but haven't done a full delete and replace from SVN).