Skip to main content
Published: September 18 2008, 3:06:00 PMUpdated: August 08 2022, 12:50:45 PM

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?

 

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 

How well did this answer your question?
Answers others found helpful

Got thoughts? Click the feedback button – your insights help us improve!