atmosphere-samples
atmosphere-samples copied to clipboard
Jackson has problems with similar method signatures
Chat-mutiroom example is not working as expected. Jackson raises exception in decoder when try to decode ChatProtocol. Both setUsers methods are too similar.
@Dawuid as the current sample itself doesn't show this problem (when run with mvn jetty:run, which picks jackson 2.4.1), I am wondering with which jackson version you are seeing the problem.
I was using the version of March 3 (with atmosphere 2.4.2, jackson-core 2.4.1, jackson-databind 2.4.1, jackson-annotation 2.4.0) deployed in a Wildfly 10. I will try again with last version and come back with the results.
Mystery solved. In Wildfly 10, example doesn't work because Wildfly is using internally jackson 2.5.4 (and it's seem that they are publicly exporting such classes in applications classloader, I suppose due to JavaEE json specification). Using directly jackson 2.5+ (tested with 2.5.5, 2.6.6 and 2.7.3) with Jetty, sample doesn't work. So I think Jackson 2.5+ has changed behaviour in bean discovering.
Proposed change works with jetty and jackson 2.4+ (and with Wildfly 9/10).
Extra information: Wildfly 8.2 use jackson 2.4.1 =)