felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pierre Bourret (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (FELIX-4115) NPE in DependencyModel.getService() when @Bind method throws an exception
Date Mon, 10 Jun 2013 14:44:20 GMT

     [ https://issues.apache.org/jira/browse/FELIX-4115?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Pierre Bourret updated FELIX-4115:
----------------------------------

    Attachment: bug-project.zip

Attached here : a simple project to reproduce the bug

It creates an instance of a component that throws a NullPointerException in its bindInstance
method (the provoked exception).
                
> NPE in DependencyModel.getService() when @Bind method throws an exception
> -------------------------------------------------------------------------
>
>                 Key: FELIX-4115
>                 URL: https://issues.apache.org/jira/browse/FELIX-4115
>             Project: Felix
>          Issue Type: Bug
>          Components: iPOJO
>    Affects Versions: ipojo-runtime-1.10
>         Environment: Linux 3.5.0-32-generic #53-Ubuntu SMP Wed May 29 20:23:04 UTC 2013
x86_64 x86_64 x86_64 GNU/Linux
> java version "1.6.0_27"
> OpenJDK Runtime Environment (IcedTea6 1.12.5) (6b27-1.12.5-0ubuntu0.12.10.1)
> OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
>            Reporter: Pierre Bourret
>         Attachments: bug-project.zip
>
>
> When a service binding callback throws an exception, the associated DependencyModel fails
with an NPE.
> In the following log, the first exception is provoked. However, the second one is a bug
inside the DependencyModel (m_tracker is null).
> 2013.06.10 16:28:23 ERROR - Bundle: bugs.bug - [ERROR]  : The method bindInstance in
the implementation class bugs.NaughtyBinder throws an exception : E ≠ mc² - java.lang.NullPointerException:
E ≠ mc²
> 	at bugs.NaughtyBinder.__M_bindInstance(NaughtyBinder.java:14)
> 	at bugs.NaughtyBinder.bindInstance(NaughtyBinder.java)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:616)
> 	at org.apache.felix.ipojo.util.Callback.call(Callback.java:260)
> 	at org.apache.felix.ipojo.handlers.dependency.DependencyCallback.callOnInstance(DependencyCallback.java:309)
> 	at org.apache.felix.ipojo.handlers.dependency.Dependency.invokeCallback(Dependency.java:330)
> 	at org.apache.felix.ipojo.handlers.dependency.Dependency.onObjectCreation(Dependency.java:282)
> 	at org.apache.felix.ipojo.handlers.dependency.DependencyHandler.__M_onCreation(DependencyHandler.java:702)
> 	at org.apache.felix.ipojo.handlers.dependency.DependencyHandler.onCreation(DependencyHandler.java)
> 	at org.apache.felix.ipojo.InstanceManager.getPojoObject(InstanceManager.java:934)
> 	at org.apache.felix.ipojo.handlers.lifecycle.callback.LifecycleCallbackHandler.__M_stateChanged(LifecycleCallbackHandler.java:156)
> 	at org.apache.felix.ipojo.handlers.lifecycle.callback.LifecycleCallbackHandler.stateChanged(LifecycleCallbackHandler.java)
> 	at org.apache.felix.ipojo.InstanceManager.setState(InstanceManager.java:536)
> 	at org.apache.felix.ipojo.InstanceManager.start(InstanceManager.java:418)
> 	at org.apache.felix.ipojo.ComponentFactory.createInstance(ComponentFactory.java:178)
> 	at org.apache.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory.java:307)
> 	at org.apache.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory.java:234)
> 	at org.apache.felix.ipojo.extender.internal.linker.ManagedType$InstanceSupport$1.call(ManagedType.java:285)
> 	at org.apache.felix.ipojo.extender.internal.linker.ManagedType$InstanceSupport$1.call(ManagedType.java:279)
> 	at org.apache.felix.ipojo.extender.internal.queue.JobInfoCallable.call(JobInfoCallable.java:100)
> 	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> 	at java.lang.Thread.run(Thread.java:679)
> 2013.06.10 16:28:23 ERROR - Bundle: bugs.bug - [ERROR] bugs.NaughtyBinder : null - java.lang.NullPointerException
> 	at org.apache.felix.ipojo.util.DependencyModel.getService(DependencyModel.java:948)
> 	at org.apache.felix.ipojo.util.DependencyModel.getService(DependencyModel.java:938)
> 	at org.apache.felix.ipojo.handlers.dependency.Dependency.onObjectCreation(Dependency.java:280)
> 	at org.apache.felix.ipojo.handlers.dependency.DependencyHandler.__M_onCreation(DependencyHandler.java:702)
> 	at org.apache.felix.ipojo.handlers.dependency.DependencyHandler.onCreation(DependencyHandler.java)
> 	at org.apache.felix.ipojo.InstanceManager.getPojoObject(InstanceManager.java:934)
> 	at org.apache.felix.ipojo.handlers.lifecycle.callback.LifecycleCallbackHandler.__M_stateChanged(LifecycleCallbackHandler.java:156)
> 	at org.apache.felix.ipojo.handlers.lifecycle.callback.LifecycleCallbackHandler.stateChanged(LifecycleCallbackHandler.java)
> 	at org.apache.felix.ipojo.InstanceManager.setState(InstanceManager.java:536)
> 	at org.apache.felix.ipojo.InstanceManager.start(InstanceManager.java:418)
> 	at org.apache.felix.ipojo.ComponentFactory.createInstance(ComponentFactory.java:178)
> 	at org.apache.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory.java:307)
> 	at org.apache.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory.java:234)
> 	at org.apache.felix.ipojo.extender.internal.linker.ManagedType$InstanceSupport$1.call(ManagedType.java:285)
> 	at org.apache.felix.ipojo.extender.internal.linker.ManagedType$InstanceSupport$1.call(ManagedType.java:279)
> 	at org.apache.felix.ipojo.extender.internal.queue.JobInfoCallable.call(JobInfoCallable.java:100)
> 	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> 	at java.lang.Thread.run(Thread.java:679)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message