cancel
Showing results for 
Search instead for 
Did you mean: 

java dc use another java dc with java.lang.NoClassDefFoundError

Former Member
0 Kudos

Dear All:

I've created 2 java dc.

I assinged the second dc as a used dc for the first dc.

I've created a web dynpro dc and add the first dc as used dc.

I can build those three dc without any error, but when I deploy to server and run I got an exception "java.lang.NoClassDefFoundError"

Is there anyone know how to fix it.

thanks in advance.

Allen.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Allen,

I believe the following link will help you create two public parts (for Compile Time and for Runtime) of the wrapper DC and then include the Public Parts in the Used DCs of the Final Development Component.

http://help.sap.com/saphelp_nw70/helpdata/en/42/43973fade73c17e10000000a114084/frameset.htm

Without adding the Public Parts, your final DC to consume the Java Library would not show any Compile Time Error but would throw Class Definition Not Found Exception even though you deploy the wrapper DC on the Server. This should solve your problem. For any clarification you can always come back to me.

Regards,

Tushar Sinha,

Infosys,

Hyderabad

Former Member
0 Kudos

Hi

Thanks for ur help, i've solved this on my own.

The key point is check box of build time and run time when I add used DC.

Former Member
0 Kudos

You need to include both java DCs in your Web Dynpro DC, since a Java DC is not deployed by itself, but always needs to be wrapped in some other DC (Web Dynpro/J2EE library/Web Module).

Former Member
0 Kudos

Dear Pascal:

I've already deployed them all(1 WD DC and 2 Java DC) already.That 2 Java DC are wrapped in 2 J2EE Libraries individually. And I also add the library references in WebDynpro references configuration correctly. But I still got the NoClassDefFoundError.

Allen

nitin_mahajan2
Contributor
0 Kudos

The problem would be with creating the public parts (runtime and compile time) you have to include both the PPs as required and mentioned in the help.sap.

Regards,

Nitin