WebSphere 8.5中CXF2.5.2+Spring3.0的配置问题

时间:2022-02-24 17:04:17
[8/22/15 13:09:24:399 CST] 00000045 WASSessionCor I SessionContextRegistry getSessionContext SESN0176I: Will create a new session context for application key default_hostUWC
[8/22/15 13:09:24:431 CST] 00000045 jsp           W com.ibm.ws.jsp.webcontainerext.WASJSPExtensionProcessor WASJSPExtensionProcessor Specfied Shared Library jarfile [D:/Java_library/apache-cxf-2.5.2/lib/geronimo-ejb_3.0_spec-1.0.1.jar] does not exist
[8/22/15 13:09:24:433 CST] 00000045 jsp           W com.ibm.ws.jsp.webcontainerext.WASJSPExtensionProcessor WASJSPExtensionProcessor Specfied Shared Library jarfile [D:/Java_library/apache-cxf-2.5.2/lib/org.apache.servicemix.bundles.saaj-impl-1.3.18_1.jar] does not exist
[8/22/15 13:09:24:583 CST] 00000045 FfdcProvider  W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on D:\AIAWorkspace\WASProfile\logs\ffdc\UWC_LOCAL_c3dfb112_15.08.22_13.09.24.554204308141295168644.txt com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadServlet 213
[8/22/15 13:09:24:585 CST] 00000045 webapp        E com.ibm.ws.webcontainer.webapp.WebApp commonInitializationFinally SRVE0266E: Error occured while initializing servlets: {0}
                                 javax.servlet.UnavailableException: SRVE0201E: Servlet [org.apache.cxf.transport.servlet.CXFServlet]: not a servlet class
at com.ibm.ws.webcontainer.servlet.ServletWrapper$1.run(ServletWrapper.java:1486)
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.loadOnStartupCheck(ServletWrapper.java:1339)
at com.ibm.ws.webcontainer.webapp.WebApp.doLoadOnStartupActions(WebApp.java:604)
at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinally(WebApp.java:574)
at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:425)
at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:169)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:749)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:634)
at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:426)
at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:718)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1173)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1370)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:968)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:772)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2175)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:445)
at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:388)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:116)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:994)
at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:349)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1814)

[8/22/15 13:09:24:590 CST] 00000045 webapp        W com.ibm.ws.webcontainer.webapp.WebApp initializeStaticFileHandler SRVE0278E: Error while adding servlet mapping --> /*.


配置文件如下
web.xml
<!-- Spring framework configuration -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/classes/beans-2.5.2.xml,/WEB-INF/classes/cxf-servlet-2.5.2.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- listener>  
        <listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>  
    </listener-->
<servlet>
<description>JAX-RS Tools Generated - Do not modify</description>
<servlet-name>cxf</servlet-name>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
<load-on-startup>1</load-on-startup>
<enabled>true</enabled>
<async-supported>false</async-supported>
</servlet>
<servlet-mapping>
<servlet-name>cxf</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>

beans-2.5.2.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" 
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 xmlns:jaxws="http://cxf.apache.org/jaxws" 
 xmlns:aop="http://www.springframework.org/schema/aop" 
 xmlns:tx="http://www.springframework.org/schema/tx" 
 xsi:schemaLocation="http://www.springframework.org/schema/beans 
   http://www.springframework.org/schema/beans/spring-beans-3.0.xsd 
   http://www.springframework.org/schema/tx 
   http://www.springframework.org/schema/tx/spring-tx-3.0.xsd 
   http://www.springframework.org/schema/aop 
   http://www.springframework.org/schema/aop/spring-aop-3.0.xsd" default-autowire="byName">
</beans>  


cxf-2.5.2.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">

<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />

<jaxws:endpoint 
  id="underwriting" 
  implementor="com.aia.nuwc.services.impl.UnderwritingImpl" 
  address="/underwriting" />
  
</beans>

Application server & Web module Classpath
    <classPath>D:/Java_library/apache-cxf-2.5.2/lib/cxf-2.5.2.jar</classPath>
    <classPath>D:/Java_library/apache-cxf-2.5.2/lib/cxf-manifest.jar</classPath>
    <classPath>D:/Java_library/apache-cxf-2.5.2/lib/xmlschema-core-2.0.1.jar</classPath>
    <classPath>D:/Java_library/apache-cxf-2.5.2/lib/FastInfoset-1.2.9.jar</classPath>
    <classPath>D:/Java_library/apache-cxf-2.5.2/lib/aopalliance-1.0.jar</classPath>
    <classPath>D:/Java_library/apache-cxf-2.5.2/lib/commons-logging-1.1.1.jar</classPath>
    <classPath>D:/Java_library/apache-cxf-2.5.2/lib/geronimo-activation_1.1_spec-1.1.jar</classPath>
    <classPath>D:/Java_library/apache-cxf-2.5.2/lib/geronimo-annotation_1.0_spec-1.1.1.jar</classPath>
    <classPath>D:/Java_library/apache-cxf-2.5.2/lib/geronimo-javamail_1.4_spec-1.7.1.jar</classPath>
    <classPath>D:/Java_library/apache-cxf-2.5.2/lib/geronimo-jaxws_2.2_spec-1.1.jar</classPath>
    <classPath>D:/Java_library/apache-cxf-2.5.2/lib/geronimo-stax-api_1.0_spec-1.0.1.jar</classPath>
    <classPath>D:/Java_library/apache-cxf-2.5.2/lib/geronimo-ws-metadata_2.0_spec-1.1.3.jar</classPath>
    <classPath>D:/Java_library/apache-cxf-2.5.2/lib/geronimo-ejb_3.0_spec-1.0.1.jar</classPath>
    <classPath>D:/Java_library/apache-cxf-2.5.2/lib/neethi-3.0.1.jar</classPath>
    <classPath>D:/Java_library/apache-cxf-2.5.2/lib/org.apache.servicemix.bundles.saaj-impl-1.3.18_1.jar</classPath>
    <classPath>D:/Java_library/apache-cxf-2.5.2/lib/spring-aop-3.0.6.RELEASE.jar</classPath>
    <classPath>D:/Java_library/apache-cxf-2.5.2/lib/spring-asm-3.0.6.RELEASE.jar</classPath>
    <classPath>D:/Java_library/apache-cxf-2.5.2/lib/spring-beans-3.0.6.RELEASE.jar</classPath>
    <classPath>D:/Java_library/apache-cxf-2.5.2/lib/spring-context-3.0.6.RELEASE.jar</classPath>
    <classPath>D:/Java_library/apache-cxf-2.5.2/lib/spring-core-3.0.6.RELEASE.jar</classPath>
    <classPath>D:/Java_library/apache-cxf-2.5.2/lib/spring-expression-3.0.6.RELEASE.jar</classPath>
    <classPath>D:/Java_library/apache-cxf-2.5.2/lib/spring-web-3.0.6.RELEASE.jar</classPath>
    <classPath>D:/Java_library/apache-cxf-2.5.2/lib/stax2-api-3.1.1.jar</classPath>
    <classPath>D:/Java_library/apache-cxf-2.5.2/lib/woodstox-core-asl-4.1.1.jar</classPath>
    <classPath>D:/Java_library/apache-cxf-2.5.2/lib/wsdl4j-1.6.2.jar</classPath>

1 个解决方案

#1


请高手帮忙看看上边的问题,联系电话13910697541

#1


请高手帮忙看看上边的问题,联系电话13910697541