[jboss-jira] [JBoss JIRA] (AS7-2165) Thread context ClassLoader set to unexpected value

Thomas Diesler (Resolved) (JIRA) jira-events at lists.jboss.org
Thu Oct 20 05:23:45 EDT 2011


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

Thomas Diesler resolved AS7-2165.
---------------------------------

    Resolution: Out of Date


Thanks for the excellent bug report. This issue is fixed in master already 

{code}
11:18:03,567 INFO  [org.jboss.modules] JBoss Modules version 1.0.3.GA
11:18:03,912 INFO  [org.jboss.msc] JBoss MSC version 1.0.1.GA
11:18:03,987 INFO  [org.jboss.as] JBoss AS 7.1.0.Alpha2-SNAPSHOT "Ahoy!" starting
...
11:20:26,204 INFO  [org.jboss.osgi.framework.internal.FrameworkActive] (MSC service thread 1-2) OSGi Framework started
11:20:26,210 INFO  [org.jboss.osgi.framework.internal.BundleManager] (MSC service thread 1-2) Install bundle: jboss.osgi.bug:1.0.0
11:20:26,235 INFO  [stdout] (MSC service thread 1-4) thread context classloader: ModuleClassLoader for Module "org.jboss.as.osgi:main" from local module loader @329f671b (roots: /home/tdiesler/git/jboss-as/build/target/jboss-as-7.1.0.Alpha2-SNAPSHOT/modules)
11:20:26,236 INFO  [stdout] (MSC service thread 1-4)    resource URL: null
11:20:26,237 INFO  [stdout] (MSC service thread 1-4) class classloader: HostBundleClassLoader for Module "deployment.jboss.osgi.bug:1.0.0" from Service Module Loader
11:20:26,248 INFO  [stdout] (MSC service thread 1-4)    resource URL: bundle://jboss.osgi.bug-23-0-0/document.txt
11:20:26,248 INFO  [stdout] (MSC service thread 1-4)    resource URL: bundle://jboss.osgi.bug-23-0-0/document.txt
11:20:26,249 INFO  [org.jboss.osgi.framework.internal.HostBundleState] (MSC service thread 1-4) Bundle started: jboss.osgi.bug:1.0.0
{code}
                
> Thread context ClassLoader set to unexpected value
> --------------------------------------------------
>
>                 Key: AS7-2165
>                 URL: https://issues.jboss.org/browse/AS7-2165
>             Project: Application Server 7
>          Issue Type: Bug
>          Components: OSGi
>    Affects Versions: 7.0.2.Final
>         Environment: Java 1.6.0_26, Mac OS 10.6.8
>            Reporter: Tim Pesce
>            Assignee: Thomas Diesler
>              Labels: classloader
>         Attachments: jboss-osgi-bug.zip
>
>
> I am using library code in a BundleActivator that tries to load resources via ClassLoader. The logic in the library looks something like this:
> # if thread context ClassLoader exists use it
> # else use ClassLoader for this class
> The thread context ClassLoader differs from the class ClassLoader. The resources packaged in my bundle are not available to the thread context ClassLoader, but they are available to the class ClassLoader. In 7.0.1 there was no thread context ClassLoader, so the library code used the class ClassLoader and correctly loaded the resources.
> Here's what toString on the thread context ClassLoader shows:
> {quote}
> ModuleClassLoader for Module "org.jboss.as.osgi:main" from local module loader @67d225a7 (roots: /Users/tpesce/Developer/jboss-as-7.0.2.Final/modules)
> {quote}
> Here's the toString on the class ClassLoader:
> {quote}
> HostBundleClassLoader for Module "deployment.jboss.osgi.bug:1.0.0" from Service Module Loader
> {quote}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list