2013-04-01 53 views
0

我正在迁移要使用Maven构建和部署的应用程序。它部署在WebSphere 7上。我已经成功部署了此应用程序(HTML UI等),但Web服务遇到了问题。使用Maven构建/部署时webservices的WebSphere问题

当我尝试访问Web服务的URL(例如localhost:9000/MyApplication/MyWebServiceProject/MyService)时,我希望看到一个页面,上面写着“Hello,this is a web service!”。

相反,我看到这个异常:

 
[4/1/13 11:49:37:484 EDT] 0000001d WASAxis2Servl E The following exception was encountered while attempting to load the ConfigurationContext for the servlet: com.ibm.ws.websvcs.exception.ConfigurationException: Could not retrieve server module metadata in Axis servlet for module: MyWebServiceProject 
com.ibm.ws.websvcs.exception.ConfigurationException: Could not retrieve server module metadata in Axis servlet for module: MyWebServiceProject 
    at com.ibm.ws.websvcs.transport.http.WASAxis2Servlet.init(WASAxis2Servlet.java:290) 
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:358) 
    at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.init(ServletWrapperImpl.java:171) 
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:739) 
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502) 
    at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:181) 
    at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3935) 
    at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276) 
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931) 
    at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1592) 
    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186) 
    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.HttpICLReadCallback.complete(HttpICLReadCallback.java:83) 
    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:1613) 

我猜有是需要通过Maven的部署Web服务的一些IBM特定的配置,但我不知道它是什么。

<plugin> 
<artifactId>maven-ear-plugin</artifactId> 
<version>2.7</version> 
<configuration> 

    <applicationName>PolicyGatewayEAR</applicationName> 

     <defaultLibBundleDir>lib/</defaultLibBundleDir> 
</configuration> 
</plugin> 
<plugin> 
    <groupId>org.codehaus.mojo</groupId> 
<artifactId>was6-maven-plugin</artifactId> 
<version>1.2</version> 
<executions> 
    <execution> 
    <phase>integration-test</phase> 
    <id>uninstall</id> 
    <goals> 
     <goal>wsUninstallApp</goal> 
    </goals> 
    <configuration> 
     <wasHome>${was7Home}</wasHome> 
     <verbose>false</verbose> 
     <failOnError>false</failOnError> 
     <profileName>was70profile1</profileName> 
     <workingDirectory>${project.build.directory}/was6-maven-plugin</workingDirectory> 
      <applicationName>MyApplication</applicationName> 
    </configuration> 
</execution> 
<execution> 
    <phase>integration-test</phase> 
    <id>installation</id> 
    <goals> 
    <goal>installApp</goal> 
    </goals> 
    <configuration> 
    <wasHome>${was7Home}</wasHome> 
    <verbose>false</verbose> 
    <failOnError>true</failOnError> 
    <updateExisting>false</updateExisting> 
    <profileName>was70profile1</profileName> 
    <workingDirectory>${project.build.directory}/was6-maven-plugin</workingDirectory> 
     <applicationName>MyApplication</applicationName> 
    </configuration> 
</execution> 
</executions> 
</plugin> 

POM片段为Web服务子项目:

从POM的EAR项目的有关章节

 <plugin> 
      <artifactId>maven-war-plugin</artifactId> 
      <version>2.2</version> 
      <configuration> 
       <warSourceDirectory>WebContent</warSourceDirectory> 
       <failOnMissingWebXml>true</failOnMissingWebXml> 
       <warSourceDirectory>WebContent</warSourceDirectory> 
       <packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes> 
       <archive> 
       <manifest> 
        <addClasspath>true</addClasspath> 
        <classpathPrefix>lib/</classpathPrefix> 
       </manifest> 
       </archive> 
      </configuration> 
     </plugin> 

这不是当我部署的一个问题使用RAD(v8.5) - 它只是在我尝试使用Maven构建和部署应用程序时才启动。有谁知道如何解决这个错误?

回答