Wednesday, March 19, 2008

NoSuchMethodError when upgrading to EKP 5.0

We've had a few reports of the following problem: when connecting to an EKP site that has been upgraded to EKP 5.0, a "Cannot connect to database" page is seen, and a message like the one below appears in the log file (WEB-INF/logs/ekp.log).

java.lang.NoSuchMethodError: javax.xml.parsers.DocumentBuilderFactory.getSchema()Ljavax/xml/validation/Schema;
 at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.<init>(DocumentBuilderImpl.java:110)
 at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(DocumentBuilderFactoryImpl.java:101)
 at com.sun.msv.verifier.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(DocumentBuilderFactoryImpl.java:145)

This appears to happen if EKP is running on an older version of Tomcat 4.1. Older versions of Tomcat 4.1 will override the XML parser libraries that are included in the Java runtime, and these libraries conflict with the versions included in J2SE 5.0, which EKP 5.0 requires.

The simplest solution is to delete the parser libraries that are included with Tomcat 4.1. These can be found in the common/endorsed/ directory under the Tomcat home directory. These libraries are not required when running under J2SE 5.0.

6 comments:

gkcorp said...

Why did I use Tomcat 5.5, but stll incorrectly?..please help me!

Robert Lowe said...

It's almost certainly a classpath problem, so I suggest you carefully check the classpath (including Windows environment variable, Tomcat registry settings, and Tomcat shared directories such as common/endorsed/, common/lib/, shared/lib/) for any older XML parser libraries.

If you still see the problem, it's best if you can open a support case and provide more details about your environment.

Anonymous said...

I have done all that you have said on this site, but i am still getting the database problem. when i deleted the files as you have said apache tomcat refuse to start. kindly help

Robert Lowe said...

Please open a support case and attach your Tomcat log files (that is, the files from the Tomcat 4.1\logs directory).

Anonymous said...

Hi rob, i am using tomcat 5.5 and the problem with that database is still there. I have done numerous installation on the same server but the results is still the error. it is not tomcat 4.1 it is tomcat 5.5. kindly help.

Robert Lowe said...

My previous comment stands—we would need to see the Tomcat and EKP log files to determine the cause of the problem.