Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Wrong jakarta OSGi imports in main branch #1449

Open
1 task done
marcanpilami opened this issue Apr 30, 2024 · 5 comments
Open
1 task done

[Bug] Wrong jakarta OSGi imports in main branch #1449

marcanpilami opened this issue Apr 30, 2024 · 5 comments
Assignees
Labels
help-wanted Help Wanted jakartaee Jakarta EE
Milestone

Comments

@marcanpilami
Copy link

Search before asking

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

Environment

Apache Felix, OpenJDK 11 or 21

Shiro version

2.0.1-SNAPHOT (built by myself)

What was the actual outcome?

Cannot start the shiro-web bundle. This is a follow-up to #1324 (with a few comments, including a discussion on possible fixes).

The 1324 fix seems to be incomplete: it replaces the javax namespace by a jakarta one inside the manifest, but without changing the version of the import.

For example, the normal package imports javax.annotation.security;version="[1.3,2)". The fix for the jakarta version just renames it to jakarta.annotation.security;version="[1.3,2)".

However, Jakarta never released a 1.3.x bundle containing jakarta.* package - they only released a transition bundle containing javax.* packages. The first version of jakarta.annotations-api containing a jakarta.* package is 2.0.0.

So we need to change the version, not only the imports. I do not know what shade is able to do here - we may have to add a Maven profile to change the dependencies.

What was the expected outcome?

The bundle starts.

How to reproduce

Just try to start it in any OSGi container like Karaf.

Debug logs

No response

@lprimak
Copy link
Contributor

lprimak commented May 1, 2024

Is there a proper way to just use version 1.3 or above in OSGi? Or 1.3 or 2 or above
So we wouldn't have to "fix" a particular version unnecessarily?

@lprimak lprimak added jakartaee Jakarta EE help-wanted Help Wanted labels May 1, 2024
@lprimak lprimak added this to the 2.0.1 milestone May 1, 2024
@lprimak lprimak changed the title [Bug] Wrong jakarta OSGi imports in 2.0.1-SNAPSHOT [Bug] Wrong jakarta OSGi imports in main branch May 1, 2024
@fpapon
Copy link
Member

fpapon commented May 2, 2024

I'm playing with the shade maven plugin to make it work.

@lprimak lprimak modified the milestones: 2.0.1, 2.0.2 May 20, 2024
@lprimak
Copy link
Contributor

lprimak commented May 23, 2024

This may be a source of your issues @steinarb

@fpapon
Copy link
Member

fpapon commented May 24, 2024

Sorry guys but I'm missing free time to work on, I will do my best.

@steinarb
Copy link
Contributor

@lprimak This is probably an issue for me too, but not related to the classloader issue mentioned earlier (probably the next thing I will run into once the classloader issue has a fix... 😄 )

@fpapon Noted! I will see what I can find out when I get to it.

@github-actions github-actions bot added the Stale label Aug 23, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 30, 2024
@lprimak lprimak reopened this Aug 30, 2024
@github-actions github-actions bot removed the Stale label Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help-wanted Help Wanted jakartaee Jakarta EE
Projects
None yet
Development

No branches or pull requests

4 participants