cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

XML error "java.lang.NoClassDefFoundError: javax/xml/bind/JAXBContext"

Former Member
0 Likes
1,911

Hi Experts,

We are developing a WebDynpro for java application in NWDI for XML File Uploading, we have followed the below given process for that

1) Created one XSD as per the client table structure.

2) Developed one java webserver for the XSD file using jwsdp1.6

3) Copied that generated folder in WebDynpro application

4) Included all the required JAX-B jars as External jar files

5) Finally Compiles the application

When running the application it is throwing the below exception

500 Internal Server Error Web Dynpro Container/SAP J2EE Engine/6.40

Failed to process request. Please contact your system administrator.

Error Summary

While processing the current request, an exception occured which could not be handled by the application or the framework.

If the information contained on this page doesn't help you to find and correct the cause of the problem, please contact your system administrator. To facilitate analysis of the problem, keep a copy of this error page. Hint: Most browsers allow to select all content, copy it and then paste it into an empty document (e.g. email or simple text file).

Root Cause

The initial exception that caused the request to fail, was:

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

at com.ae.energy.scm.wdp.InternalXMLFileUpload.<init>(InternalXMLFileUpload.java:403)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

at java.lang.reflect.Constructor.newInstance(Constructor.java:274)

We checked entire application to ensure all the required files included, Could you please give us the cause for this exception and please explain us the solution to resolve it.

We are very thankful for all the people who can give their support in resolving this issue.

Thanks in advance,

Sandeep Bonam

View Entire Topic
Former Member
0 Likes

Hi Sandeep,

If you are following DC developemnt for your project, then adding the required JAR files as External Jars will not suffice.

As at deployment, these "External Jars" are not considered.

You will need to create and External Library project, for incorporating the required jars.

For creation and use of External Library Project kindly follow Valery's blog:

/people/valery.silaev/blog/2005/09/14/a-bit-of-impractical-scripting-for-web-dynpro

Hope it Helps.

Regards,

Alka.

Former Member
0 Likes

Alka,

Thanks for the response. Already we included all the required jar files in public parts though we are getting this exception.

Thanks,

Sandeep Bonam