Re:Java REST framework Dropwizard 1.0 released
by i2shar on Wednesday July 27, 2016 @04:29AM
(#12171298)
Classpath issues such as yours are very common in Java. I suppose that's why building a fat jar is part of the getting started section of the docs.
Re:Java REST framework Dropwizard 1.0 released
by einrealist on Wednesday July 27, 2016 @06:06AM
(#12171630)
Although it is very easy to add dependencies via Maven or Gradle, this does not prevent you from shooting yourself into the foot. You have to manage dependencies, including transitive ones. If the application has too many conflicting dependencies, then use classloader isolation (e.g. OSGi).
It is a littlebit sad, that there are no javac warnings enabled by default that at least check known classes for conflicts in the classpath. An IDE should do that by default, too.
Re:Java REST framework Dropwizard 1.0 released
by quicksilver03 on Wednesday July 27, 2016 @04:35AM
(#12171320)
That's 100% Eclipse's fault however, nothing to do with Jersey or Jackson.
Re:Java REST framework Dropwizard 1.0 released
by sorokod on Wednesday July 27, 2016 @07:38AM
(#12171963)
That's dynamic linking for you - you need to take the good with the bad
Re:Java REST framework Dropwizard 1.0 released
by StreamBright on Wednesday July 27, 2016 @05:10AM
(#12171437)
You just pointed out how a feature missing in your tooling can lead to problems. This has nothing to do with Dropwizard though.
This was because that package depends on a different version of jersey-jackson or whatever, which was discovered by classpath scanning, and so because Eclipse doesn't keep a separate test classpath, we'd be discovering a new MessageBodyWriter which Jersey would be using to override the Dropwizard supplied MessageBodyWriter, which would not have the appropriate Jackson modules.
It was a mess.