Technote

(troubleshooting)
XMLTransform utility fails with Exception in thread main java.lang.NoClassDefFoundError
Problem(Abstract)
You run the XMLTransform utility and it fails. You see the following message in the console:
"Error running xmltransform. Check that all parameters have been specified"

In the xmltransform.log the following exception is seen:

Exception in thread "main" java.lang.NoClassDefFoundError:
javax/servlet/ServletException
at com.ibm.wca.XMLTransformer.Logging.Logger.initialize(Logger.java:110)
at com.ibm.wca.XMLTransformer.Logging.Logger.<init>(Logger.java:70)
at com.ibm.wca.XMLTransformer.XMLTransformerLogger.<init>(XMLTransformerLogger.java:53)
at com.ibm.wca.XMLTransformer.InvokeXMLTransformer.startLogger(InvokeXMLTransformer.java:126)
at com.ibm.wca.XMLTransformer.InvokeXMLTransformer.main(InvokeXMLTransformer.java:55)
Cause Under some Toolkit environments, the classpath may be missing the j2ee.jar which contains the ServletException class. Resolving the problem A workaround for the above problem is to modify the <WC_installdir>/bin/xmltransform.bat

  1. Locate the line starting with 'CP' (classpath variable) and add the following:%WAS_HOME%\lib\j2ee.jar;
    For example,
    CP=%CP%%WORKSPACE_DIR%\WC\Enablement-BaseComponentsLogic.jar;%EJB_DIR%\Enablement-BaseComponentsData.jar;%WAS_HOME%\lib\distexcep.jar;%WAS_HOME% \lib\runtime.jar;%WAS_HOME%\lib\j2ee.jar

  2. Save the changes

  3. Rerun the XMLTransform utility.

Cross Reference information
Segment Product Component Platform Version Edition
Commerce WebSphere Commerce - Express Utilities/Tools Linux, Windows 6.0
Commerce WebSphere Commerce Professional Edition Utilities/Tools AIX, Linux, Solaris, Windows 6.0
Commerce WebSphere Commerce Developer Enterprise Utilities/Tools Windows 6.0
Commerce WebSphere Commerce Developer Professional Edition Utilities/Tools Windows 6.0
Commerce WebSphere Commerce Developer Express Utilities/Tools Windows 6.0
   

Document Information

Current web document: http://www.ibm.com/support/docview.wss?uid=swg21269827