GithubHelp home page GithubHelp logo

Getting a warning at startup: "It appears jersey2-guice-spi is either not present or in conflict with some other Jar" about dropwizard-guice HOT 14 CLOSED

hubspot avatar hubspot commented on August 24, 2024 3
Getting a warning at startup: "It appears jersey2-guice-spi is either not present or in conflict with some other Jar"

from dropwizard-guice.

Comments (14)

JanMosigItemis avatar JanMosigItemis commented on August 24, 2024

I did also encounter this kind of issue and its really annoying. Is there something that can be done about this? Why does the GuiceBundle force the HK2 ServiceLocator?

from dropwizard-guice.

vmd408 avatar vmd408 commented on August 24, 2024

I'm facing this issue too.

from dropwizard-guice.

jcolaco-nmz avatar jcolaco-nmz commented on August 24, 2024

I'm facing this issue too. I'm also wondering if this is the cause for other problem I'm having:

com.google.inject.OutOfScopeException: Cannot access scoped [javax.servlet.http.HttpServletRequest]

Both only appeared after upgrading to dropwizard 1.0.0 and dropwizard-guice 1.0.0.1

from dropwizard-guice.

ruipinge avatar ruipinge commented on August 24, 2024

+1

from dropwizard-guice.

jdduarte avatar jdduarte commented on August 24, 2024

+1

from dropwizard-guice.

jhaber avatar jhaber commented on August 24, 2024

I'm not sure how if there's a robust way to avoid this. Looking at the jersey2-guice code, it seems like it logs this warning when the first ServiceLocatorGenerator returned from the ServiceLoader isn't an instance of GuiceServiceLocatorGeneratorStub. In this case, it seems to be an instance of ServiceLocatorGeneratorImpl from the hk2-locator artifact. I tried excluding that artifact but that doesn't work because JerseyGuiceUtils references other hk2-locator classes directly so I get a ClassNotFoundException. I was able to sort of hack around this problem in my test application by moving the jersey2-guice-impl dependency to the front of the list, which made the warning stop printing. Can anyone experiencing this issue try running your app against this commit to see if it fixes it for you as well? If so, I'll cut a release with this change

from dropwizard-guice.

ruipinge avatar ruipinge commented on August 24, 2024

@jhaber,

You're talking about this commit right? 5b2e335

Cheers

from dropwizard-guice.

jhaber avatar jhaber commented on August 24, 2024

Yep

from dropwizard-guice.

vmd408 avatar vmd408 commented on August 24, 2024

Can anyone experiencing this issue try running your app against this commit to see if it fixes it for you as well?

Confirm. Thank you for the effort!

from dropwizard-guice.

jcolaco-nmz avatar jcolaco-nmz commented on August 24, 2024

Yup, it fixes it. Thank you 👍

from dropwizard-guice.

jhaber avatar jhaber commented on August 24, 2024

Thanks for confirmation, I just released this change as part of version 1.0.0.2 which should show up in Maven central soon

from dropwizard-guice.

tmwilder avatar tmwilder commented on August 24, 2024

I'm currently experiencing this issue on dropwizard-guice 1.0.0.2.

from dropwizard-guice.

OndraZizka avatar OndraZizka commented on August 24, 2024

I am seeing this with DropWizard 1.3.1. We had to downgrade HK2 because injection to @BeanParam stopped working.

from dropwizard-guice.

hithwen avatar hithwen commented on August 24, 2024

I'm seeing this with dropwizard-guice 1.0.6.0

from dropwizard-guice.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.