You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Pascal Houde <pa...@cactuscom.ca> on 2000/01/20 00:09:47 UTC

Problem running XSP samples

I can't run any of the Cocoon 1.6 XSP samples. I always get a
"java.lang.NoSuchMethodError: org.w3c.dom.Node: method normalize()V not
found". See below for complete stack trace.

At the line where the error occur (XSPJavaPreprocessor.java:87) there's a
switch statement in the process(Node) method where it test the node type.
When it's an ELEMENT_NODE, it cast the Node object to an Element object and
calls the normalize method (line 115). It fails at that point.

I am using JRUN2.3.2/JSDK2.1/JDK1.2.2.
I am using Xerces 1.0.1 for my DOM implementation (I guess that the error is
here...).

Any comment are appreciated.
Thanks

java.lang.NoSuchMethodError: org.w3c.dom.Node: method normalize()V not found
	at
org.apache.cocoon.processor.xsp.language.java.XSPJavaPreprocessor.process(XS
PJavaPreprocessor.java:87)
	at
org.apache.cocoon.processor.xsp.language.java.XSPJavaPreprocessor.process(XS
PJavaPreprocessor.java:122)
	at
org.apache.cocoon.processor.xsp.language.java.XSPJavaPreprocessor.preprocess
(XSPJavaPreprocessor.java:81)
	at
org.apache.cocoon.processor.xsp.XSPTemplate.apply(XSPTemplate.java:108)
	at
org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java:380)
	at org.apache.cocoon.Engine.handle(Engine.java:286)
	at org.apache.cocoon.Cocoon.service(Cocoon.java:145)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
	at com.livesoftware.jrun.JRun.runServlet(JRun.java)
	at
com.livesoftware.jrun.JRunGeneric.handleConnection(JRunGeneric.java)
	at
com.livesoftware.jrun.service.web.JRunWebServiceHandler.handleOutput(JRunWeb
ServiceHandler.java)
	at
com.livesoftware.jrun.service.web.JRunWebServiceHandler.handleRequest(JRunWe
bServiceHandler.java)
	at
com.livesoftware.jrun.service.ThreadConfigHandler.run(ThreadConfigHandler.ja
va)

RE: Problem running XSP samples

Posted by Donald Ball <ba...@webslingerZ.com>.
On Wed, 19 Jan 2000, Ricardo Rocha wrote:

> On Jan-19-2000 Pascal Houde wrote:
> > I can't run any of the Cocoon 1.6 XSP samples. I always get a
> > "java.lang.NoSuchMethodError: org.w3c.dom.Node: method normalize()V not
> > found". See below for complete stack trace.
> > At the line where the error occur (XSPJavaPreprocessor.java:87) there's a
> > switch statement in the process(Node) method where it test the node type.
> > When it's an ELEMENT_NODE, it cast the Node object to an Element 
> > object and calls the normalize method (line 115). It fails at that point.
> > I am using Xerces 1.0.1 for my DOM implementation (I guess that 
> > the error is here...).
> 
> This is a problem for which Donald Ball already found a solution:
> 
> On Jan-13-2000 Donald Ball wrote:
> > Actually, I just fixed the problem locally. I moved Xerces.jar to the top
> > of the CLASSPATH and things are working again. Irritating, that so many
> > JARs include different variations on DOM.
> > - donald
> 
> This happened to me as well. I fixed it by placing Xerces before Xalan
> in the classpath setting.

Can we perhaps get a known good CLASSPATH posted on the web site to which
we can refer people who're having trouble?

I'll start. This is what I use:

CLASSPATH=$CLASSPATH:/usr/local/lib/java/xerces.jar
CLASSPATH=$CLASSPATH:/usr/local/lib/java/projectx-tr2.jar
CLASSPATH=$CLASSPATH:/usr/local/lib/java/openxml-1.1.jar
CLASSPATH=$CLASSPATH:/usr/local/lib/java/xslp.jar
CLASSPATH=$CLASSPATH:/usr/local/lib/java/xp.jar
CLASSPATH=$CLASSPATH:/usr/local/lib/java/xt.jar
CLASSPATH=$CLASSPATH:/usr/local/lib/java/xalan.jar
CLASSPATH=$CLASSPATH:/usr/local/lib/java/ant.jar
CLASSPATH=$CLASSPATH:/usr/local/lib/java/javac.jar
CLASSPATH=$CLASSPATH:/usr/local/lib/java/fesi.jar
CLASSPATH=$CLASSPATH:/usr/local/lib/java/fop.jar
CLASSPATH=$CLASSPATH:/home/balld/src/xml-cocoon/build/Cocoon.jar

that's everything (i think) that's required to run cocoon-1.6 (maybe even
some extraneous stuff). I do still have trouble rebuilding cocoon until I
remember to delete sun's parser (i must need to switch some things around
still), but I can live with that. Xerces was compiled from CVS recently,
Xalan is latest binary build. Are there any additions, subtractions, or
modifications to the list?

- donald


RE: Problem running XSP samples

Posted by Ricardo Rocha <ri...@apache.org>.
On Jan-19-2000 Pascal Houde wrote:
> I can't run any of the Cocoon 1.6 XSP samples. I always get a
> "java.lang.NoSuchMethodError: org.w3c.dom.Node: method normalize()V not
> found". See below for complete stack trace.
> At the line where the error occur (XSPJavaPreprocessor.java:87) there's a
> switch statement in the process(Node) method where it test the node type.
> When it's an ELEMENT_NODE, it cast the Node object to an Element 
> object and calls the normalize method (line 115). It fails at that point.
> I am using Xerces 1.0.1 for my DOM implementation (I guess that 
> the error is here...).

This is a problem for which Donald Ball already found a solution:

On Jan-13-2000 Donald Ball wrote:
> Actually, I just fixed the problem locally. I moved Xerces.jar to the top
> of the CLASSPATH and things are working again. Irritating, that so many
> JARs include different variations on DOM.
> - donald

This happened to me as well. I fixed it by placing Xerces before Xalan
in the classpath setting.