Accessibility

TechNote (Archived)

ColdFusion MX 6.1: java.lang.NoClassDefFoundError when referring to class that relies on webservices.jar

Issue


Macromedia ColdFusion MX 6.1 J2EE configuration with JRun reports a NoClassDefFoundError when using cfobject to access a Java object that references classes in webservices.jar.

If you make a call using cfobject to a Java class that references a class in webservices.jar, the NoClassDefFoundError will be generated. The following is an example of a stack trace from the error:

 java.lang.NoClassDefFoundError at org.apache.axis.client.Service.getAxisClient(Service.java:143) at org.apache.axis.client.Service.<init>(Service.java:152) 

This issue is due to the existence of two webservices.jar files: one in the JRun directory structure and one in the CFusion WAR file. This confuses the class loader and causes the error.

Solution


Remove the webservices.jar from the ColdFusion WAR directory structure.

  1. Delete the webservices.jar file fromcf_root\WEB-INF\cfusion\lib.

    For example:

    C:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\WEB-INF\cfusion\lib
  2. Restart ColdFusion.

Additional Information


Related TechNotes:


AlertThis content requires Flash

To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.

Download the free Flash Player now!

Get Adobe Flash Player

Creative Commons License

Search Support


Document Details

ID:tn_19268
Browser:Chrome
Internet Explorer
Netscape
Opera
Safari
Firefox
Database:DB2
Informix
MySQL
Oracle
SQL Server
Sybase
MS Access

Products Affected: