Skip to content

[Question] Docs claim jakarta ee compatibility, but doesn't work with Guice ShiroWebModule #2006

@nsoft

Description

@nsoft

Search before asking

  • I had searched in the issues and found no similar issues.

Environment

I have read https://shiro.apache.org/jakarta-ee.html and have the following gradle config:

dependencies {
    compileOnly 'jakarta.servlet:jakarta.servlet-api:5.0.0'
    implementation platform('org.apache.shiro:shiro-bom:2.0.2')
    implementation 'org.apache.shiro:shiro-jakarta-ee:2.0.2'
    implementation 'org.apache.shiro:shiro-core:2.0.2'
    implementation 'org.apache.shiro:shiro-web:2.0.2'
    implementation 'org.apache.shiro:shiro-guice:2.0.2'

    // unrelated deps redacted.

}

If I understood what I read, that's how to get shiro and jakarta-ee playing nicely.

Shiro version

As shown above, I am using Shiro 2.0.2, the current release version

What was the actual outcome?

However my shiro/guice/hibernate app isn't compiling:

Image

This is for a side project that was partly completed stalled and is now being resurrected and at that time I had hacked up a 1.8 shiro to get past this, but I was very much hoping your new Jakarta-ee support meant I didn't need to maintain that fork. At the time I created the fork (several years ago), many libs were lacking jakarta-ee and hacking things was basically the fastest way. Now, this is the only dependency that is giving me jakarta issues, and shiro seems to be trying to be on-board so I'm hoping that either I've missed some (likely obvious) doc somewhere or someone here will be like "Oh whoops, I know what needs to be done" and a reasonably correct fix rather than a blatant copy/paste based hack can be found.

What was the expected outcome?

successful compilation and running.

How to reproduce

  1. Extend ShiroWebModule in any project that only provides jakarta.servlet.* classes
  2. Try to compile.

Debug logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions