javax.ws.rs.ProcessingException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • already connected
    via GitHub by jonathanwl
    ,
  • WS post problem
    via by Eric Jacob,
  • db:: 4.38::502 Proxy error, URL is invalid 71
    via by Unknown author,
  • http://ws.apache.org/xmlrpc/apidocs/org/apache/xmlrpc/client/XmlRpcClient.html says: ---------- A configured XmlRpcClient object is thread safe: In other words, the suggested use is, that you configure the client using setTransportFactory(XmlRpcTransportFactory) and similar methods, store it in a field and never modify it again. Without modifications, the client may be used for an arbitrary number of concurrent requests. ---------- I have a simple test case that creates two threads that share a single XmlRpcClient instance, and if I run the test I see the following errors: ---------- Fatal Error] :1:1: Content is not allowed in prolog. operation failed, Failed to parse server's response: Content is not allowed in prolog. [Fatal Error] :1:10: Element type "xlvrsion" must be followed by either attribute specifications, ">" or "/>". operation failed, Failed to parse server's response: Element type "xlvrsion" must be followed by either attribute specifications, ">" or "/>". ---------- ---------- [Fatal Error] :1:1: Content is not allowed in prolog. [Fatal Error] :1:5: Element type "xlv" must be followed by either attribute specifications, ">" or "/>". operation failed, Failed to parse server's response: Element type "xlv" must be followed by either attribute specifications, ">" or "/>". operation failed, Failed to parse server's response: Content is not allowed in prolog. ---------- If I wrap the call to XmlRpcClient.execute with a synchronized block that locks on the XmlRpcClient object, the code works fine. It looks like the execute code is not locking around the read/write to/from the server, so the threads are competing to read the response from the server, and are tripping over each other.
    via by Alan Burlison,
    • javax.ws.rs.ProcessingException: Already connected at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:264) at org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:684) at org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:681) at org.glassfish.jersey.internal.Errors.process(Errors.java:315) at org.glassfish.jersey.internal.Errors.process(Errors.java:297) at org.glassfish.jersey.internal.Errors.process(Errors.java:228) at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:444) at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:681) at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:437) at org.glassfish.jersey.client.JerseyInvocation$Builder.post(JerseyInvocation.java:343) at api.zabbix.ZabbixAPIAccess.getResponse(ZabbixAPIAccess.java:76) at api.zabbix.ZabbixAPIAccess.getToken(ZabbixAPIAccess.java:82) at api.zabbix.ZabbixAPIAccess.request(ZabbixAPIAccess.java:41) at api.zabbix.ZabbixAPIAccess.request(ZabbixAPIAccess.java:51) at api.zabbix.Main.main(Main.java:24) Caused by: java.lang.IllegalStateException: Already connected at sun.net.www.protocol.http.HttpURLConnection.setRequestProperty(HttpURLConnection.java:3014) at sun.net.www.protocol.https.HttpsURLConnectionImpl.setRequestProperty(HttpsURLConnectionImpl.java:316) at org.glassfish.jersey.client.internal.HttpUrlConnector.setOutboundHeaders(HttpUrlConnector.java:421) at org.glassfish.jersey.client.internal.HttpUrlConnector.access$100(HttpUrlConnector.java:96) at org.glassfish.jersey.client.internal.HttpUrlConnector$4.getOutputStream(HttpUrlConnector.java:384) at org.glassfish.jersey.message.internal.CommittingOutputStream.commitStream(CommittingOutputStream.java:200) at org.glassfish.jersey.message.internal.CommittingOutputStream.commitStream(CommittingOutputStream.java:194) at org.glassfish.jersey.message.internal.CommittingOutputStream.commit(CommittingOutputStream.java:262) at org.glassfish.jersey.message.internal.OutboundMessageContext.commitStream(OutboundMessageContext.java:816) at org.glassfish.jersey.client.ClientRequest.writeEntity(ClientRequest.java:545) at org.glassfish.jersey.client.internal.HttpUrlConnector._apply(HttpUrlConnector.java:388) at org.glassfish.jersey.client.internal.HttpUrlConnector.apply(HttpUrlConnector.java:285) at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:255) ... 14 more

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor3 times, last one,
    10 more bugmates