aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stan Lewis (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (ARIES-776) NPEs in AriesFrameworkUtil and DefaultWorker static initializers
Date Mon, 07 Nov 2011 21:16:51 GMT
NPEs in AriesFrameworkUtil and DefaultWorker static initializers
----------------------------------------------------------------

                 Key: ARIES-776
                 URL: https://issues.apache.org/jira/browse/ARIES-776
             Project: Aries
          Issue Type: Bug
          Components: Util
    Affects Versions: 0.4
         Environment: Using Pojosr 0.6
            Reporter: Stan Lewis
            Priority: Minor
         Attachments: ARIES-776.txt

Working on getting some tests together using pojosr but the following exception prevented
some services from starting properly:

Running org.fusesource.fabric.service.FabricServiceImplTest
ERROR | Blueprint Extender: 2 | Unable to start blueprint container for bundle org.apache.karaf.admin.management
org.osgi.service.blueprint.container.ComponentDefinitionException: java.lang.ExceptionInInitializerError
	at org.apache.aries.blueprint.container.ReferenceRecipe.internalCreate(ReferenceRecipe.java:98)
	at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)
	at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:219)
	at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:147)
	at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:640)
	at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:331)
	at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:227)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.ExceptionInInitializerError
	at org.apache.aries.proxy.impl.AbstractProxyManager.getClassLoader(AbstractProxyManager.java:93)
	at org.apache.aries.proxy.impl.JdkProxyManager.createNewProxy(JdkProxyManager.java:32)
	at org.apache.aries.proxy.impl.AbstractProxyManager.createProxy(AbstractProxyManager.java:50)
	at org.apache.aries.proxy.impl.AbstractProxyManager.createProxy(AbstractProxyManager.java:39)
	at org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.createProxy(AbstractServiceReferenceRecipe.java:236)
	at org.apache.aries.blueprint.container.ReferenceRecipe.internalCreate(ReferenceRecipe.java:82)
	... 14 more
Caused by: java.lang.NullPointerException
	at org.apache.aries.util.AriesFrameworkUtil.<clinit>(AriesFrameworkUtil.java:34)
	... 20 more

Avoiding the above NPE in AriesFrameworkUtil yielded a second NPE in DefaultWorker's static
initializer:

ERROR | Blueprint Extender: 3 | Unable to start blueprint container for bundle org.apache.karaf.admin.management
org.osgi.service.blueprint.container.ComponentDefinitionException: java.lang.ExceptionInInitializerError
	at org.apache.aries.blueprint.container.ReferenceRecipe.internalCreate(ReferenceRecipe.java:100)
	at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:71)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:79)
	at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:220)
	at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:154)
	at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:630)
	at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:326)
	at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:228)
	at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.ExceptionInInitializerError
	at org.apache.aries.util.AriesFrameworkUtil.<clinit>(AriesFrameworkUtil.java:44)
	at org.apache.aries.proxy.impl.AbstractProxyManager.getClassLoader(AbstractProxyManager.java:130)
	at org.apache.aries.proxy.impl.JdkProxyManager.createNewProxy(JdkProxyManager.java:36)
	at org.apache.aries.proxy.impl.AbstractProxyManager.createDelegatingInterceptingProxy(AbstractProxyManager.java:75)
	at org.apache.aries.proxy.impl.AbstractProxyManager.createDelegatingProxy(AbstractProxyManager.java:40)
	at org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.createProxy(AbstractServiceReferenceRecipe.java:237)
	at org.apache.aries.blueprint.container.ReferenceRecipe.internalCreate(ReferenceRecipe.java:84)
	... 18 more
Caused by: java.lang.NullPointerException
	at org.apache.aries.util.internal.DefaultWorker.<clinit>(DefaultWorker.java:42)
	... 25 more

Avoiding this NPE allows me to get a valid service reference from the pojosr registry for
the service I want to test, so I'm attaching a patch for review, would be good to avoid these
NPEs in any case since it's not obvious what's wrong when they occur.

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

        

Mime
View raw message