cancel
Showing results for 
Search instead for 
Did you mean: 

Error during processing the Servlet request: NoClassDefFound

paolotegon
Associate
Associate
0 Kudos

A customer gave me some JARs and inside them there are some utilities classes and servlets.

So I have created a Library Project that contains the JAR files as well as references the "servlet" library and "servlet_jsp" service. In the Java Build Path of my project I have also inserted the external JAR: jaxrpx-api.jar (that I can't find as library/interface/service)

At the end I deployed the Library Archive.

Then I have created a Web Module project and in the web.xml in the source Tab I inserted the servlet class that I can find in the customer JAR:

<servlet>

<servlet-name>myServletName</servlet-name>

<servlet-class>my.servlet.class</servlet-class>

</servlet>

At this project I have also added my Library and in the Java Build Path I have also inserted the external JAR: jaxrpx-api.jar

Then I have create an Enterprise Application Project that contain as module the .war that I have created before and in the application-j2ee-engine.xml I have inserted the reference to my Library

When I launch myServletName I get this error:

500 Internal Server Error

Application error occurs during processing the request.

Details: java.lang.NoClassDefFoundError: javax/xml/rpc/Service

at it.generali.sso.sp.servlet.SPManager.init(SPManager.java:58)

at com.sap.engine.services.servlets_jsp.server.runtime.context.WebComponents.getServletByClass(WebComponents.java:390)

at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:135)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:385)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:263)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:340)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:318)

at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:821)

at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:239)

at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)

at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:147)

at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)

at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)

at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)

at java.security.AccessController.doPrivileged(Native Method)

at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)

at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)

the javax.xml.rpc.Service is contained in the jaxrpx-api.jar

Any suggestions?

Best Regards,

Paolo

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I know it's not quite elegant but you could set the host's classpath to point the required jar:

SET CLASSPATH=%CLASSPATH%;[ dir with the jar ]

Also, you could create a new Java->library project and deploy it in the server. There you can access it using

Preferences->external references: and there you add:

sap.com/yourReferencedProject

Greeting

Alejandro

paolotegon
Associate
Associate
0 Kudos

Hi Alejandro,

I've solved the problem adding webservices_lib library to my Library Project.

Regards,

Paolo