Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

I get a java.lang.NoSuchMethodError when running XSP. Whats wrong?

0
Posted

I get a java.lang.NoSuchMethodError when running XSP. Whats wrong?

0

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.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123