cancel
Showing results for 
Search instead for 
Did you mean: 

Error while connecting to MDM server from Webdynpro

Former Member
0 Kudos

Hi ,

I am trying to connect to MDM server (5.5 SP04 no patches) through a webdynpro application . The following is the piece of code that I am using as a test .

-


CatalogData CatalogData = new CatalogData();

int resultLogin = 0;

try {

resultLogin = CatalogData.Login("USNOC01AQ05",2005,"Admin","Erico1234","English [US]");

}catch(Exception e){

wdContext.currentContextElement().setValueattr("Not Connected");

//System.out.println("Error while establishing connection");

}

if (resultLogin != RC.RC_OK){

wdContext.currentContextElement().setValueattr("Not Connected");

//System.out.println("Error logging to the SDM server");

//System.exit(-1);

}

wdContext.currentContextElement().setValueattr("Connected");

//System.out.println("MDM server connected");

-


The import statements are as follows

-


import a2i.common.CatalogData;

import a2i.generated.RC;

-


I have put the following jar files in the java build path

MDM4J

mdm-admin

mdm-common

mdm-core

mdm-data

mdm-protocol

When I deploy my application I get the following error

-


java.lang.NoClassDefFoundError: a2i/common/CatalogData

It can't be determined from the exception chain, which class loader failed to load the above class. But at least the class loader of the current application does not contain a resource with name 'a2i/common/CatalogData'.

-


What do you guys think is the problem ?

Regards

DeepaK Singh

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi ,

I found a document which says that MDM4J is the legacy API and is considered deprecated .The MDM Java API is the new one .I have both of them in the java build path . I am not sure if this is that cause of the problem .

Now I had a look at the javadoc for the new API but I am not able to locate the class to obtain a connection to the MDM server from a custom application being built in Netweaver Developer Studio . Can someone help me out with the same ?What would be the code to obtain the connection to the MDM server with the new JAVA API ?

Regards

DeepaK Singh

Former Member
0 Kudos

I think I foiund the solution . The problem was with my classpath variable and the java build path in the netweaver developer studio . The blog

/people/andreas.seifried/blog/2007/01/18/referencing-the-mdm-java-api-during-development-and-runtime

helped me .

Regards

Deepak Singh