You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jesse Reynolds <li...@va.com.au> on 2001/01/03 04:20:31 UTC

RE: errors in installation - oops

Doh, stupid me. It is too in the FAQ. (Indeed it looks like my 
question is one of the most popular on this list :-)

If you're using Tomcat 3.2.1 and Cocoon 1.8, the answer is to rename 
$TOMCAT_HOME/lib/parser.jar to z-parser.jar (so it comes after 
xerces.jar in the automatically generated CLASSPATH) ... but there's 
a better explanation in the FAQ:

Q: I get a java.lang.NoSuchMethodError at XSPJavaPreprocessor. What's wrong?

A: This happens because Cocoon needs a DOM Level 2 implementation and 
you probably have a DOM Level 1 included in your classpath before 
xerces.jar.

So, place the xerces.jar archive that comes with Cocoon before all 
the other jar packages in your classpath.

Some servlet engines, such as Tomcat, construct a CLASSPATH 
automatically based on all the jar files in a lib directory. In this 
case, you may need to rename the jar file containing the DOM Level 1 
(xml.jar or parser.jar) to something like zzz.jar to force it to come 
last, or even move it out of the lib directory altogether.

If even that doesn't work, also check that there is no XML parser in 
your JDK's lib/ext or jre/lib/ext directories. If there is, remove it.

Unfortunately, some servlet engines require DOM Level 1 to be ahead 
of DOM Level 2 in the CLASSPATH - conflicting with Cocoon! There is 
no known workaround for this problem (but see the next question) - 
please let us know at cocoon-users@xml.apache.org if you find one.

cheers

jesse


At 13:16 +1100 3/1/01, Jesse Reynolds wrote:
>A similar thing is happening to me, thought the error is different. 
>i've just installed identical Cocoon 1.8 and Tomcat 3.2.1 on two 
>different platforms, FreeBSD 4.1.1-RELEASE and Debian Linux 2.2 
>(Potato), with JDK 1.1.8 and Blackdown JDK 1.2.2 respectively, ie:
>
>FreeBSD 4.1.1-RELEASE
>JDK 1.1.8
>Tomcat 3.2.1
>Cocoon 1.8
>
>Debian GNU Linux (i386) 2.2 (Potato)
>Blackdown JDK 1.2.2
>Tomcat 3.2.1
>Cocoon 1.8
>
>All the examples work except when you get down to the dynamic-gen 
>sample, ie "First XSP Page". The error on the FreeBSD box is:
>
>Error found handling the request.
>
>
>java.lang.NoSuchMethodError: org.w3c.dom.Node: method normalize()V not found
>	at 
>org.apache.cocoon.processor.xsp.language.java.XSPJavaPreprocessor.process(XSPJavaPreprocessor.java:87)
>	at 
>org.apache.cocoon.processor.xsp.language.java.XSPJavaPreprocessor.process(XSPJavaPreprocessor.java:123)
>	at 
>org.apache.cocoon.processor.xsp.language.java.XSPJavaPreprocessor.preprocess(XSPJavaPreprocessor.java:81)
>	at 
>org.apache.cocoon.processor.xsp.XSPLogicsheet.apply(XSPLogicsheet.java:99)
>	at 
>org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java:423)
>	at org.apache.cocoon.Engine.handle(Engine.java:359)
>	at org.apache.cocoon.Cocoon.service(Cocoon.java:167)
>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>	at 
>org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
>	at org.apache.tomcat.core.Handler.service(Handler.java:286)
>	at 
>org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
>	at 
>org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
>	at 
>org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
>	at 
>org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
>	at 
>org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
>	at 
>org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
>	at java.lang.Thread.run(Thread.java)
>
>Any clues?
>
>Thanks
>
>-jesse
>
>
>At 15:58 +0100 2/1/01, Roberto Viana wrote:
>>Which O.S. are you using?
>>
>>-----Original Message-----
>>From: Salina Fung [mailto:salina@icil.net]
>>Sent: Tuesday, January 02, 2001 11:43 AM
>>To: 'cocoon-users@xml.apache.org'
>>Subject: errors in installation of cocoon 1.8 with Apache tomcat
>>
>>
>>is there anybody can help me?
>>I have installed the cocoon1.8 in Apache -tomcat.  Everything runs
>>fine with the samples that come with the distributions, except when
>  >I click into the dynamic-gen page sample, then I got the following error:
>>
>>
>>java.lang.NoSuchMethodError
>>	at
>>org.apache.cocoon.processor.xsp.language.java.XSPJavaPreprocessor.process(XS
>>PJavaPreprocessor.java:116)
>>	at
>>org.apache.cocoon.processor.xsp.language.java.XSPJavaPreprocessor.process(XS
>>PJavaPreprocessor.java:123)
>>	at
>>org.apache.cocoon.processor.xsp.language.java.XSPJavaPreprocessor.preprocess
>>(XSPJavaPreprocessor.java:81)
>>	at
>>org.apache.cocoon.processor.xsp.XSPLogicsheet.apply(XSPLogicsheet.java:99)
>>	at
>>org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java:423)
>>	at org.apache.cocoon.Engine.handle(Engine.java:359)
>>	at org.apache.cocoon.Cocoon.service(Cocoon.java:167)
>>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
>>	at
>>org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
>>	at
>>org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
>>	at
>>org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
>>(Ajp12ConnectionHandler.java:156)
>>	at
>>org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338
>>)
>>	at java.lang.Thread.run(Thread.java:484)
>>
>>
>>I have made sure the xerces.jar comes before the xml.jar in the classpath.
>>
>>Also what do I missed if I run the 'slides' sample using Netscape browser,
>>'the next button' doesn't
>>work, it shows the directory of the xml files instead of showing the next
>>slide.
>>
>>Thanks
>>salina
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
>>For additional commands, e-mail: cocoon-users-help@xml.apache.org
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
>>For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
>--
>
>       Jesse Reynolds - Virtual Artists Pty Ltd - http://www.va.com.au
>                                                  jesse (at) va.com.au       
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
>For additional commands, e-mail: cocoon-users-help@xml.apache.org

-- 

       Jesse Reynolds - Virtual Artists Pty Ltd - http://www.va.com.au
                                                  jesse (at) va.com.au