cancel
Showing results for 
Search instead for 
Did you mean: 

Deployment aborted - NoClassDefFoundError

Former Member
0 Kudos

I've created an EJB Module DC and an Enterprise Application DC. The projects can be build, but when I try to deploy the resulting ear to my local server the deployment fails with a NoClassDefFoundError.

The missing class is contained in SC SAP-JEE DC /tc/sec/destinations/interface. I have added a use dependency for this DC 'at Build Time' for the EJB Module and 'at Deploy Time' and 'at Run Time' for the ear.

In <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_bc_dwb/~form/handler%7b5f4150503d3030323030363832353030303030303031393732265f4556454e543d444953504c4159265f4e4e554d3d373938383732%7d">Note 798872</a> I found at the very end that I have to maintain the references in application-j2ee-engine.xml also, additionally to the use dependency. However, the dialog to do so is disabled and a message is shown to maintain the values in DC-MetaData. In fact, the note is related to NWDI 6.40, so this information may be outdated.

Any ideas why the deployment fails?

Best regards,

Frank

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Well, at runtime the content of the application-j2ee-engine.xml is relevant. If the reference is not there you will get the NoClassDefFoundError.

Assuming you are using 7.00 build plugins: If an application-j2ee-engine.xml exists in your sources then the DC build should validate the content and show appropriate warnings in the build log. If no such file exists the DC Build should create the file based on the information in the DC metadata. (You should see a line in the build log that says something like "[cda] Creating deploy descriptor ... application-j2ee-engine.xml" or "[cda] Validating...").

So as solution you could try to delete the application-j2ee-engine.xml from your sources. Note that a EAR file produced using non-DC IDE tools will then probably not work.

Regards,

Marc

Former Member
0 Kudos

Hi Marc,

My application still runs on a webas 6.40, so I use the corresponding build plugins. As they do not seem to say anything like "[cda] ..." I followed your second approach and deleted the application-j2ee-engine.xml. Unfortunately, the file has not been recreated by the build tools and without the file the application did not deploy either. So I created a new application-j2ee-engine.xml and realized that this new file can be maintained by the corresponding dialog of NDS. After adding a reference to the missing SC the application could be deployed without a problem.

Best regards,

Frank

Former Member
0 Kudos

Hi Frank,

sorry, I should have been more explicit: the [cda] task is a newer feature, I think I have seen it with the latest 6.40 releases, but I'm not sure if it is used in all cases.

If that task is used you can remove the runtime descriptor file and it will be recreated during build. AFAIK, older build plugins do not support this except for J2EE Server Libraries.

Regards,

Marc