Developers Program

Java SDK - Exception in thread 'main' java.lang.NoClassDefFoundError

Published: September 18 2008, 3:06:00 PMยทUpdated: August 08 2022, 12:50:45 PM

Products

Question

I am getting Exception in thread "main" java.lang.NoClassDefFoundError as below when runs a java standalone project using the JAXB version of the JAVA SDK. loading wsdl : jar:file:/D:/SDK_JAXB/lib/ebaysdkcore.jar!/eBaySvc.wsdl Exception in thread "main" java.lang.NoClassDefFoundError at com.ebay.sdk.ApiCall.executeByApiName(ApiCall.java:595) at com.ebay.sdk.ApiCall.execute(ApiCall.java:349) at com.ebay.sdk.call.GetItemCall.getItem(GetItemCall.java:209) at com.ebay.sample.AppGetItem.main(AppGetItem.java:32)How to fix it?

Answer

Summary

This occurs if you use Sun JDK 1.6.0_04 or below as your Java Platform and include the jaxp-1.4.2 libraries: ${JAVA_SDK_HOME}externalLib/optional/jaxp-1.4.2/* in your CLASSPATH.

To fix it , you just need to remove the jaxp-1.4.2 libraries from your CLASSPATH since they are only needed if you are using IBM JDK 1.5.x.

Version Info

The KB above was based on the versions specified below:

JAVA SDK Version

eBay Java SDK 705 Point

JAVA SDK Version
How well did this answer your question?