I think I am running into a class path issue trying to utilize Jersey to make rest calls to an external service.
The code ran within Openhab 2 inside docker about a week ago, but has since stopped. Also, it still works when I run openhab within the IDE.
This code runs fine, and logs out the string of xml returned by the rest endpoint
String variables = integerVariablesTarget.request().header(AUTHORIZATIONHEADERNAME, authorizationHeaderValue)
.accept(MediaType.TEXT_XML).get(String.class);
logger.debug("variables string is: " + variables);
However, this following line does not run. It is using the auto-marshaling mechanism in the jersey client libs.
List<Variable> integerVariables = integerVariablesTarget.request()
.header(AUTHORIZATIONHEADERNAME, authorizationHeaderValue).accept(MediaType.APPLICATION_XML_TYPE)
.get(new GenericType<List<Variable>>() {
});
Here is the stack trace.
2017-01-21 09:10:54.634 [ERROR] [sy.discovery.IsyRestDiscoveryService] - error in discover programs
javax.ws.rs.client.ResponseProcessingException
at org.glassfish.jersey.client.JerseyInvocation.translate(JerseyInvocation.java:869)
at org.glassfish.jersey.client.JerseyInvocation.access$800(JerseyInvocation.java:92)
at org.glassfish.jersey.client.JerseyInvocation$3.call(JerseyInvocation.java:722)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)[157:org.glassfish.jersey.core.jersey-common:2.22.2]
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)[157:org.glassfish.jersey.core.jersey-common:2.22.2]
at org.glassfish.jersey.internal.Errors.process(Errors.java:228)[157:org.glassfish.jersey.core.jersey-common:2.22.2]
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:444)[157:org.glassfish.jersey.core.jersey-common:2.22.2]
at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:718)
at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:430)
at org.glassfish.jersey.client.JerseyInvocation$Builder.get(JerseyInvocation.java:321)
at org.openhab.binding.isy.internal.IsyRestClient.recursiveGetPrograms(IsyRestClient.java:90)
I am thinking I am missing some dependency now or the class loading has changed in the recent updates to the Openhab runtime.
Anyone have ideas how I could debug this, I am stumped.
thanks,
craig