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 "Carter, Will" <wc...@EnvestNet.com> on 2002/05/21 17:16:47 UTC

xalan-2.0.0.jar and xerces-1.2.3.jar in classpath not working...

Hi,

I am running fop in a servlet with jrun 3.1 as the servlet container.

the only way I can get it to work is if I put xalan-2.0.0.jar and
xerces-1.2.3.jar into my jdk/jre/lib/ext folder.  I have all the other fop
jars in my WEB-INF/lib folder.

as long as I have xalan-2.0.0.jar and xerces-1.2.3.jar in the
jdk/jre/lib/ext folder my servlet works, but if I move these to to the
WEB-INF/lib it doesn't and I get this error:

500 Internal Server Error
/servlet/FotoPDF:

null
java.lang.NoSuchMethodError
	at org.apache.fop.svg.SVGElement.init(SVGElement.java:199)
	at org.apache.fop.svg.SVGElement.<init>(SVGElement.java:84)
	at org.apache.fop.svg.SVGElement$Maker.make(SVGElement.java:61)
	at
org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:261)
	at
org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1371)
	at
org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidat
or.java:840)
	at
org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanne
r.java:1853)
	at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XM
LDocumentScanner.java:1234)
	at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.
java:381)
	at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:948)
	at org.apache.fop.apps.Driver.render(Driver.java:481)
	at org.apache.fop.apps.Driver.run(Driver.java:554)
	at FotoPDF.doGet(FotoPDF.java:69)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1417)
	at
allaire.jrun.session.JRunSessionService.service(JRunSessionService.java:1088
)
	at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:1271)
	at
allaire.jrun.servlet.JRunNamedDispatcher.forward(JRunNamedDispatcher.java:39
)
	at allaire.jrun.servlet.Invoker.service(Invoker.java:84)
	at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1417)
	at
allaire.jrun.session.JRunSessionService.service(JRunSessionService.java:1088
)
	at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:1271)
	at
allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.jav
a:89)
	at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1557)
	at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1547)
	at allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:364)
	at allaire.jrun.http.WebEndpoint.run(WebEndpoint.java:115)
	at allaire.jrun.ThreadPool.run(ThreadPool.java:272)
	at allaire.jrun.WorkerThread.run(WorkerThread.java:75)

does anyone know how to remedy this?

thanks,
will


Re: xalan-2.0.0.jar and xerces-1.2.3.jar in classpath not working...

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Oleg Tkachenko wrote:
>> I am running fop in a servlet with jrun 3.1 as the servlet container.
>>
>> the only way I can get it to work is if I put xalan-2.0.0.jar and
>> xerces-1.2.3.jar into my jdk/jre/lib/ext folder.  I have all the other 
>> fop
>> jars in my WEB-INF/lib folder.
>>
>> as long as I have xalan-2.0.0.jar and xerces-1.2.3.jar in the
>> jdk/jre/lib/ext folder my servlet works, but if I move these to to the
>> WEB-INF/lib it doesn't and I get this error:
>>
>> 500 Internal Server Error
>> /servlet/FotoPDF:
>>
>> null
>> java.lang.NoSuchMethodError
>>     at org.apache.fop.svg.SVGElement.init(SVGElement.java:199)
> 
> 
> That sounds very bizarre to me, but I guess it has something to do with 
> batik.jar. Chances are you have another (old?) batik (or another svg 
> lib?) somewhere in the classpath.
> 

The last line is the line in question:
    DOMImplementation impl = SVGDOMImplementation.getDOMImplementation();
    String svgNS = SVGDOMImplementation.SVG_NAMESPACE_URI;
    doc = impl.createDocument(svgNS, "svg", null);

There seems to be a comflict between DOM implementations here.
Order in the classpath matters, and the jdk/jre/lib/ext directory
is searched before the WEB-INF/lib (it's usually part of the
bootclasspath).

JRun ought to have some documentation detailing how the classpath
is built and how other directories are searched. This should clear
any misunderstandings. If in doubt, the JRun people should be asked
for clarification.

J.Pietschmann


Re: xalan-2.0.0.jar and xerces-1.2.3.jar in classpath not working...

Posted by Oleg Tkachenko <ol...@multiconn.com>.
Carter, Will wrote:
  Hi,
> 
> I am running fop in a servlet with jrun 3.1 as the servlet container.
> 
> the only way I can get it to work is if I put xalan-2.0.0.jar and
> xerces-1.2.3.jar into my jdk/jre/lib/ext folder.  I have all the other fop
> jars in my WEB-INF/lib folder.
> 
> as long as I have xalan-2.0.0.jar and xerces-1.2.3.jar in the
> jdk/jre/lib/ext folder my servlet works, but if I move these to to the
> WEB-INF/lib it doesn't and I get this error:
> 
> 500 Internal Server Error
> /servlet/FotoPDF:
> 
> null
> java.lang.NoSuchMethodError
> 	at org.apache.fop.svg.SVGElement.init(SVGElement.java:199)

That sounds very bizarre to me, but I guess it has something to do with 
batik.jar. Chances are you have another (old?) batik (or another svg lib?) 
somewhere in the classpath.

-- 
Oleg Tkachenko
Multiconn International, Israel