Skip to Content
0
Former Member
Jun 28, 2008 at 02:58 PM

MDM Java API 2 NoClassDefinitionFound Error

35 Views

Hello Friends:

UserSessionContext usrSessCnxt = wdThis.getUserSessionContext();
AttributeSchema  attrSchema = MetadataManager.getInstance().getAttributeSchema(usrSessCnxt);

When I am executing the above two lines, I got this error today while working on a Web Dynpro iview using MDM Java API. The code

was failing exactly at the second line. First line, UserSessionContext

is initializing perfectly.

java.lang.NoClassDefFoundError: com/sapportals/connector/connection/ConnectionFailedException

at com.sap.mdm.internal.session.JcaConnectionAccessor.reserveConnection(JcaConnectionAccessor.java:70)

at com.sap.mdm.internal.session.JcaConnectionAccessor.reserveConnection(JcaConnectionAccessor.java:59)

atom.sap.mdm.schema.commands.GetRepositoryDimensionsCommand.execute(GetRepositoryDimensionsCommand.java:73)

at com.sap.mdm.extension.MetadataManager.getRepositoryDimensions(MetadataManager.java:277)

at com.bse.po.mdm.cat.helper.AttributeHelper.getAttributeValues AttributeHelper.java:86)

at com.bse.po.mdm.cat.helper.ProductHelper.getProducts(ProductHelper.java:210)

Yes, I decompiled the MDM Java API classes and found the class JcaConnectionAccessor class with reserverConnection method. It only can throw ConnectionException. Apparently, the program wants to

throw Connection FailedException, which could not be found so, it is an irrevocable error so the Java

VM is crashing.

But there is one interesting thing. When I ran the same code pieces in a stand-alone Java program, it

runs perfectly ????

One more side fact, the Java MDM API jars I have, when I tested with "Java -jar mdm-core.jar"

command gives me 5.5.62.66 as version.When run the same command on the MDM Server Jar files, I

get 5.5.35.42. Also, when I check the version of the repository in MDM Console it is shown as

5.5.62.51. I beleive this doesn't cause the problem, because the last digits only represents some hot

fixes.

The reason why does the Java code works and not the Web Dynpro application ???

Appreciate your help,

Prasad Nutalapati