Probably don't need Jersey. Will have some time to investigate now. I just
knew that if I took that version, it would be compatible, rather than
having to hunt through and work out which version to use. ;)

M.
.


On Tue, 18 Jun 2019 at 19:57, Mike Jumper <[email protected]> wrote:

> On Tue, Jun 18, 2019 at 10:30 AM Mark Nolan <[email protected]> wrote:
>
> > There were no other errors at all!
> >
> > For a moment I was very excited that I might have forgotten to update
> that
> > dependency, but I hadn't been that stupid (wouldn't have been the first
> > time!). I didn't know whether to be relieved or frustrated!
> >
> > Anyway, I created a minimal version and went through it all bit by bit.
> The
> > problem was that I had another version of the JAX-RS api in the pom:
> >
> > <dependency>
> >     <groupId>org.glassfish.jersey.media</groupId>
> >     <artifactId>jersey-media-json-jackson</artifactId>
> >     <version>2.27</version>
> > </dependency>
> >
> > Need this to get a much more up to date version of Jackson and,
> > conveniently, it also allowed the JAX-RS annotations to compile.
> >
>
> As it's the Guacamole webapp that will be using the base parts of Jersey,
> this may be causing trouble.
>
>
> >
> > This worked fine in 0.9.14, but not in 1.0.0. Not really sure why that
> > should have changed.
> >
>
> My guess would be that including this previously had no effect, with your
> extension actually using the classes exposed by the webapp. Part of the
> changes for 1.0.0 included giving extensions priority for classes on the
> classpath, allowing extensions to use different versions of classes
> internally even if the webapp uses the same library. That may not work as
> expected for something like Jersey.
>
> See:
> http://guacamole.apache.org/releases/1.0.0/#improvements-to-extension-api
> ("... Dependency
> precedence has been updated so that extensions always see the classes they
> bundle, even if the web application bundles a different version of the same
> class. ...")
>
> Are you sure you need to include Jersey in your dependencies? I've normally
> used the following to make JAX-RS annotations available within an extension
> and let the webapp handle the rest:
>
>         <dependency>
>             <groupId>javax.ws.rs</groupId>
>             <artifactId>jsr311-api</artifactId>
>             <version>1.1.1</version>
>             <scope>provided</scope>
>         </dependency>
>
> - Mike
>

Reply via email to