2012-04-05 57 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。问题解决了。感谢大家。

相关问题