Announcement Announcement Module
Collapse
No announcement yet.
MessageDispatcherServlet is not assignable to Servlet Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • MessageDispatcherServlet is not assignable to Servlet

    Hello,

    I'm trying to create my first Spring WS according to Contract-First Web Services.
    While defining servlet in web.xml I get undersign servlet-class with red error message ""MessageDispatcherServlet is not assignable to Servlet"
    <servlet>
    <servlet-name>spring-ws</servlet-name>
    <servlet-class>org.springframework.ws.transport.http.Messag eDispatcherServlet</servlet-class>
    <init-param>
    <param-name>transformWsdlLocations</param-name>
    <param-value>true</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
    </servlet>

    I'm looking a lot throught internet, and find nothing about this error. Please help what is the prob

    and while I'm trying to start application I'v got exception

    Code:
    javax.servlet.ServletException: Servlet.init() for servlet spring-ws threw exception
    	org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    	org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
    	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    	org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
    	org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
    	org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1805)
    	java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    	java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    	java.lang.Thread.run(Thread.java:662)
    
    root cause
    
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.ws.server.endpoint.adapter.method.SourcePayloadMethodProcessor#0': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.ws.server.endpoint.adapter.method.SourcePayloadMethodProcessor]: Constructor threw exception; nested exception is javax.xml.stream.FactoryFinder$ConfigurationError: Provider com.sun.xml.stream.ZephyrParserFactory not found
    	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:965)
    	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:911)
    	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
    	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
    	org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)

    Thank you.

  • #2
    The error you've mentioned may occur when you have servlet-api.jar in your WEB-INF/lib.
    But the real problem (from the logs you've provided) seem to be:
    Code:
            Provider com.sun.xml.stream.ZephyrParserFactory not found
    regards
    Grzegorz Grzybek

    Comment


    • #3
      Yes, I see, but it dont help me. I think the problem is in configuration. But I dont know what is the problem

      Comment


      • #4
        Just in case, you probably need to add the dependency on the sjsxp which contains the com.sun.xml.stream.ZephyrParserFactory.
        The sjsxp is : Sun Java Streaming XML Parser, the implementation of JSR 173

        With maven, you can found the lib with something like :
        <dependency>
        <groupId>com.sun.xml.stream</groupId>
        <artifactId>sjsxp</artifactId>
        <version>1.0.2</version>
        </dependency>

        Regards,

        Comment

        Working...
        X