Skip to Content
Former Member
May 18, 2005 at 10:26 PM

Using External JARs in a Web Dynpro Project



I'm having some difficulties building and deploying a Web Dynpro application that uses the Apache JaxMe libraries. We're using SP11 of Developer Studio and WebAS and we're using JDI Scenario 2+ for building and deployment. Thus far here's the procedure I followed:

1) Created a DC of type "External Library"

2) Added the necessary jars to the "libraries" folder of the External Library DC project (the jars that I added were jaxme2-rt.jar, jaxme2.jar, jaxmeapi.jar, jaxmejs.jar, jaxmepm.jar, jaxmexs.jar, xercesImpl.jar, xml-apis.jar all of which were pulled from the Apache JaxMe implementation download)

3) For each of the jars in the libraries folder I right-clicked, selected Develoment Component then clicked "Add to public part"

Then after reading this note:

I created a J2EE Library Component DC following these steps:

1) Created a new DC of type J2EE Server Component / Library

2) Added the External Library DC that I had just created as a "Used DC"

3) Edited the DC so that it is used a Build Time and Run Time

Finally I went to the Web Dynpro application and included the J2EE Library Component DC as a Used DC at build time and run time.

I was able to build all of the project successfully (doing a DC build for each) then I was able to succesfully deploy the applications to my local development WebAs (by doing a DC deploy for both the J2EE Server Component and the Web Dynpro application) The problem is that at runtime the Web Dynpro application cannot find the external libraries. For example, I receive the following error when running the application:

java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException

The "missing" class is included in one of the jars but for some reason these jars are not accessible to Web Dynpro at runtime.

Any help you can provide on this problem is very much appreciated.

Thanks in advance!