-
Notifications
You must be signed in to change notification settings - Fork 356
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
OsgiRegistry classToBundleMapping does not store classes for packages containing .class correctly #4177
Comments
That particular line is there since 2.0, and it was working well so far. Can you provide us your test case? |
@jansupol I time-boxed tried to provide a test case but the tests for OSGi seem to be in a non-working state for me? (And ignored in Java 11) I'm expecting the error to appear in the test suit if you rename for example org.glassfish.jersey.examples.osgi.helloworld.additional.resource to org.glassfish.jersey.examples.osgi.helloworld.classification.additional.resource. Regardless, it's clear that the line of code will replace all occurrences of ".class" in the jarEntryName by an empty string while it should only replace the final ".class" if it's the end of the jarEntryName. |
Yes, we have experienced some issues with JDK11 and OSGi frameworks. In Jersey, we have excluded OSGi tests for now, so they are ignored at the moment in It is a funny bug with ".classification", and noone seems to hit that till now :) |
fixed |
We are running Jersey in an OSGi environment and we are experiencing the following error at startup:
When looking into this issue the OsgiRegistry seems to have stored the following class in its classToBundleMapping:
org.exampleification.rest.internal.MyClassificationResource
This is caused by the incorrect replacement at https://github.com/eclipse-ee4j/jersey/blob/2.29-RC1-BRANCH/core-common/src/main/java/org/glassfish/jersey/internal/OsgiRegistry.java#L421
Affected versions
2.27+ (and possibly earlier versions)
The text was updated successfully, but these errors were encountered: