From: Jeremias M. <de...@je...> - 2011-12-22 14:21:23
|
Hi Frank That would be barcode4J-fop-ext-0.20.5-complete.jar if you're using FOP 0.20.5. You mentioned that JAR earlier so you probably have it around somewhere already. But apparently it doesn't seem to be picked up. The errors you get are a clear indication that the barcode extension is not available in the classpath somehow. "No handler defined for..." means that a plug-in for a particular namespace is not available. Now, I guess, you'll have to look into how Cocoon builds up its classpath. On 22.12.2011 15:11:44 Frank Daly wrote: > Hi Jeremies, > > Thanks for your reply. I found the log and the error messages, see > below. > > ERROR (2011-12-22) 10:35.38:657 [sitemap.serializer.fo2pdf.fop] > (/clients/barcode) http-80-2/FOTreeBuilder: Unsupported element > encountered: barcode (Namespace: http://barcode4j.krysalis.org/ns). > Source context: unavailable > ERROR (2011-12-22) 10:35.38:657 [sitemap.serializer.fo2pdf.fop] > (/clients /barcode) http-80-2/FOTreeBuilder: Expected XSL-FO (root, > page-sequence, etc.), SVG (svg, rect, etc.) or elements from another > supported language. > ERROR (2011-12-22) 10:35.38:658 [sitemap.serializer.fo2pdf.fop] > (/clients /barcode) http-80-2/FOTreeBuilder: Unsupported element > encountered: code128 (Namespace: http://barcode4j.krysalis.org/ns). > Source context: unavailable > ERROR (2011-12-22) 10:35.38:659 [sitemap.serializer.fo2pdf.fop] > (/clients /barcode) http-80-2/FOTreeBuilder: Unsupported element > encountered: height (Namespace: http://barcode4j.krysalis.org/ns). > Source context: unavailable > INFO (2011-12-22) 10:35.38:664 [sitemap.serializer.fo2pdf.fop] > (/clients /barcode) http-80-2/PageSequence: [1] > ERROR (2011-12-22) 10:35.38:679 [sitemap.serializer.fo2pdf.fop] > (/clients /barcode) http-80-2/UnknownXMLObj: no handler defined for > http://barcode4j.krysalis.org/ns:barcode foreign xml > > The error messages point to the fact that the namespace > http://barcode4j.krysalis.org can't be located; what jar file must I > include in the class path to pick this up? > > Thanks, > > Frank > > -----Original Message----- > From: Jeremias Maerki [mailto:de...@je...] > Sent: 21 December 2011 12:14 > To: bar...@li... > Subject: Re: [Barcode4j-users] Barcode4J with Cocoon > > Hi Frank > > No error message seems weird. When Barcode4J isn't in the classpath, FOP > usually complains that it cannot interpret the Barcode4J namespace. If > there was classpath interference, I'd expect something like a > ClassDefNotFoundError or a NoSuchMethodError. May I suggest to take a > closer look at the logs. FOP logs through Apache Commons Logging and I > don't know what Cocoon uses, so maybe FOP logs end up somewhere you > don't expect it. Sorry not to be more of a help. Good luck! > > On 20.12.2011 17:31:03 Frank Daly wrote: > > Hi Jeremias, > > > > Many thanks for your reply and hope you had a great holiday. In the > > Cocoon application - I get no error message, just no barcode appears. > > > I suppose I was wondering if any of the cocoon jar files could be > > interfering with the jars in the class path. However as you say you > > are no Cocoon expert so perhaps I should just persevere or direct this > > > query elsewhere. > > > > Best regards, > > > > Frank > > > > -----Original Message----- > > From: Jeremias Maerki [mailto:de...@je...] > > Sent: 19 December 2011 15:21 > > To: bar...@li... > > Subject: Re: [Barcode4j-users] Barcode4J with Cocoon > > > > Hi Frank > > > > Sorry for the late reponse. I've been on a 3 week holiday. > > > > Your example works fine from the command-line so your stylesheet can't > > > be the problem. Unfortunately, you don't say what exactly your problem > > > is. So, I'm at a loss on how to help you any further. I'm also no > > specialist on Cocoon. > > > > On 08.12.2011 12:29:57 Frank Daly wrote: > > > Hi, > > > > > > > > > > > > I've got Barcode4J working from the command line but am having > > > difficulty getting it to work in Cocoon. The version of FOP that > > > I'm using is 0.25.5 so I've added barcode4J.jar, > > > barcode4J-fop-ext-0.20.5-complete.jar and the Avalon Framework jar > > > file to the classpath. Would someone mind looking at the files > > > below and tell me what I need to do to get the barcode to appear. > > > > > > > > > > > > Thanks, > > > > > > > > > > > > Frank > > > > > > > > > > > > Below is my xml file > > > > > > > > > > > > <?xml version="1.0"?> > > > > > > <example> > > > > > > <heading>Hello, barcode world!</heading> > > > > > > <barcode>123456789012</barcode> > > > > > > </example> > > > > > > > > > > > > And here is my stylesheet > > > > > > > > > > > > <?xml version="1.0"?> > > > > > > <xsl:stylesheet > > > > > > version="2.0" > > > > > > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > > > > > > xmlns:fo="http://www.w3.org/1999/XSL/Format" > > > > > > xmlns:barcode="http://barcode4j.krysalis.org/ns"> > > > > > > <xsl:template match="example"> > > > > > > <fo:root> > > > > > > <fo:layout-master-set> > > > > > > <fo:simple-page-master > > > > > > master-name="page"> > > > > > > <fo:region-body > > > > > > margin-top="0.5in" > > > > > > margin-bottom="1in" > > > > > > margin-left="0.5in" > > > > > > margin-right="0.5in" > > > > > > /> > > > > > > </fo:simple-page-master> > > > > > > </fo:layout-master-set> > > > > > > <fo:page-sequence master-reference="page"> > > > > > > <fo:flow flow-name="xsl-region-body"> > > > > > > > > > > > > <fo:block> > > > > > > <xsl:value-of select="heading"/> <xsl:value-of select="barcode"/> > > > > > > </fo:block> > > > > > > <fo:block> > > > > > > into block > > > > > > > > > > > > <fo:instream-foreign-object> > > > > > > <barcode:barcode > > > > > > > > > > > > message="my message"> > > > > > > <barcode:code128> > > > > > > <barcode:height>8mm</barcode:height> > > > > > > </barcode:code128> > > > > > > </barcode:barcode> > > > > > > </fo:instream-foreign-object> > > > > > > > > > > > > </fo:block> > > > > > > </fo:flow> > > > > > > </fo:page-sequence> > > > > > > </fo:root> > > > > > > </xsl:template> > > > > > > > > > > > > </xsl:stylesheet> > > > > > > > > > > > > > > > > > > > Jeremias Maerki > > > > > > ---------------------------------------------------------------------- > > -------- > > Write once. Port to many. > > Get the SDK and tools to simplify cross-platform app development. > > Create new or port existing apps to sell to consumers worldwide. > > Explore the Intel AppUpSM program developer opportunity. > > appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev > > _______________________________________________ > > Barcode4j-users mailing list > > Bar...@li... > > https://lists.sourceforge.net/lists/listinfo/barcode4j-users > > > > > Jeremias Maerki > > > ------------------------------------------------------------------------------ > Write once. Port to many. > Get the SDK and tools to simplify cross-platform app development. Create > new or port existing apps to sell to consumers worldwide. Explore the > Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join > http://p.sf.net/sfu/intel-appdev > _______________________________________________ > Barcode4j-users mailing list > Bar...@li... > https://lists.sourceforge.net/lists/listinfo/barcode4j-users Jeremias Maerki |