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

Atomosphere 3.0.8 -- OSGI #2511

Closed
rimmeraj opened this issue Jul 9, 2024 · 11 comments
Closed

Atomosphere 3.0.8 -- OSGI #2511

rimmeraj opened this issue Jul 9, 2024 · 11 comments
Assignees

Comments

@rimmeraj
Copy link

rimmeraj commented Jul 9, 2024

How do you get this to resolve in an osgi container. You have a servlet-api version 5 in your dependency graph however in your OSGI import packages you have [2.5,4) ie < 4 ?

Bundle-SymbolicName org.atmosphere.runtime
Bundle-Version 3.0.8
Import-Package
jakarta.servlet.http;version="[2.5,4)"
jakarta.servlet;version="[2.5,4)"


Bundle-SymbolicName jakarta.servlet-api
Bundle-Version 5.0.0

jakarta.servlet {version=5.0.0}
jakarta.servlet.annotation {version=5.0.0}
jakarta.servlet.descriptor {version=5.0.0}
jakarta.servlet.http {version=5.0.0}
jakarta.servlet.resources {version=5.0.0}

@jfarcand
Copy link
Member

@rimmeraj Yep that's a bug. The pom.xml needs to be updated to reflect the new version.

@jfarcand jfarcand added the 3.0.9 label Jul 11, 2024
@wapgui
Copy link

wapgui commented Sep 12, 2024

When will it be done?

@kysmith-csg
Copy link
Contributor

@jfarcand The new Import-Package version range is not valid and causes a failure when building with Tycho:

Caused by: java.lang.IllegalArgumentException: invalid range "[5.0,]": invalid format
    at org.osgi.framework.VersionRange.<init> (VersionRange.java:173)
    at org.eclipse.osgi.service.resolver.VersionRange.<init> (VersionRange.java:75)
    at org.eclipse.osgi.internal.resolver.StateBuilder.getVersionRange (StateBuilder.java:838)
    at org.eclipse.osgi.internal.resolver.StateBuilder.addImportPackages (StateBuilder.java:325)
    at org.eclipse.osgi.internal.resolver.StateBuilder.createImportPackages (StateBuilder.java:302)
    at org.eclipse.osgi.internal.resolver.StateBuilder.createBundleDescription (StateBuilder.java:143)
    at org.eclipse.osgi.internal.resolver.StateObjectFactoryImpl.createBundleDescription (StateObjectFactoryImpl.java:59)
    at org.eclipse.osgi.service.resolver.StateObjectFactory$StateObjectFactoryProxy.createBundleDescription (StateObjectFactory.java:710)
    at org.eclipse.tycho.p2maven.tmp.BundlesAction.createBundleDescription (BundlesAction.java:789)
    at org.eclipse.tycho.p2maven.tmp.BundlesAction.createBundleDescription (BundlesAction.java:831)
    at org.eclipse.tycho.p2maven.tmp.BundlesAction.getBundleDescriptions (BundlesAction.java:1160)

Please update the range to something valid. If you want any version of jakarta.servlet that is greater than 5.0, you can just set version="5.0" and it will mean anything 5.0 or higher.

@jfarcand
Copy link
Member

@kysmith-csg Can you test it with a value that works and do a pull request. I don't have the setup to properly test it. I will cut a new release ASAP after. Thanks!

@jfarcand jfarcand reopened this Oct 24, 2024
@kysmith-csg
Copy link
Contributor

kysmith-csg commented Oct 24, 2024

@jfarcand what is the desired version range? Are we accepting servlet 6 as well? Basically two main options:

  1. Accept the range [5.0, 6.0), meaning servlet 5 up to (but not including) 6.
  2. Accept 5.0 meaning servlet 5 and higher, including anything in the future.

Most would generally disagree with choosing (2) since what if servlet 7 comes out and has breaking changes that make this module not work. If servlet 6 is ok, you can also do [5.0, 7.0) meaning servlet 5 and 6 but no higher.

@kysmith-csg
Copy link
Contributor

Note - I'm not actually using atmosphere, but I have a dependency in OSGI which transitively depends on atmosphere, and it's causing my build error. So my "testing that it works" would be only checking if the manifest is valid and that my build succeeds, but I would be happy to contribute the fix regardless.

Testing whether the functionality of atmosphere is still OK after my fix is outside the scope of my knowledge or ability, but it should be fine since this change would only affect OSGI users.

@jfarcand
Copy link
Member

@kysmith-csg I would go with 2.

@kysmith-csg
Copy link
Contributor

@jfarcand thanks for the info, I've opened #2517 with the corrected version. It will accept jakarta.servlet version 5 or higher.

@jfarcand
Copy link
Member

@kysmith-csg Release 3.0.12. Thanks for your help!

@kysmith-csg
Copy link
Contributor

@jfarcand the PR isn't merged... I'm hoping you didn't just make a 3.0.12 that is the same as 3.0.11 :)

jfarcand added a commit that referenced this issue Oct 28, 2024
Fix servlet import-package version (#2511)
@jfarcand
Copy link
Member

@kysmith-csg oh boy yes I blindly cut the release without your fix!!! Too much things to do at work :-) Let me cutr a new release now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants