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

Glassfish incompatibility URLHandlersBundleURLConnection #31

Open
darmbrust opened this issue Feb 3, 2016 · 7 comments
Open

Glassfish incompatibility URLHandlersBundleURLConnection #31

darmbrust opened this issue Feb 3, 2016 · 7 comments

Comments

@darmbrust
Copy link
Contributor

Hi - I ran into this, when trying to use the annotation scanner from within GlassFish 4.1.1.

java.lang.ClassCastException: org.apache.felix.framework.URLHandlersBundleURLConnection cannot be cast to java.net.JarURLConnection
at eu.infomas.annotation.AnnotationDetector.detect(AnnotationDetector.java:287)

I'm going to see if I can come up with a patch - unless you have already noticed this / have a patch pending release.

@darmbrust
Copy link
Contributor Author

FYI, I believe I have a fix for this. I've run into some other issues deploying on GlassFish, however, and want to ensure that my patch isn't related to the issues I'm still tracking down before send a pull request.

@rmuller
Copy link
Owner

rmuller commented Feb 4, 2016

Hi Dan, thanks for reporting.

I just checked my sample web app for testing the annotation detector with GlassFish 4.1.1 and everything works fine here. So can you please give some more information about this issue. I see you are using OSGi? Also see #29 and #30.

BTW Which version are you using? (I checked with 3.0.5 from maven central)

Thanks in advance, your patch is more than welcome!

@darmbrust
Copy link
Contributor Author

That is interesting.... I'm not using any osgi - but maybe there is a setting somewhere I can change to get it to operate the way it is in your sample app?
Interestingly enough, I'm running into some sort of classloading bug within GlassFish that could also be related to OSGI.

@darmbrust
Copy link
Contributor Author

Anything I can do to fix the checkstyle issue? I don't understand why it is complaining or the value of the rule that is being violated. Other than that, the patch (comprised of two commits #32 ) should be ready / safe to apply.

@rmuller
Copy link
Owner

rmuller commented Feb 10, 2016

No, I will commit the fix asap. However, i am extremely busy so give me a few days.

Thanks anyway. Great addition!

@rmuller
Copy link
Owner

rmuller commented Feb 19, 2016

Integrated your pull request. Thanks again.
Also added a simple test webapp. I am not able to reproduce your issue. Also checked with GF 4.1.1 Full Profile. I start the app from within Netbeans.
Please check the changes.

@darmbrust
Copy link
Contributor Author

Thanks. Will do. I had the issue when I was deploying my app from within a war file, just using the GlassFish GUI. Not sure when/why/what config will make glassfish nest the jar files inside that URLHandlersBundleURLConnection.

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

2 participants