Bug 42380 - FOP chokes on jar-embedded class path
Summary: FOP chokes on jar-embedded class path
Status: NEW
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: general (show other bugs)
Version: 0.93
Hardware: Other other
: P3 normal
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-10 06:42 UTC by Henning Schmiedehausen
Modified: 2012-04-07 01:51 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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