atmosphere-samples icon indicating copy to clipboard operation
atmosphere-samples copied to clipboard

Jackson has problems with similar method signatures

Open Dawuid opened this issue 8 years ago • 3 comments

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 avatar Mar 03 '16 16:03 Dawuid

@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.

elakito avatar Apr 08 '16 23:04 elakito

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.

Dawuid avatar Apr 13 '16 06:04 Dawuid

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 =)

Dawuid avatar Apr 21 '16 13:04 Dawuid