xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremias Maerki <...@jeremias-maerki.ch>
Subject Re: barcode4j JAR-files unavailable after export from Eclipse
Date Mon, 23 Mar 2009 06:53:35 GMT
On 23.03.2009 07:41:00 Frank Niedermann wrote:
> Hi Jeremias,
> yes you are right, fop.jar and the Barcode4J JAR-file are both
> merged into one JAR-file. What's so bad about this idea?

Exactly the additional work necessary to make this work. And when you
want to upgrade, the same story all over again instead of just replacing
a JAR. But it's up to you.

> I would like to deploy the application to some users, and instead of
> telling them to add some JAR-files to the classpath I would like them
> to be able to just start one JAR-file which contains everything.
> Reason for that is, that most users don't know how to handle JAR-
> files and classpath settings ...
> So I followed your advise and merged the XMLHandler file in the
> JAR created by Eclipse, but I still get the same error messages.
> Am I missing something else? 

No, that should be it. But I can't tell from what I'm seeing if you made
any other mistake along the way. If the error message still occurs
there's still a problem with either the registration or the presence of
the extension in the class path hierarchy. The only thing you can do now
is setting breakpoints in org.apache.xmlgraphics.util.Service and
org.apache.fop.render.XMLHandlerRegistry. You can also enable log level
DEBUG on org.apache.fop.render.XMLHandlerRegistry which should tell you
which extension classes were actually registered.

> This is the content of the file now:
> org.krysalis.barcode4j.fop.BarcodeXMLHandler
> org.apache.fop.render.pdf.PDFSVGHandler
> org.apache.fop.render.ps.PSSVGHandler
> org.apache.fop.render.java2d.Java2DSVGHandler
> org.apache.fop.render.pcl.PCLSVGHandler
> org.apache.fop.render.afp.AFPSVGHandler
> Thanks,
>   Frank
> Jeremias Maerki-2 wrote:
> > 
> > I don't use Eclipse's export JAR feature so I can't tell if Eclipse does
> > something wrong. But the error indicates that the XMLHandler for
> > Barcode4J isn't registered. If I understand you correctly fop.jar and
> > the JAR with the Barcode4J extension are combined in the same JAR file.
> > Right? In that case, the error is almost certainly due to a not properly
> > merged META-INF/services/org.apache.fop.render.XMLHandler file. The one
> > from fop.jar is probably taking precedence and the one from the
> > Barcode4J JAR is discarded.
> > 
> > If you want to properly merge those JARs (which I find a bad idea in the
> > first place), you have to properly merge all files from the
> > META-INF/services directory (so all entries from all JARs are combined).
> > 
> > The mechanism we're using here is part of the JAR specification:
> > http://java.sun.com/j2se/1.4.2/docs/guide/jar/jar.html#Service%20Provider
> > 
> -- 
> View this message in context: http://www.nabble.com/barcode4j-JAR-files-unavailable-after-export-from-Eclipse-tp22553317p22654975.html
> Sent from the FOP - Users mailing list archive at Nabble.com.

Jeremias Maerki

To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org

View raw message