Question

tomcat5 installed on cent OS. my war files fails to start. i am using JAX-WS web services. Catlina.out show the following log

i have following java version

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

Please anybody help me to get out of this problem. contents of 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>

and sun-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>
Was it helpful?

Solution

Try switching to sun-jdk instead of open-jdk.

OTHER TIPS

According to this: it could be a problem related to missing libraries. Did you checked that the requireds libs are in your classpath?

Changing version to tomcat 7 and replacing open-jdk with sun-jdk. problem was resolved. thanks everyone.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top