[weld-issues] [JBoss JIRA] Created: (WELD-524) org.jboss.weld.environment.se.discovery.URLScanner does not work with resources inside OSGI bundles
Morten Christensen (JIRA)
jira-events at lists.jboss.org
Sun May 9 16:06:05 EDT 2010
org.jboss.weld.environment.se.discovery.URLScanner does not work with resources inside OSGI bundles
----------------------------------------------------------------------------------------------------
Key: WELD-524
URL: https://jira.jboss.org/jira/browse/WELD-524
Project: Weld
Issue Type: Bug
Environment: JavaSE 6 + Weld SE
Reporter: Morten Christensen
Priority: Blocker
The class org.jboss.weld.environment.se.discovery.URLScanner does no work with resources inside OSGI bundles. So if one try to start WeldSe inside an OSGI bundle and get around the classloader bug in WeldSE by tempoarily setting the ContextClassLoader you will get an NullPointerException.
The problem is OSGI resource url related. For a OSGI bundle you will f.x. get "bundleresource://4.fwk1362875764:1/META-INF/beans.xml" from bundleClassLoader.getResources("META-INF/beans.xml" but this is not a valid filename as URLScanner assumes so one will get this exception:
java.lang.NullPointerException
at org.jboss.weld.environment.se.discovery.URLScanner.handleDirectory(URLScanner.java:177)
at org.jboss.weld.environment.se.discovery.URLScanner.handleDirectory(URLScanner.java:183)
at org.jboss.weld.environment.se.discovery.URLScanner.handleDirectory(URLScanner.java:160)
at org.jboss.weld.environment.se.discovery.URLScanner.handle(URLScanner.java:122)
at org.jboss.weld.environment.se.discovery.URLScanner.scanResources(URLScanner.java:107)
at org.jboss.weld.environment.se.discovery.SEWeldDiscovery.scan(SEWeldDiscovery.java:71)
at org.jboss.weld.environment.se.discovery.SEWeldDiscovery.<init>(SEWeldDiscovery.java:45)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the weld-issues
mailing list