cancel
Showing results for 
Search instead for 
Did you mean: 

NoClassDefFoundError : when I am using MDM jar file

former_member199223
Participant
0 Kudos

Hi All,

In my Webdynpro Java application, I need to acces the MDM Data. i have to use these jars,

mdm-data.jar

mdm-protocol.jar

mdm-admin.jar

mdm-common.jar

mdm-core.jar

MDM4J.jar

and i getting this Error, while deploying the application to server.

java.lang.NoClassDefFoundError: com/sap/mdm/net/ConnectionAccessor

I guess, the reason may be that I dont have these above JARs in the server.

Please give me a solution as soon as possible.

Thanks,

Boopathi.

Accepted Solutions (0)

Answers (4)

Answers (4)

amolgupta
Active Contributor
0 Kudos

Hi,

i believe there is a simple solution to your problem.

right click on WebDynpro project -> properties -> web dynpro references -> Library References -> Add

write...

sap.com/com.sap.mdm.tech.mdm4j

click on Ok...

Run your application again after deploying ofcourse.

and it shall work.

regards,

-amol

siddharth_jain
Active Contributor
0 Kudos

Hi,

in adition to the chiranjeev comments make sure that you have deployed MDM4j and MDM Connector sda files on server .these file pach level should be compatible with MDM server version and Patch level.

Updated:

Check the following PDF:

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/506c9e5f-3a7d-2910-fe97-cc1a733f...

Check page no 8 for the required library references value to access MDM repository mentioned in PDF.

Siddharth

Edited by: Siddharth Jain on Sep 16, 2008 7:33 AM

Edited by: Siddharth Jain on Sep 16, 2008 7:36 AM

0 Kudos

Dear Bhoopathi,

You are getting classnotfound exception because, the external jar file you are using is available only at designtime (ie. Only in NWDS), and not available for runtime (ie. in J2ee server). To make it available in runtime, you have to deploy the jar file to J2ee server, so that the classes available in jar file will be available at runtime also.

If the project is a simple webdynpro project, then, copy the jar file in to lib folder of the project and add the jar file in build path of the project. When this project is deployed, the jar file will also be available along with project. But, this jar file will be available only for this webdynpro project.

If the project is a dc project, you have to deploy this jar file as a separate dc, and refer this dc in you dc project.

Since jar file cannot be deployed directly, we have to bundle this jar to ear file,as a library.Once this library dc is deployed, you can use the same library dc in other dc projects also.

For deploying external jar to J2ee engine, refer this link

I prefer this link, because it worked for me.

If it is not working, refer this..

Thanks,

Fahad Hamsa

Former Member
0 Kudos

HI ,

Add these jars as External Jars to JavaBuildPath of your Project.

RightClick on Project> Properties> JavaBuildPath-->AddExternalJars

Regards

LakshmiNarayana

former_member199223
Participant
0 Kudos

Thanks for your immediate reply.

I have already added these to my Webdynpro java Application.

The problem is that, the server does not know about these JARs.

Can you tell me how to give the sharing reference.

Thanks,

Boopathi.

Former Member
0 Kudos

Hi,

1. Add these jar files to your buildpath.

2. Copy these jar files to your lib folder (Open navigator view-->expand your project and copy the jar files in the lib folder).

Try deploying your application and check.

Regards,

Murtuza

Former Member
0 Kudos

Hi,

Create one J2EE Server Component --> library project.

Right click on this project>Properties> Add External jars

to it..(the Jars Required ).

Again right click--> build library archieve.

One .sda file will be generated

Right click on .sda file--> deploy to J2EE Engine

Finally,

Right click on your WebDynpro project> properties>WebDynproReferences-->

choose "Library references" tab--> add then

give name of above library project --> ok

Regards

LakshmiNarayana

former_member199223
Participant
0 Kudos

HI Lakshmi Narayan...

I have done as u mentioned but still getting the same error

Thanks

Boopathi M

Former Member
0 Kudos

HI,

Try it.. Delete Library reference and add as Sharing reference instead Library reference to your project.. But priorly, you must deploy the referenced Library project. also check

both names are same...

Try the suggestion of Mr. Murtuza also

Regards

LakshmiNarayana

0 Kudos

I ran into this issue and spent couple of hours trying to fix it....The solution is that under library references of the project, add "com.sap.mdm.tech.mdm4j". Though the files are present on J2EE engine, they are not available for your application unless you specify it in reference...