[jbosstools-issues] [JBoss JIRA] (JBIDE-25674) NPE in JolokiaConnectionWrapper.extractStatus

Aurélien Pupier (JIRA) issues at jboss.org
Thu Feb 1 04:44:00 EST 2018


    [ https://issues.jboss.org/browse/JBIDE-25674?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13527099#comment-13527099 ] 

Aurélien Pupier edited comment on JBIDE-25674 at 2/1/18 4:43 AM:
-----------------------------------------------------------------

the request used is
{quote}POST https://camel-ose-springboot-xml-fis-simple-without-devtool.192.168.1.14.nip.io:8443/api/v1/namespaces/fis-simple-without-devtool/pods/https:camel-ose-springboot-xml-1-qd9gh:8778/proxy/jolokia/ HTTP/1.1{quote}

I would have expected a header with the bearer token  !image-2018-02-01-10-43-00-504.png|thumbnail! 

The response is:
HttpResponseProxy{HTTP/1.1 503 Service Unavailable [Cache-Control: no-store, Date: Wed, 31 Jan 2018 13:02:44 GMT, Content-Length: 92, Content-Type: text/plain; charset=utf-8, Connection: close] ResponseEntityProxy{[Content-Type: text/plain; charset=utf-8,Content-Length: 92,Chunked: false]}}

The parse exception is:
{noformat}
Unexpected character (E) at position 0.
	at org.json.simple.parser.Yylex.yylex(Yylex.java:610)
	at org.json.simple.parser.JSONParser.nextToken(JSONParser.java:269)
	at org.json.simple.parser.JSONParser.parse(JSONParser.java:118)
	at org.json.simple.parser.JSONParser.parse(JSONParser.java:92)
	at org.jolokia.client.request.J4pRequestHandler.extractJsonResponse(J4pRequestHandler.java:160)
	at org.jolokia.client.J4pClient.extractJsonResponse(J4pClient.java:270)
	at org.jolokia.client.J4pClient.execute(J4pClient.java:191)
	at org.jolokia.client.J4pClient.execute(J4pClient.java:168)
	at org.jolokia.client.J4pClient.execute(J4pClient.java:150)
	at org.jboss.tools.jmx.jolokia.JolokiaConnectionWrapper.verifyServerReachable(JolokiaConnectionWrapper.java:311)
	at org.jboss.tools.jmx.jolokia.JolokiaConnectionWrapper.connect(JolokiaConnectionWrapper.java:113)
	at org.jboss.tools.jmx.core.ConnectJob.run(ConnectJob.java:29)
	at org.jboss.tools.jmx.ui.internal.actions.DoubleClickAction$1.run(DoubleClickAction.java:71)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
{noformat}


was (Author: aurelien.pupier):
the request used is POST https://camel-ose-springboot-xml-fis-simple-without-devtool.192.168.1.14.nip.io:8443/api/v1/namespaces/fis-simple-without-devtool/pods/https:camel-ose-springboot-xml-1-qd9gh:8778/proxy/jolokia/ HTTP/1.1

The response is:
HttpResponseProxy{HTTP/1.1 503 Service Unavailable [Cache-Control: no-store, Date: Wed, 31 Jan 2018 13:02:44 GMT, Content-Length: 92, Content-Type: text/plain; charset=utf-8, Connection: close] ResponseEntityProxy{[Content-Type: text/plain; charset=utf-8,Content-Length: 92,Chunked: false]}}

The parse exception is:
{noformat}
Unexpected character (E) at position 0.
	at org.json.simple.parser.Yylex.yylex(Yylex.java:610)
	at org.json.simple.parser.JSONParser.nextToken(JSONParser.java:269)
	at org.json.simple.parser.JSONParser.parse(JSONParser.java:118)
	at org.json.simple.parser.JSONParser.parse(JSONParser.java:92)
	at org.jolokia.client.request.J4pRequestHandler.extractJsonResponse(J4pRequestHandler.java:160)
	at org.jolokia.client.J4pClient.extractJsonResponse(J4pClient.java:270)
	at org.jolokia.client.J4pClient.execute(J4pClient.java:191)
	at org.jolokia.client.J4pClient.execute(J4pClient.java:168)
	at org.jolokia.client.J4pClient.execute(J4pClient.java:150)
	at org.jboss.tools.jmx.jolokia.JolokiaConnectionWrapper.verifyServerReachable(JolokiaConnectionWrapper.java:311)
	at org.jboss.tools.jmx.jolokia.JolokiaConnectionWrapper.connect(JolokiaConnectionWrapper.java:113)
	at org.jboss.tools.jmx.core.ConnectJob.run(ConnectJob.java:29)
	at org.jboss.tools.jmx.ui.internal.actions.DoubleClickAction$1.run(DoubleClickAction.java:71)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
{noformat}

> NPE in JolokiaConnectionWrapper.extractStatus
> ---------------------------------------------
>
>                 Key: JBIDE-25674
>                 URL: https://issues.jboss.org/browse/JBIDE-25674
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: jmx
>            Reporter: Aurélien Pupier
>            Assignee: Rob Stryker
>             Fix For: 4.5.3.AM2
>
>         Attachments: image-2018-02-01-10-43-00-504.png
>
>
> {noformat}
> !ENTRY org.eclipse.core.jobs 4 2 2018-01-29 15:56:34.020
> !MESSAGE An internal error occurred during: "Connect Job".
> !STACK 0
> java.lang.NullPointerException
> 	at org.jboss.tools.jmx.jolokia.JolokiaConnectionWrapper.extractStatus(JolokiaConnectionWrapper.java:340)
> 	at org.jboss.tools.jmx.jolokia.JolokiaConnectionWrapper.verifyServerReachable(JolokiaConnectionWrapper.java:324)
> 	at org.jboss.tools.jmx.jolokia.JolokiaConnectionWrapper.connect(JolokiaConnectionWrapper.java:113)
> 	at org.jboss.tools.jmx.core.ConnectJob.run(ConnectJob.java:29)
> 	at org.jboss.tools.jmx.ui.internal.actions.DoubleClickAction$1.run(DoubleClickAction.java:71)
> 	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
> {noformat}
> I put a breakpoint in org.jboss.tools.jmx.jolokia.JolokiaConnectionWrapper.verifyServerReachable() to see which exception it was and it is a "503 Service Unavailable"
> in this case the "response" is null
> 2 possibilities:
> - it is normal that it is null in this case Jboss Tools need to handle this case
> - it is not normal that it is null and in this case, it needs to be reported upstream (even if a null check might nice as a workaround for now)



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)



More information about the jbosstools-issues mailing list