felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sahoo (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FELIX-3074) Incorrect class loading due to implicit boot delegation
Date Tue, 09 Aug 2011 18:17:27 GMT
Incorrect class loading due to implicit boot delegation
-------------------------------------------------------

                 Key: FELIX-3074
                 URL: https://issues.apache.org/jira/browse/FELIX-3074
             Project: Felix
          Issue Type: Bug
          Components: Framework
    Affects Versions: framework-3.0.8
            Reporter: Sahoo
            Priority: Critical


While analysing some inexplicable errors in my test environment, I came across this bug. The
thread stack below causes a class from parent loader to be loaded when I expected it not to.

FelixStartLevel@766 daemon, prio=5, in group 'main', status: 'RUNNING'
          at org.apache.felix.framework.ModuleImpl.doImplicitBootDelegation(ModuleImpl.java:1535)
          at org.apache.felix.framework.ModuleImpl.searchDynamicImports(ModuleImpl.java:1472)
          at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:734)
          at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
          at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
          at java.lang.Class.forName0(Class.java:-1)
          at java.lang.Class.forName(Class.java:247)
          at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:345)
          at java.util.ServiceLoader$1.next(ServiceLoader.java:421)
          at org.glassfish.embeddable.GlassFishRuntime.getRuntimeBuilder(GlassFishRuntime.java:180)
          at org.glassfish.embeddable.GlassFishRuntime._bootstrap(GlassFishRuntime.java:156)
          at org.glassfish.embeddable.GlassFishRuntime.bootstrap(GlassFishRuntime.java:110)
          at com.sun.enterprise.glassfish.bootstrap.osgi.GlassFishMainActivator.start(GlassFishMainActivator.java:110)
          at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:629)
          at org.apache.felix.framework.Felix.activateBundle(Felix.java:1835)
          at org.apache.felix.framework.Felix.startBundle(Felix.java:1752)
          at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:922)
          at org.glassfish.fighterfish.sample.embeddegf.provisioner.Activator.startGlassFishBundle(Activator.java:90)
          at org.glassfish.fighterfish.sample.embeddegf.provisioner.Activator.start(Activator.java:81)
          at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:629)
          at org.apache.felix.framework.Felix.activateBundle(Felix.java:1835)
          at org.apache.felix.framework.Felix.startBundle(Felix.java:1752)
          at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1156)
          at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
          at java.lang.Thread.run(Thread.java:619)

As per the logic in ModuleImpl.java, isClassExternal(java.util.ServiceLoader$LazyIterator.class)
return true, so it boot delegates.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message