Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MQTT-broker plugin raises an exception #353

Open
mcicolella opened this issue Oct 9, 2017 · 10 comments
Open

MQTT-broker plugin raises an exception #353

mcicolella opened this issue Oct 9, 2017 · 10 comments

Comments

@mcicolella
Copy link
Collaborator

When MQTT-broker plugin is running and you click on an object the following exception is raised

Exception in thread "freedomotic-protocol-executor" java.lang.NoSuchMethodError: com.fasterxml.jackson.databind.introspect.AnnotatedMember.getType()Lcom/fasterxml/jackson/databind/JavaType; at com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector._fullSerializationType(JaxbAnnotationIntrospector.java:1637) at com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector._findContentAdapter(JaxbAnnotationIntrospector.java:1588) at com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector.findSerializationContentConverter(JaxbAnnotationIntrospector.java:920) at com.fasterxml.jackson.databind.introspect.AnnotationIntrospectorPair.findSerializationContentConverter(AnnotationIntrospectorPair.java:388) at com.fasterxml.jackson.databind.ser.std.StdSerializer.findConvertingContentSerializer(StdSerializer.java:266) at com.fasterxml.jackson.databind.ser.std.AsArraySerializerBase.createContextual(AsArraySerializerBase.java:197) at com.fasterxml.jackson.databind.SerializerProvider.handleSecondaryContextualization(SerializerProvider.java:944) at com.fasterxml.jackson.databind.SerializerProvider.findValueSerializer(SerializerProvider.java:527) at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.resolve(BeanSerializerBase.java:317) at com.fasterxml.jackson.databind.ser.SerializerCache.addAndResolveNonTypedSerializer(SerializerCache.java:177) at com.fasterxml.jackson.databind.SerializerProvider._createAndCacheUntypedSerializer(SerializerProvider.java:1166) at com.fasterxml.jackson.databind.SerializerProvider.findValueSerializer(SerializerProvider.java:481) at com.fasterxml.jackson.databind.SerializerProvider.findTypedValueSerializer(SerializerProvider.java:679) at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:107) at com.fasterxml.jackson.databind.ObjectMapper._configAndWriteValue(ObjectMapper.java:3559) at com.fasterxml.jackson.databind.ObjectMapper.writeValueAsString(ObjectMapper.java:2927) at com.freedomotic.plugins.devices.restapiv3.resources.atmosphere.AtmosphereObjectChangeResource.broadcast(AtmosphereObjectChangeResource.java:60) at com.freedomotic.plugins.devices.restapiv3.RestAPIv3.onEvent(RestAPIv3.java:127) at com.freedomotic.api.Protocol$ActuatorOnEventRunnable.run(Protocol.java:299) at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) at java.lang.Thread.run(Thread.java:748)

When you remove the plugin the exception is no more present.
Maybe it is caused by a lib version conflict.

@abollaert
Copy link
Contributor

It's probable that the code gets compiled against a different minor than it gets at runtime (assembly). I could have a look at it if you want.

@mcicolella
Copy link
Collaborator Author

@abollaert sure, thanks.

@Larry0ua
Copy link
Contributor

Could anyone explain in short how to reproduce the issue? I've tried locally compiled version of Freedomotic with MQTT-broker plugin installed from marketplace, and did not see any exceptions while clicking on the lamps on the screen. Could the exception be caused by incompatible versions of plugin and core?

@mcicolella
Copy link
Collaborator Author

@Larry0ua have you tried with Windows? I found this problem only with Linux 64bit.

@Larry0ua
Copy link
Contributor

Tried it on Windows only... So I believe my reproducing steps are correct?
Actually that's quite weird to have this issue on Linux, but not on Windows as it's a problem of class packaging and library versions incompatibility and not an environment specific thing.

@mcicolella
Copy link
Collaborator Author

I have other problems only with Linux. For example #272 .

@amenak77
Copy link

It could be windows has a more "permissive" JVM

@amenak77
Copy link

Don't know if this could be a better or worse factor, but linux probably represents a more stable test platform for java projects. Unfortunately I'm not very familiar with it, too

@amenak77
Copy link

Maybe abollaert was right. FasterXML/jackson-module-jaxb-annotations#57

@amenak77
Copy link

https://github.com/jersey/jersey/issues/3783

The exception seems to be from Jackson, where they say its due to an old version of jackson. 2.24 used version 2.5.4, 2.26 is using 2.8.4, 2.27 will use 2.8.10. as commented by jansupol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants