Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Java-SCA-1.5
-
None
-
SVN revision 786908
Linux
Description
The Atom binding can support two types of Java implementation classes that
- extend org.apache.tuscany.sca.binding.atom.collection.Collection
- Do not extend org.apache.tuscany.sca.binding.atom.collection.Collection but have a getAll() method that uses the Tuscany Data API
The support for this is provided in the getFeed() method of AtomBindingListenerServlet in the binding-atom-abdera module. With SVN revision 763787, if you look at line 745 [1] there is an if that handles these two cases.
Unfortunately, currently if you attempt to add an Atom binding to a Java component implementation that does not have a get() method then the following NullPointerException is thrown:
org.osoa.sca.ServiceRuntimeException: java.lang.NullPointerException
at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:220)
at org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.java:63)
at org.apache.tuscany.sca.binding.atom.AtomFeedNonCollectionTest.init(AtomFeedNonCollectionTest.java:25)
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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.lang.NullPointerException
at org.apache.tuscany.sca.binding.atom.provider.AtomBindingListenerServlet.<init>(AtomBindingListenerServlet.java:146)
at org.apache.tuscany.sca.binding.atom.provider.AtomServiceBindingProvider.start(AtomServiceBindingProvider.java:73)
at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl$3.run(CompositeActivatorImpl.java:630)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.start(CompositeActivatorImpl.java:628)
at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.start(CompositeActivatorImpl.java:560)
at org.apache.tuscany.sca.node.impl.NodeImpl.start(NodeImpl.java:716)
at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.init(DefaultSCADomain.java:187)
at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(DefaultSCADomain.java:100)
at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:183)
... 18 more
Attachments
Issue Links
- is related to
-
TUSCANY-3111 NullPointerException thrown when using RSS binding on a Java component implementation class that does not have a get() method
- Closed