DM/ ResourceAdapter NPE ----------------------- Key: FELIX-2348 URL: https://issues.apache.org/jira/browse/FELIX-2348 Project: Felix Issue Type: Bug Components: Dependency Manager Reporter: Pierre De Rop
(this issue concerns Dependency manager in the trunk) When declaring a ResourceAdapter and a Resource Provider, I always get the following NPE: Invocation of 'add' failed. - java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.felix.dm.impl.InvocationUtil.invokeMethod(InvocationUtil.java:37) at org.apache.felix.dm.impl.InvocationUtil.invokeCallbackMethod(InvocationUtil.java:12) at org.apache.felix.dm.impl.dependencies.DependencyBase.invokeCallbackMethod(DependencyBase.java:35) at org.apache.felix.dm.impl.dependencies.ServiceDependencyImpl.invokeAdded(ServiceDependencyImpl.java:406) at org.apache.felix.dm.impl.dependencies.ServiceDependencyImpl.addedService(ServiceDependencyImpl.java:398) at org.apache.felix.dm.impl.tracker.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1086) at org.apache.felix.dm.impl.tracker.AbstractTracked.trackAdding(AbstractTracked.java:286) at org.apache.felix.dm.impl.tracker.AbstractTracked.track(AbstractTracked.java:232) at org.apache.felix.dm.impl.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:957) at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:878) at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:732) at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:662) at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:3587) at org.apache.felix.framework.Felix.access$000(Felix.java:40) at org.apache.felix.framework.Felix$1.serviceChanged(Felix.java:625) at org.apache.felix.framework.ServiceRegistry.registerService(ServiceRegistry.java:90) at org.apache.felix.framework.Felix.registerService(Felix.java:2711) at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:252) at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:230) at org.apache.felix.dm.impl.dependencies.ResourceDependencyImpl.start(ResourceDependencyImpl.java:78) at org.apache.felix.dm.impl.ServiceImpl.startTrackingRequired(ServiceImpl.java:629) at org.apache.felix.dm.impl.ServiceImpl.access$100(ServiceImpl.java:51) at org.apache.felix.dm.impl.ServiceImpl$2.run(ServiceImpl.java:142) at org.apache.felix.dm.impl.SerialExecutor$1.run(SerialExecutor.java:47) at org.apache.felix.dm.impl.SerialExecutor.scheduleNext(SerialExecutor.java:84) at org.apache.felix.dm.impl.SerialExecutor.execute(SerialExecutor.java:68) at org.apache.felix.dm.impl.ServiceImpl.calculateStateChanges(ServiceImpl.java:222) at org.apache.felix.dm.impl.ServiceImpl.start(ServiceImpl.java:333) at org.apache.felix.dm.DependencyManager.add(DependencyManager.java:94) at org.apache.felix.dm.impl.AbstractDecorator.added(AbstractDecorator.java:93) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.felix.dm.impl.InvocationUtil.invokeMethod(InvocationUtil.java:37) at org.apache.felix.dm.impl.InvocationUtil.invokeCallbackMethod(InvocationUtil.java:12) at org.apache.felix.dm.impl.dependencies.DependencyBase.invokeCallbackMethod(DependencyBase.java:35) at org.apache.felix.dm.impl.dependencies.ResourceDependencyImpl.invokeAdded(ResourceDependencyImpl.java:163) at org.apache.felix.dm.impl.dependencies.ResourceDependencyImpl.added(ResourceDependencyImpl.java:111) at org.apache.felix.dm.test.ResourceAdapterTest$ResourceProvider.add(ResourceAdapterTest.java:139) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.felix.dm.impl.InvocationUtil.invokeMethod(InvocationUtil.java:37) at org.apache.felix.dm.impl.InvocationUtil.invokeCallbackMethod(InvocationUtil.java:12) at org.apache.felix.dm.impl.dependencies.DependencyBase.invokeCallbackMethod(DependencyBase.java:35) at org.apache.felix.dm.impl.dependencies.ServiceDependencyImpl.invokeAdded(ServiceDependencyImpl.java:406) at org.apache.felix.dm.impl.dependencies.ServiceDependencyImpl.addedService(ServiceDependencyImpl.java:393) at org.apache.felix.dm.impl.tracker.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1086) at org.apache.felix.dm.impl.tracker.AbstractTracked.trackAdding(AbstractTracked.java:286) at org.apache.felix.dm.impl.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183) at org.apache.felix.dm.impl.tracker.ServiceTracker.open(ServiceTracker.java:342) at org.apache.felix.dm.impl.tracker.ServiceTracker.open(ServiceTracker.java:276) at org.apache.felix.dm.impl.dependencies.ServiceDependencyImpl.start(ServiceDependencyImpl.java:353) at org.apache.felix.dm.impl.ServiceImpl.startTrackingOptional(ServiceImpl.java:609) at org.apache.felix.dm.impl.ServiceImpl.bindService(ServiceImpl.java:545) at org.apache.felix.dm.impl.ServiceImpl.access$400(ServiceImpl.java:51) at org.apache.felix.dm.impl.ServiceImpl$7.run(ServiceImpl.java:172) at org.apache.felix.dm.impl.SerialExecutor$1.run(SerialExecutor.java:47) at org.apache.felix.dm.impl.SerialExecutor.scheduleNext(SerialExecutor.java:84) at org.apache.felix.dm.impl.SerialExecutor.access$000(SerialExecutor.java:33) at org.apache.felix.dm.impl.SerialExecutor$1.run(SerialExecutor.java:50) at org.apache.felix.dm.impl.SerialExecutor.scheduleNext(SerialExecutor.java:84) at org.apache.felix.dm.impl.SerialExecutor.execute(SerialExecutor.java:68) at org.apache.felix.dm.impl.ServiceImpl.calculateStateChanges(ServiceImpl.java:222) at org.apache.felix.dm.impl.ServiceImpl.start(ServiceImpl.java:333) at org.apache.felix.dm.DependencyManager.add(DependencyManager.java:94) at org.apache.felix.dm.test.ResourceAdapterTest.testBasicResourceAdapter(ResourceAdapterTest.java:75) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.ops4j.pax.exam.junit.extender.impl.internal.CallableTestMethodImpl.injectContextAndInvoke(CallableTestMethodImpl.java:130) at org.ops4j.pax.exam.junit.extender.impl.internal.CallableTestMethodImpl.call(CallableTestMethodImpl.java:101) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.ops4j.pax.exam.rbc.internal.RemoteBundleContextImpl.remoteCall(RemoteBundleContextImpl.java:80) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305) at sun.rmi.transport.Transport$1.run(Transport.java:159) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:155) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649) 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:619) Caused by: java.lang.NullPointerException at org.osgi.framework.FrameworkUtil$FilterImpl$Parser.<init>(FrameworkUtil.java:1212) at org.osgi.framework.FrameworkUtil$FilterImpl.newInstance(FrameworkUtil.java:377) at org.osgi.framework.FrameworkUtil.createFilter(FrameworkUtil.java:76) at org.apache.felix.framework.BundleContextImpl.createFilter(BundleContextImpl.java:102) at org.apache.felix.dm.test.ResourceAdapterTest$ResourceProvider.add(ResourceAdapterTest.java:128) ... 98 more (I will commit a testcase for this issue) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.