2012-04-05 44 views
1

tomcat5安裝在cent OS上。我的戰爭檔案無法啓動。我正在使用JAX-WS Web服務。 Catlina.out顯示以下日誌在tomcat5上的應用無法啓動

我有以下的Java版本

java version "1.6.0_22" 
OpenJDK Runtime Environment (IcedTea6 1.10.6) (rhel-1.25.1.10.6.el5_8-i386) 
OpenJDK Server VM (build 20.0-b11, mixed mode) 


SEVERE: Exception sending context initialized event to listener instance of class 

com.sun.xml.ws.transport.http.servlet.WSServletContextListener 
com.sun.xml.ws.transport.http.servlet.WSServletException: WSSERVLET11: failed to parse runtime descriptor: java.lang.IllegalArgumentException: prefix cannot be "null" when creating a QName 


    at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:139) 
     at org.apache.catalina.core.StandardContext.listenerStart(catalina-5.5.23.jar.so) 
     at org.apache.catalina.core.StandardContext.start(catalina-5.5.23.jar.so) 
     at org.apache.catalina.manager.ManagerServlet.start(catalina-manager-5.5.23.jar.so) 
     at org.apache.catalina.manager.HTMLManagerServlet.start(catalina-manager-5.5.23.jar.so) 
     at org.apache.catalina.manager.HTMLManagerServlet.doGet(catalina-manager-5.5.23.jar.so) 
     at javax.servlet.http.HttpServlet.service(tomcat5-servlet-2.4-api-5.5.23.jar.so) 
     at javax.servlet.http.HttpServlet.service(tomcat5-servlet-2.4-api-5.5.23.jar.so) 
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(catalina-5.5.23.jar.so) 
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(catalina-5.5.23.jar.so) 
     at org.apache.catalina.core.StandardWrapperValve.invoke(catalina-5.5.23.jar.so) 
     at org.apache.catalina.core.StandardContextValve.invoke(catalina-5.5.23.jar.so) 
     at org.apache.catalina.authenticator.AuthenticatorBase.invoke(catalina-5.5.23.jar.so) 
     at org.apache.catalina.core.StandardHostValve.invoke(catalina-5.5.23.jar.so) 
     at org.apache.catalina.valves.ErrorReportValve.invoke(catalina-5.5.23.jar.so) 
     at org.apache.catalina.core.StandardEngineValve.invoke(catalina-5.5.23.jar.so) 
     at org.apache.catalina.connector.CoyoteAdapter.service(catalina-5.5.23.jar.so) 
     at org.apache.coyote.http11.Http11Processor.process(tomcat-http-5.5.23.jar.so) 
     at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(tomcat-http-5.5.23.jar.so) 
     at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(tomcat-util-5.5.23.jar.so) 
     at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(tomcat-util-5.5.23.jar.so) 
     at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(tomcat-util-5.5.23.jar.so) 
     at java.lang.Thread.run(libgcj.so.7rh) 
    Caused by: java.lang.IllegalArgumentException: prefix cannot be "null" when creating a QName 
     at javax.xml.namespace.QName.<init>(xml-commons-apis-1.3.02.jar.so) 
     at gnu.xml.stream.XMLParser.getAttributeName(libgcj.so.7rh) 
     at com.sun.xml.ws.util.xml.XMLStreamReaderFilter.getAttributeName(XMLStreamReaderFilter.java:228) 

    at com.sun.xml.ws.streaming.XMLStreamReaderUtil$AttributesImpl.<init>(XMLStreamReaderUtil.java:355) 
    at com.sun.xml.ws.streaming.XMLStreamReaderUtil.getAttributes(XMLStreamReaderUtil.java:198) 
    at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:204) 
    at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:147) 
    at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:124) 
    ...22 more 

請人幫助我走出這個問題。 web.xml中

<?xml version="1.0" encoding="UTF-8"?> 
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     xmlns="http://java.sun.com/xml/ns/javaee" 
     xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee `http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
     id="WebApp_ID" version="2.5">` 

<listener> 
    <listener-class> 
      com.sun.xml.ws.transport.http.servlet.WSServletContextListener 
    </listener-class> 
</listener> 
<servlet> 
    <servlet-name>fileserver</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>fileserver</servlet-name> 
    <url-pattern>/fileserver</url-pattern> 
</servlet-mapping> 
<session-config> 
    <session-timeout>120</session-timeout> 
</session-config> 

<display-name>FrostBoxServer</display-name> 
<welcome-file-list> 
    <welcome-file>index.html</welcome-file> 
    <welcome-file>index.htm</welcome-file> 
    <welcome-file>index.jsp</welcome-file> 
    <welcome-file>default.html</welcome-file> 
    <welcome-file>default.htm</welcome-file> 
    <welcome-file>default.jsp</welcome-file> 
</welcome-file-list> 
</web-app> 

太陽javax.xml

<?xml version="1.0" encoding="UTF-8"?> 
<endpoints 
    xmlns="http://java.sun.com/xml/ns/jax-ws/ri/runtime" 
    version="2.0"> 
    <endpoint 
     name="FileService" 
     implementation="org.tml.ws.FileServiceImpl" 
     url-pattern="/fileserver"/> 
</endpoints> 
+0

你可以發佈* web.xml *的內容嗎? – vacuum 2012-04-05 09:34:19

+0

和sun-jaxws.xml,請。 – Carlo 2012-04-05 09:35:10

+1

編輯:與web.xml和sun-javax.xml的內容 – Asghar 2012-04-05 10:31:20

回答

0

嘗試切換到sun-jdk而不是open-jdk。

+0

我不認爲這個問題將由於開放jdk。是嗎? – Asghar 2012-04-05 11:48:03

+1

我不能說是否肯定,但最有可能的原因。注意堆棧跟蹤中的com.sun.xml低於 由java.lang.IllegalArgumentException引起:在javax.xml.namespace.QName處創建QName 時,前綴不能爲「null」。 (xml-commons-apis-1.3.02.jar.so) at gnu.xml.stream.XMLParser.getAttributeName(libgcj.so.7rh) at com.sun.xml.ws.util.xml.XMLStreamReaderFilter。 getAttributeName(XMLStream – sfk 2012-04-05 11:53:31

0

根據this的 內容:它可能是與缺少庫問題。你是否檢查過需求庫在你的類路徑中?

+0

。什麼庫缺少 – Asghar 2012-04-05 10:39:23

0

將版本更改爲tomcat 7並用sun-jdk替換open-jdk。問題解決了。感謝大家。

相關問題