CXF java.lang.ClassNotFoundException: org.apache.cxf.transport.- servlet.CXFServlet

Ich versuche die Bereitstellung eines rest-web-service in 8.0 WAR

Die Anwendung OHR ist immer erfolgreich installiert.

Jedoch, sowohl auf Verlags-als auch auf das schlagen der service von web-browser nach dem veröffentlichen bekomme ich folgende Fehlermeldung:

[3/13/14 13:42:20:652 IST] 00000024 servlet       E com.ibm.ws.webcontainer.servlet.ServletWrapper run SRVE8052E: Logging ClassNotFoundException
                             java.lang.ClassNotFoundException: class java.lang.ClassNotFoundException: org.apache.cxf.transport.servlet.CXFServlet
at java.beans.Beans.instantiate(Beans.java:190)
at java.beans.Beans.instantiate(Beans.java:75)
at com.ibm.ws.webcontainer.servlet.ServletWrapper$1.run(ServletWrapper.java:1471)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.loadServlet(ServletWrapper.java:1460)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.load(ServletWrapper.java:1358)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:982)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3751)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:962)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:195)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:276)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1690)

Jedoch die jar mit der Klasse nämlich. cxf-rt-transports-http-2.7.4.jar befindet sich im inneren lib-Verzeichnis des KRIEGES im OHR installiert.

Was ist die Ursache des Problems ?

Wie kann ich es beheben ?

Update: Mein web.xml ist wie folgt:

<web-app>
<display-name>MyService</display-name>

<context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>classpath:applicationContext.xml</param-value>
</context-param>
<listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

<servlet>
    <servlet-name>CXFServlet</servlet-name>
    <display-name>CXF Servlet</display-name>
    <servlet-class>
        org.apache.cxf.transport.servlet.CXFServlet
    </servlet-class>
    <load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
    <servlet-name>CXFServlet</servlet-name>
    <url-pattern>/rest/*</url-pattern>
</servlet-mapping>

</web-app>
Sind Sie versuchen, um die Klasse zu verwenden, in einen Ort innerhalb des application-server, wo das Glas ist nicht sichtbar für die Klasse loader?
wenn Sie die Arbeit mit maven, welchen Umfang haben Sie? vielleicht müssen Sie die jar für den server.
Ja.. aber wie kann ich es beheben ?
Können Sie Ihre web.xml Konfiguration?
Geraerts: Aktualisiert den Inhalt mit web.xml

InformationsquelleAutor Vicky | 2014-03-13

Schreibe einen Kommentar