2014-09-28 52 views
1

當我在運行時在我的應用程序中創建一個Jaxws客戶端時,一個weblogic 12c出現以下錯誤。未找到默認配置文件[metro-default.xml]

我不知道它是否是一個錯誤?

java.lang.IllegalStateException: MASM0001: Default configuration file [ metro-default.xml ] was not found 

USNG以下API

<dependency> 
      <groupId>javax.xml.ws</groupId> 
      <artifactId>jaxws-api</artifactId> 
      <version>2.2.8</version> 
     </dependency> 
     <dependency> 
      <groupId>com.sun.xml.ws</groupId> 
      <artifactId>jaxws-rt</artifactId> 
      <version>2.2.7</version> 
     </dependency> 

的weblogic.xml

<?xml version="1.0" encoding="UTF-8"?> 

<wls:weblogic-web-app 
xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd 
http://xmlns.oracle.com/weblogic/weblogic-web-app 
http://xmlns.oracle.com/weblogic/weblogic-web-app/1.2/weblogic-web-app.xsd"> 

    <wls:container-descriptor> 
     <wls:prefer-application-packages> 
      <wls:package-name>com.sun.jersey.*</wls:package-name> 
      <wls:package-name>com.sun.research.ws.wadl.*</wls:package-name> 
      <wls:package-name>com.sun.ws.rs.ext.*</wls:package-name> 

      <wls:package-name>org.codehaus.jackson.*</wls:package-name> 

      <wls:package-name>org.codehaus.jettison.*</wls:package-name> 

      <wls:package-name>org.objectweb.asm.*</wls:package-name> 
     </wls:prefer-application-packages> 
    </wls:container-descriptor> 
    <context-root>path</context-root> 
</wls:weblogic-web-app> 

回答

0

當我已刪除以下從web.xml文件中定義的問題得到解決。

<listener> 
    <listener-class> 
      com.sun.xml.ws.transport.http.servlet.WSServletContextListener 
    </listener-class> </listener> <servlet> 
    <servlet-name>wsuser</servlet-name> 
    <servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class> 
    <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> 
    <servlet-name>wsuser</servlet-name> 
    <url-pattern>/soap/user/wsuser</url-pattern> </servlet-mapping> <session-config> 
    <session-timeout>120</session-timeout> </session-config>