You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Shirsendu Sengupta <sh...@gmail.com> on 2005/02/11 05:45:07 UTC

Getting a runtime exception

Hi,

I am using the FOP-0.20.5 version in my code to generate the XML data
to PDF file. I am trying to run a servlet for the conversion
on-the-fly.
But I am getting a Runtime exception at the time I am instantiating
the Driver in the following way:

try {
   org.apache.fop.apps.Driver driver = new org.apache.fop.apps.Driver();

...
...

}

It is giving me the follwoing Runtime Exception:
java.lang.ExceptionInInitializerError
at org.apache.fop.svg.SVGElementMapping.setupSVG(SVGElementMapping.java:72)
at org.apache.fop.svg.SVGElementMapping.addToBuilder(SVGElementMapping.java:134)
at org.apache.fop.apps.Driver.addElementMapping(Driver.java:439)
at org.apache.fop.apps.Driver.addElementMapping(Driver.java:450)
at org.apache.fop.apps.Driver.setupDefaultMappings(Driver.java:314)
at org.apache.fop.apps.Driver.<init>(Driver.java:222)
... 36 more
Caused by: java.util.MissingResourceException: Can't find bundle for
base name org.apache.batik.util.resources.XMLResourceDescriptor,
locale en_US
at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:804)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:773)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:538)
at org.apache.batik.util.XMLResourceDescriptor.<clinit>(XMLResourceDescriptor.java:57)
... 46 more

I have batik.jar in my classpath as well as the fop.jar,
xalan-2.4.1.jar,  avalon-framework-cvs-20020806.jar which was provided
in
fop-0.20.5-bin.zip in the site http://apache.247available.com/xml/fop/

I have searched a lot in Google, but I didn;t find any answer which
actually solve my problem.

Can you please help me out?

thanks
Shirsendu

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


Re: Getting a runtime exception

Posted by Jeremias Maerki <de...@greenmail.ch>.
Sounds like a class loader problem. In these cases it's often helpful to
know which web container you're running and how you set up your web
application.

Try running the sample web application coming with FOP (see
examples/servlet in the FOP distribution) using an FO file with SVG in
it (because the problem happens withing batik.jar). If that works you
have to compare what's different in your web application.

You could also try putting batik.jar higher in the class loader
hierarchy, for example in the commons/lib directory if you're running
Tomcat.

On 11.02.2005 05:45:07 Shirsendu Sengupta wrote:
> Hi,
> 
> I am using the FOP-0.20.5 version in my code to generate the XML data
> to PDF file. I am trying to run a servlet for the conversion
> on-the-fly.
> But I am getting a Runtime exception at the time I am instantiating
> the Driver in the following way:
> 
> try {
>    org.apache.fop.apps.Driver driver = new org.apache.fop.apps.Driver();
> 
> ...
> ...
> 
> }
> 
> It is giving me the follwoing Runtime Exception:
> java.lang.ExceptionInInitializerError
> at org.apache.fop.svg.SVGElementMapping.setupSVG(SVGElementMapping.java:72)
> at org.apache.fop.svg.SVGElementMapping.addToBuilder(SVGElementMapping.java:134)
> at org.apache.fop.apps.Driver.addElementMapping(Driver.java:439)
> at org.apache.fop.apps.Driver.addElementMapping(Driver.java:450)
> at org.apache.fop.apps.Driver.setupDefaultMappings(Driver.java:314)
> at org.apache.fop.apps.Driver.<init>(Driver.java:222)
> ... 36 more
> Caused by: java.util.MissingResourceException: Can't find bundle for
> base name org.apache.batik.util.resources.XMLResourceDescriptor,
> locale en_US
> at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:804)
> at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:773)
> at java.util.ResourceBundle.getBundle(ResourceBundle.java:538)
> at org.apache.batik.util.XMLResourceDescriptor.<clinit>(XMLResourceDescriptor.java:57)
> ... 46 more
> 
> I have batik.jar in my classpath as well as the fop.jar,
> xalan-2.4.1.jar,  avalon-framework-cvs-20020806.jar which was provided
> in
> fop-0.20.5-bin.zip in the site http://apache.247available.com/xml/fop/
> 
> I have searched a lot in Google, but I didn;t find any answer which
> actually solve my problem.
> 
> Can you please help me out?

Jeremias Maerki


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