Giter VIP home page Giter VIP logo

Comments (15)

naveg avatar naveg commented on June 19, 2024 1

Hmm - I tried that but wound up with a different problem:

java.lang.NoClassDefFoundError: org/glassfish/jersey/server/model/Parameter$Source
        at org.pac4j.jax.rs.jersey.features.Pac4JValueFactoryProvider$Pac4JProfileValueFactoryProvider.<init>(Pac4JValueFactoryProvider.java:62)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)

Before your suggestion I was getting this error, which makes sense (AbstractContainerRequestValueFactory is removed in jersey 2.26)

java.lang.NoClassDefFoundError: org/glassfish/jersey/server/internal/inject/AbstractContainerRequestValueFactory
        at java.base/java.lang.ClassLoader.defineClass1(Native Method)
        at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
        at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
        at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:800)
        at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:698)
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:621)
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:579)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
        at org.pac4j.jax.rs.jersey.features.Pac4JValueFactoryProvider$Binder.<init>(Pac4JValueFactoryProvider.java:169)
        at org.pac4j.jax.rs.jersey.features.Pac4JValueFactoryProvider$Binder.<init>(Pac4JValueFactoryProvider.java:153)
        at org.pac4j.dropwizard.Pac4jBundle.run(Pac4jBundle.java:98)
        at org.pac4j.dropwizard.Pac4jBundle.run(Pac4jBundle.java:35)

from dropwizard-pac4j.

victornoel avatar victornoel commented on June 19, 2024

@naveg normally, at least as a workaround, you should already be able to use the maven dependency management to

  • exclude jersey225-pac4j
  • add jersey-pac4j to the classpath

If you can confirm this works, then some solution should be findable in a more generic manner here I suppose.

from dropwizard-pac4j.

victornoel avatar victornoel commented on June 19, 2024

@naveg ha, I suppose the latest fixes for working with jersey 2.30 is not out yet, see pac4j/jax-rs-pac4j#74. Maybe you could try using the snapshot version to validate it works as expected?

from dropwizard-pac4j.

naveg avatar naveg commented on June 19, 2024

A new error message must be progress...

org.glassfish.hk2.api.UnsatisfiedDependencyException: There was no object available for injection at SystemInjecteeImpl(requiredType=Pac4JValueFactoryProvider$Pac4JProfileValueFactoryProvider,parent=Pac4JValueFactoryProvider$ProfileInjectionResolver,qualifiers={},position=0,optional=false,self=false,unqualified=null,617304845)
        at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:51)
        at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:188)
        at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:205)
        at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:334)
        at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:463)

Looks very similar to some errors posted in pac4j/jax-rs-pac4j#45

from dropwizard-pac4j.

leleuj avatar leleuj commented on June 19, 2024

Keep me posted if a new release is necessary. I plan some major work on jax-rs-pac4j and dropwizard-pac4j (pac4j v4 upgrade) before spring.

from dropwizard-pac4j.

victornoel avatar victornoel commented on June 19, 2024

@naveg I'm not exactly sure what's happening there, sorry
@leleuj apparently there is still a bug if I understand wellโ€ฆ as always I can't take care of it, sorry about that.

from dropwizard-pac4j.

leleuj avatar leleuj commented on June 19, 2024

If someone has the solution, we can fix that now. Otherwise, I'll investigate in a few months...

from dropwizard-pac4j.

sidkalluri avatar sidkalluri commented on June 19, 2024

I'm using jersey 2.29 and I notice the same issue

from dropwizard-pac4j.

richeyh avatar richeyh commented on June 19, 2024

#51
opened though its having build issues(over flowing the log limit in travis) due to hk2 injection issues in the jersey-pac4j library, but it adds full support for Dropwizard 2.x

from dropwizard-pac4j.

leleuj avatar leleuj commented on June 19, 2024

@richeyh thanks for the pull request. We'll need to schedule the Dropwizard v2.x upgrade vs the pac4j v4 upgrade.

from dropwizard-pac4j.

TheWizz avatar TheWizz commented on June 19, 2024

Any news on the Dropwizard v2.x compatibility front?

from dropwizard-pac4j.

leleuj avatar leleuj commented on June 19, 2024

I didn't get any update for my last comment: #51 (comment)

I expect a contribution on this...

from dropwizard-pac4j.

TheWizz avatar TheWizz commented on June 19, 2024

Thanks. I'm not there yet with DW2, but may be able to help out once I take the plunge. Watching #51 meanwhile.

-JM

from dropwizard-pac4j.

richeyh avatar richeyh commented on June 19, 2024

yeah i can open the PR the compatibility issue was dealt with on our end via some exclusions and versions bumps.

<dependency>
    <groupId>org.pac4j</groupId>
    <artifactId>dropwizard-pac4j</artifactId>
    <version>3.0.0</version>
    <exclusions>
        <exclusion>
            <groupId>javax.inject</groupId>
            <artifactId>javax.inject</artifactId>
        </exclusion>
        <exclusion>
            <groupId>org.pac4j</groupId>
            <artifactId>jersey225-pac4j</artifactId>
        </exclusion>
    </exclusions>
</dependency>

<!-- http HeaderClient in specified config.yaml -->
<dependency>
    <groupId>org.pac4j</groupId>
    <artifactId>pac4j-http</artifactId>
    <version>3.8.2</version>
    <scope>runtime</scope>
</dependency>

was the snippet to get around this ill go ahead and update the pr though

from dropwizard-pac4j.

leleuj avatar leleuj commented on June 19, 2024

v5 of dropwizard-pac4j will be based on Dropwizard v2.x.

from dropwizard-pac4j.

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.