Announcement Announcement Module
Collapse
No announcement yet.
Strange Problem Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Strange Problem

    Hi,

    i started a new project and trying to use Spring-WS. Yeah.

    But i hava a strange problem. I'm using JAXB2.
    My web service is called, but at the marshalling i get an error, which i doesn't understand. My testclient get a "500, Internal Server Error" back.
    I have installed a logging and validating interceptor and a endpointExceptionResolver.

    That's my log4j configuration:
    Code:
    log4j.rootLogger=ON,FileAppender
    log4j.logger.de.cas=DEBUG
    log4j.logger.javax.xml.bind=DEBUG
    log4j.category.org.springframework=DEBUG
    log4j.category.org.acegisecurity=DEBUG
    and i get this logging messages.
    Code:
    [...]
    86076 [http-8080-Processor22] DEBUG endpoint.PayloadValidatingInterceptor  - Request message validated
    86076 [http-8080-Processor22] DEBUG soap.SoapMessageDispatcher  - Testing endpoint adapter [org.springframework.ws.endpoint.MessageEndpointAdapter@154ae5a]
    86107 [http-8080-Processor22] DEBUG endpoints.EIMServiceCreateEndpoint  - Unmarshalled payload request to [javax.xml.bind.JAXBElement@127a20c]
    86107 [http-8080-Processor22] DEBUG endpoints.EIMServiceCreateEndpoint  - create web service started.
    86107 [http-8080-Processor22] DEBUG endpoints.EIMServiceCreateEndpoint  - create web service completed.
    86107 [http-8080-Processor22] DEBUG endpoints.EIMServiceCreateEndpoint  - Marshalling [de.cas.eim.schema.CreateResponse@fff2a2] to response payload
    86170 [http-8080-Processor22] DEBUG soap.SoapMessageDispatcher  - Testing endpoint exception resolver [org.springframework.ws.soap.endpoint.SoapFaultMappingExceptionResolver@39b27b]
    86170 [http-8080-Processor22] DEBUG servlet.DispatcherServlet  - Cleared thread-bound request context: org.apache.catalina.connector.RequestFacade@1696e4c
    86170 [http-8080-Processor22] DEBUG servlet.DispatcherServlet  - Could not complete request
    java.lang.IllegalStateException: Response already created
    	at org.springframework.ws.soap.context.AbstractSoapMessageContext.createSoapResponse(AbstractSoapMessageContext.java:51)
    	at org.springframework.ws.soap.endpoint.SoapFaultMappingExceptionResolver.resolveExceptionInternal(SoapFaultMappingExceptionResolver.java:75)
    	at org.springframework.ws.endpoint.AbstractEndpointExceptionResolver.resolveException(AbstractEndpointExceptionResolver.java:61)
    	at org.springframework.ws.MessageDispatcher.processEndpointException(MessageDispatcher.java:360)
    	at org.springframework.ws.MessageDispatcher.dispatch(MessageDispatcher.java:261)
    	at org.springframework.ws.MessageDispatcher.invoke(MessageDispatcher.java:209)
    	at org.springframework.ws.transport.http.MessageHandlerAdapter.handle(MessageHandlerAdapter.java:57)
    	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:796)
    	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:727)
    	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:396)
    	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:360)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
    	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
    	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
    	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    	at java.lang.Thread.run(Unknown Source)
    86170 [http-8080-Processor22] DEBUG support.XmlWebApplicationContext  - Publishing event in context [WebApplicationContext for namespace 'eimws-servlet']: ServletRequestHandledEvent: url=[/eim/services]; client=[127.0.0.1]; method=[POST]; servlet=[eimws]; session=[null]; user=[null]; time=[250ms]; status=[failed: java.lang.IllegalStateException: Response already created]
    86170 [http-8080-Processor22] DEBUG support.XmlWebApplicationContext  - Publishing event in context [Root WebApplicationContext]: ServletRequestHandledEvent: url=[/eim/services]; client=[127.0.0.1]; method=[POST]; servlet=[eimws]; session=[null]; user=[null]; time=[250ms]; status=[failed: java.lang.IllegalStateException: Response already created]
    As you can see, my web service is working fine ("create web service completed" log message). I also added an exception handling around my complete web service code. But there is no exception.
    Any idea what's wrong?
    It's possible that it is a JAXB2 problem. Any idea how to log messages from it? I looked in the jaxb2 docs and forum, but found no answer.

    Cheers,

    Ingo

  • #2
    The problem was that Spring-WS's exception handlers tried to create a response message when a response was already there. That used to throw an exception, but no longer does: it has been fixed in subversion. I'll do a snapshot release later today which contains the fix and all others I've done this week.

    Comment


    • #3
      Wow, that was fast.
      Thank you.
      I'll wait then for the snapshot release.

      Ingo

      Comment

      Working...
      X