(Comments inline...) On 04.04.2006 11:08:20 Asbjørn Reglund Thorsen wrote: > I can't get the barcode4j plugin to work with FOP. When I use > barcode4j-1.0 and fop-0.91beta I get this error message: > > Exception in thread "main" java.lang.IncompatibleClassChangeError:
That is to be expected. The extension infrastructure in FOP 0.91beta is different (and more advanced) than the one from FOP 0.20.5 so the old FOP extension for 0.20.5 don't work for 0.91 anymore. I've written a new FOP extension for 0.91 and later. It's not released, yet, but you can build it yourself if you download the Barcode4J sources from SourceForge's CVS. To build the new FOP extension place a file called "build-local.properties" in the root directory of the Barcode4J checkout and place the following line there: fop.home=<path to FOP 0.91beta or FOP Trunk> > Implementing class > at java.lang.ClassLoader.defineClass0(Native Method) > at java.lang.ClassLoader.defineClass(ClassLoader.java:509) > at > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) > at java.net.URLClassLoader.defineClass(URLClassLoader.java:246) > at java.net.URLClassLoader.access$100(URLClassLoader.java:54) > at java.net.URLClassLoader$1.run(URLClassLoader.java:193) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:186) > at java.lang.ClassLoader.loadClass(ClassLoader.java:306) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265) > at java.lang.ClassLoader.loadClass(ClassLoader.java:262) > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:322) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Class.java:130) > at > org.apache.fop.fo.FOTreeBuilder.addElementMapping(FOTreeBuilder.java:164) > at > org.apache.fop.fo.FOTreeBuilder.setupDefaultMappings(FOTreeBuilder.java:146) > at org.apache.fop.fo.FOTreeBuilder.<init>(FOTreeBuilder.java:117) > at org.apache.fop.apps.Fop.getDefaultHandler(Fop.java:116) > at org.apache.fop.cli.InputHandler.render(InputHandler.java:99) > at org.apache.fop.cli.Main.startFOP(Main.java:167) > at org.apache.fop.cli.Main.main(Main.java:200) > make: *** [pdf] Error 1 > > When I use barcode4j-1.0 and fop-0.20.5 I get this error msg: > > xsltproc --output tilbud.fo tilbud.xsl tilbud.xml > compilation error: file tilbud.xsl line 43 element barcode > Namespaces prefix barcode used for multiple namespaces That should have been your clue. You've defined the "barcode" namespace prefix twice, once for the Saxon extension and once further down for the FOP extension. Remove the declaration for the Saxon extension if you use the FOP extension. > runtime error: file tilbud.xsl line 43 element barcode > xsltApplyOneTemplate: failed to find extension barcode > error: file tilbud.xml > xsltRunStylesheet : run failed > make: *** [pdf] Error 9 > > I get the same error for each of: > CLASSPATH=/site/software/barcode4j-1.0/build/barcode4j-fop-ext-0.20.5-complete.jar:$CLASSPATH > > > CLASSPATH=/site/software/barcode4j-1.0/build/barcode4j.jar:/site/software/barcode4j-1.0/build/barcode4j-fop-ext-0.20.5.jar:$CLASSPATH > > > and > CLASSPATH=/site/software/barcode4j-1.0/build/barcode4j-light.jar:$CLASSPATH > > Can anyone tell me what's wrong ? It's not anything with the classpath, but something in your stylesheet as the "compilation error" (coming from the XSLT processor) indicates. > Apache Avalon has closed. Is there a substitute that I can use ? Or is > it possible to generate barcodes without that framework ? Apache Excalibur has taken over Avalon Framework. You don't need to bother with that since FOP itself uses Avalon Framework. It is possible to generate barcodes without Avalon Framework but in the FOP environment, Avalon Framework is automatically used. > I have attached the xsl-file. > > -- > Asbjørn Thorsen > > "HAKONA MATATA" ;-) > Jeremias Maerki --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]