[weld-issues] [JBoss JIRA] Updated: (WELD-589) org.jboss.weld.environment.se.discovery.URLScanner does not work with resources inside OSGI bundles

Ales Justin (JIRA) jira-events at lists.jboss.org
Wed Jul 20 09:37:25 EDT 2011


     [ https://issues.jboss.org/browse/WELD-589?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ales Justin updated WELD-589:
-----------------------------

    Fix Version/s: TBC
                       (was: 1.1.2.Final)


>  org.jboss.weld.environment.se.discovery.URLScanner does not work with resources inside OSGI bundles
> ----------------------------------------------------------------------------------------------------
>
>                 Key: WELD-589
>                 URL: https://issues.jboss.org/browse/WELD-589
>             Project: Weld
>          Issue Type: Bug
>          Components: Java SE Support
>         Environment: JavaSE 6 + Weld SE 
>            Reporter: Morten Christensen
>             Fix For: TBC
>
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the weld-issues mailing list