You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by "Jasper Spoel (JIRA)" <ji...@apache.org> on 2008/06/24 00:45:45 UTC

[jira] Reopened: (SYNAPSE-365) REST support not working in synapse 1.2

     [ https://issues.apache.org/jira/browse/SYNAPSE-365?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jasper Spoel reopened SYNAPSE-365:
----------------------------------


Hi, i saw the change coming by and built the snapshot.
However, with exactly the same configuration as in the original problem, i now encounter a way more severe issue.
Synapse simply is locked up in an endless loop of null pointer exceptions.
Following is a piece of Debug output in the logs:

2008-06-24 00:36:50,215 [10.0.0.12-equilibrium.local] [I/O dispatcher 5] DEBUG ServerHandler HTTP connection [/0:0:0:0:0:0:0:1%0:52423]: Connected
2008-06-24 00:36:50,234 [10.0.0.12-equilibrium.local] [I/O dispatcher 5] DEBUG ServerHandler HTTP connection [/0:0:0:0:0:0:0:1%0:52423]: GET /soap/Forwarder/mediate HTTP/1.1
2008-06-24 00:36:50,271 [10.0.0.12-equilibrium.local] [I/O dispatcher 5] DEBUG headers >> GET /soap/Forwarder/mediate HTTP/1.1
2008-06-24 00:36:50,271 [10.0.0.12-equilibrium.local] [I/O dispatcher 5] DEBUG headers >> User-Agent: curl/7.16.3 (powerpc-apple-darwin9.0) libcurl/7.16.3 OpenSSL/0.9.7l zlib/1.2.3
2008-06-24 00:36:50,272 [10.0.0.12-equilibrium.local] [I/O dispatcher 5] DEBUG headers >> Host: localhost:8280
2008-06-24 00:36:50,272 [10.0.0.12-equilibrium.local] [I/O dispatcher 5] DEBUG headers >> Accept: */*
2008-06-24 00:36:50,272 [10.0.0.12-equilibrium.local] [I/O dispatcher 5] DEBUG headers >> Content-Type:text/xml
2008-06-24 00:36:50,317 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG ProxyServiceMessageReceiver Proxy Service Forwarder received a new message from : 0:0:0:0:0:0:0:1%0
2008-06-24 00:36:50,318 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG ProxyServiceMessageReceiver Message To: /soap/Forwarder/mediate
2008-06-24 00:36:50,318 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG ProxyServiceMessageReceiver SOAPAction: null
2008-06-24 00:36:50,318 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG ProxyServiceMessageReceiver WSA-Action: null
2008-06-24 00:36:50,326 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG ProxyServiceMessageReceiver Forwarding the message to the anonymous endpoint of the proxy service
2008-06-24 00:36:50,326 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG AddressEndpoint Start : Address Endpoint
2008-06-24 00:36:50,327 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG AddressEndpoint Sending message to endpoint : AnonymousEndpoint resolves to address = http://10.0.0.12:11111/MyService/echo
2008-06-24 00:36:50,327 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG AddressEndpoint SOAPAction: null
2008-06-24 00:36:50,328 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG AddressEndpoint WSA-Action: null
2008-06-24 00:36:50,334 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG Axis2FlexibleMEPClient Sending [add = false] [sec = false] [rm = false] [mtom = false] [swa = false] [format = get] [force soap11=false] [force soap12=false] [pox=false] [get=true] [encoding=null] [to Address: /soap/Forwarder/mediate]
2008-06-24 00:36:50,362 [10.0.0.12-equilibrium.local] [HttpServerWorker-1]  INFO TimeoutHandler This engine will expire all callbacks after : 86400 seconds, irrespective of the timeout action, after the specified or optional timeout
2008-06-24 00:36:50,372 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG SynapseCallbackReceiver Callback added. Total callbacks waiting for : 1
2008-06-24 00:36:50,393 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG ConnectionPool No connections available for reuse
2008-06-24 00:36:50,395 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG HttpCoreNIOSender A new connection established to : 10.0.0.12:8081
2008-06-24 00:36:50,396 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG Axis2HttpRequest start streaming outgoing http request
2008-06-24 00:36:50,407 [10.0.0.12-equilibrium.local] [I/O dispatcher 3] DEBUG ClientHandler HTTP connection [/10.0.0.12:11111]: Connected (org.apache.synapse.transport.nhttp.Axis2HttpRequest@b278f1)
2008-06-24 00:36:50,407 [10.0.0.12-equilibrium.local] [I/O dispatcher 3] DEBUG ClientHandler ClientHandler connected : [/10.0.0.12:11111]
2008-06-24 00:36:50,417 [10.0.0.12-equilibrium.local] [I/O dispatcher 3] DEBUG headers >> GET /MyService/echo/mediate HTTP/1.1
2008-06-24 00:36:50,417 [10.0.0.12-equilibrium.local] [I/O dispatcher 3] DEBUG headers >> Host: localhost:8280
2008-06-24 00:36:50,418 [10.0.0.12-equilibrium.local] [I/O dispatcher 3] DEBUG headers >> Accept: */*
2008-06-24 00:36:50,418 [10.0.0.12-equilibrium.local] [I/O dispatcher 3] DEBUG headers >> Content-Type: application/x-www-form-urlencoded; charset=UTF-8
2008-06-24 00:36:50,419 [10.0.0.12-equilibrium.local] [I/O dispatcher 3] DEBUG headers >> Connection: Keep-Alive
2008-06-24 00:36:50,419 [10.0.0.12-equilibrium.local] [I/O dispatcher 3] DEBUG headers >> User-Agent: Synapse-HttpComponents-NIO
2008-06-24 00:36:50,422 [10.0.0.12-equilibrium.local] [I/O dispatcher 3] DEBUG ClientHandler HTTP connection [/10.0.0.12:11111]: Request ready
2008-06-24 00:36:50,429 [10.0.0.12-equilibrium.local] [I/O dispatcher 3] DEBUG ClientHandler HTTP connection [/10.0.0.12:11111]: HTTP/1.1 400 Bad Request
2008-06-24 00:36:50,429 [10.0.0.12-equilibrium.local] [I/O dispatcher 3] ERROR ClientHandler Received bad request: Bad Request
2008-06-24 00:36:50,430 [10.0.0.12-equilibrium.local] [I/O dispatcher 3] DEBUG headers << HTTP/1.1 400 Bad Request
2008-06-24 00:36:50,430 [10.0.0.12-equilibrium.local] [I/O dispatcher 3] DEBUG headers << Content-Type: text/html; charset=us-ascii
2008-06-24 00:36:50,430 [10.0.0.12-equilibrium.local] [I/O dispatcher 3] DEBUG headers << Server: Mono-HTTPAPI/1.0
2008-06-24 00:36:50,431 [10.0.0.12-equilibrium.local] [I/O dispatcher 3] DEBUG headers << Date: Mon, 23 Jun 2008 22:36:50 GMT
2008-06-24 00:36:50,431 [10.0.0.12-equilibrium.local] [I/O dispatcher 3] DEBUG headers << Content-Length: 35
2008-06-24 00:36:50,431 [10.0.0.12-equilibrium.local] [I/O dispatcher 3] DEBUG headers << Connection: close

[The part following after this is the part that keeps repeating]

2008-06-24 00:36:50,432 [10.0.0.12-equilibrium.local] [I/O dispatcher 3] DEBUG ClientHandler HTTP connection [/10.0.0.12:11111]: Input ready
2008-06-24 00:36:50,434 [10.0.0.12-equilibrium.local] [I/O dispatcher 3]  WARN HttpCoreNIOSender System may be unstable: IOReactor encountered a runtime exception : null
java.lang.NullPointerException
	at org.apache.synapse.transport.nhttp.ClientHandler.inputReady(ClientHandler.java:321)
	at org.apache.synapse.transport.nhttp.LoggingNHttpClientHandler.inputReady(LoggingNHttpClientHandler.java:124)
	at org.apache.http.impl.nio.DefaultNHttpClientConnection.consumeInput(DefaultNHttpClientConnection.java:135)
	at org.apache.synapse.transport.nhttp.LoggingNHttpClientIOTarget.consumeInput(LoggingNHttpClientIOTarget.java:155)
	at org.apache.http.impl.nio.DefaultClientIOEventDispatch.inputReady(DefaultClientIOEventDispatch.java:99)
	at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:98)
	at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:195)
	at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:180)
	at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:142)
	at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:70)
	at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:318)
	at java.lang.Thread.run(Thread.java:613)

> REST support not working in synapse 1.2
> ---------------------------------------
>
>                 Key: SYNAPSE-365
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-365
>             Project: Synapse
>          Issue Type: Bug
>          Components: Endpoints, Proxy Services, Transports
>            Reporter: Jasper Spoel
>            Assignee: Ruwan Linton
>             Fix For: NIGHTLY
>
>
> When submitting a GET request to a synapse proxy service that points to a REST webservice
> AND Content-Type is not text/xml or application/xml the error: "Cannot create DocumentElement without destination EPR" comes out. (e.g try to approach the service proxy with a webbrowers and it will do this)
> configuration is as follows:
> <definitions xmlns="http://ws.apache.org/ns/synapse">
>   <proxy name="Forwarder">
>       <target>
>           <endpoint>
>               <address uri="http://localhost:11111/MyService/echo" format="get"/>
>           </endpoint>
>           <outSequence>
>               <send/>
>           </outSequence>
>       </target>
>   </proxy>
> </definitions>
> If the message is send with the 'correct' content-type like for example so: 
> curl -G -H "Content-Type: text/xml" http://localhost:8280/Forwarder/mediate
> Synapse gives me the following output:
> 2008-06-18 15:10:59,714 [10.0.0.12-equilibrium.local] [I/O dispatcher 5] DEBUG ServerHandler HTTP connection [/0:0:0:0:0:0:0:1%0:56697]: Connected
> 2008-06-18 15:10:59,732 [10.0.0.12-equilibrium.local] [I/O dispatcher 5] DEBUG ServerHandler HTTP connection [/0:0:0:0:0:0:0:1%0:56697]: GET /soap/Forwarder/mediate HTTP/1.1
> 2008-06-18 15:10:59,780 [10.0.0.12-equilibrium.local] [I/O dispatcher 5] DEBUG headers >> GET /soap/Forwarder/mediate HTTP/1.1
> 2008-06-18 15:10:59,780 [10.0.0.12-equilibrium.local] [I/O dispatcher 5] DEBUG headers >> User-Agent: curl/7.16.3 (powerpc-apple-darwin9.0) libcurl/7.16.3 OpenSSL/0.9.7l zlib/1.2.3
> 2008-06-18 15:10:59,780 [10.0.0.12-equilibrium.local] [I/O dispatcher 5] DEBUG headers >> Host: localhost:8280
> 2008-06-18 15:10:59,780 [10.0.0.12-equilibrium.local] [I/O dispatcher 5] DEBUG headers >> Accept: */*
> 2008-06-18 15:10:59,780 [10.0.0.12-equilibrium.local] [I/O dispatcher 5] DEBUG headers >> Content-Type:application/xml
> 2008-06-18 15:10:59,797 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG TransportUtils createSOAPEnvelope using Builder (class org.apache.axis2.builder.ApplicationXMLBuilder) selected from type (application/xml)
> 2008-06-18 15:10:59,841 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG SynapseMessageReceiver Synapse received a new message for message mediation...
> 2008-06-18 15:10:59,841 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG SynapseMessageReceiver Received To: null
> 2008-06-18 15:10:59,841 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG SynapseMessageReceiver SOAPAction: null
> 2008-06-18 15:10:59,843 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG SynapseMessageReceiver WSA-Action: null
> 2008-06-18 15:10:59,845 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG Axis2SynapseEnvironment Injecting MessageContext
> 2008-06-18 15:10:59,845 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG Axis2SynapseEnvironment Using Main Sequence for injected message
> 2008-06-18 15:10:59,845 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG SequenceMediator Start : Sequence <main>
> 2008-06-18 15:10:59,845 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG SequenceMediator Sequence <SequenceMediator> :: mediate()
> 2008-06-18 15:10:59,846 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG LogMediator Start : Log mediator
> 2008-06-18 15:10:59,846 [10.0.0.12-equilibrium.local] [HttpServerWorker-1]  INFO LogMediator To: , MessageID: urn:uuid:27AA6F4DF24676A7641213794659778, Direction: request
> 2008-06-18 15:10:59,846 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG LogMediator End : Log mediator
> 2008-06-18 15:10:59,846 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG DropMediator Start : Drop mediator
> 2008-06-18 15:10:59,852 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG DropMediator End : Drop mediator
> 2008-06-18 15:10:59,852 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG SequenceMediator End : Sequence <main>
> 2008-06-18 15:10:59,853 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG ServerWorker Sending 202 Accepted response for MessageID : urn:uuid:27AA6F4DF24676A7641213794659778 response written : null response will follow : true acked : false forced ack : false
> 2008-06-18 15:10:59,862 [10.0.0.12-equilibrium.local] [I/O dispatcher 5] DEBUG ServerHandler HTTP connection [localhost/0:0:0:0:0:0:0:1%0:56697]: Output ready
> 2008-06-18 15:10:59,863 [10.0.0.12-equilibrium.local] [I/O dispatcher 5] DEBUG ServerHandler HTTP connection [localhost/0:0:0:0:0:0:0:1%0:56697]: Content encoder [chunk-coded; completed: true]
> 2008-06-18 15:10:59,864 [10.0.0.12-equilibrium.local] [I/O dispatcher 5] DEBUG ServerHandler HTTP connection [localhost/0:0:0:0:0:0:0:1%0:56697]: Response ready
> 2008-06-18 15:10:59,865 [10.0.0.12-equilibrium.local] [I/O dispatcher 5] DEBUG ServerHandler HTTP connection [closed]: Closed

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org