Bug 42380

Summary: FOP chokes on jar-embedded class path
Product: Fop - Now in Jira Reporter: Henning Schmiedehausen <hps>
Component: generalAssignee: fop-dev
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 0.93   
Target Milestone: ---   
Hardware: Other   
OS: other   

Description Henning Schmiedehausen 2007-05-10 06:42:56 UTC
Here is a fun thing with fop:

I have an application that gets run from the command line (no app server). It
currently uses 'java -cp
jar1.har:jar2.jar:fop.jar:xmlgraphics-common.jar:batik.jar Mainclass' 

This works fine, the app loads and runs.

Now we decided to switch the application to be run directly from a jar using the
Class-Path: manifest attribute to execute. This means, that the Mainclass is now
in the main.jar and contains a manifest like this:

Main-Class: Mainclass
Class-Path: ../lib/jar1.jar ../lib/jar2.jar ../lib/fop.jar 
 ../lib/xmlgraphics-common.jar ../lib/fop.jar

The "../lib" is the relative path from the main.jar to the dependency libs. We
also index the jar and its classpath using the <indexjars> element of the ant
jar task.

Now the application can be run with "java -jar main.jar"

All this works well, the dependencies are found, etc. However, as soon as the
PDF should get rendered, it reports the dreaded 'don't know how to handle
application/pdf' exception.

It seems that the Service class inside xmlgraphics-commons is not able to load
its settings if an application is packaged in this way.
Comment 1 Glenn Adams 2012-04-07 01:42:17 UTC
resetting P2 open bugs to P3 pending further review