Support Article
Custom Object fails to startup due to NoClassDefFoundError
SA-1328
Summary
Custom Object fail during startup in CFS56 with NoClassDefFoundError relating to a Custom class
Error Messages
[31/08/14 13:07:03:608 BST] 0000001a SystemOut O <Sun Aug 31 13:07:03 BST 2014> <1409486823608> <DEBUG> <Thd=CustomObjectsHelper delayed setup thread> <com.chordiant.service.ejb.EJBGatewayServiceBean.handleTopLevelException()> <Top level exception occured in EJB: [java.lang.NoClassDefFoundError: com.chordiant.businessServices.referenceDataCorporateBusinessClasses.ScoreModifierCriteria]>
[31/08/14 13:07:03:610 BST] 0000001a SystemOut O <Sun Aug 31 13:07:03 BST 2014> <1409486823610> <ERROR> <Thd=CustomObjectsHelper delayed setup thread> <com.bc.enterprise.ebs.referencedata.clientAgents.ReferenceDataClientAgent.retrieveRecordsForCache()> <Unexpected throwable [java.lang.Exception] converted to ChordiantRuntimeException by com.bc.enterprise.ebs.referencedata.clientAgentsReferenceDataClientAgentretrieveRecordsForCache
Steps to Reproduce
on Server startup & everytime
Root Cause
The error that we are getting is NoClassDefFoundError.
Original error message: java.lang.Exception: java.lang.NoClassDefFoundError: com.chordiant.businessServices.referenceDataCorporateBusinessClasses.ScoreModifierCriteria
Original error message: java.lang.Exception: java.lang.NoClassDefFoundError: com.chordiant.businessServices.GenRefDataCorporateBusinessClasses.RefDataAuditCriteria
NoClassDefFoundError in Java comes when Java Virtual Machine is not able to find a particular class at runtime which was available during compile time
Resolution
Custom jars need to be copied to lib-cust folder of JXRuntime for packaging the application. This ensures that in the generated EAR, we get BMT and CMT jars with updated manifest.mf
Issue was resolved after updating manifest.mf file of JXEnterpriseBeansBMT_Websphere5.jar and JXEnterpriseBeansCMT_Websphere5 .jar with Custom jar containing the required class
Published January 31, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.