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

Mark Combellack updated TUSCANY-3109:
-------------------------------------

    Fix Version/s:     (was: Java-SCA-1.5.1)
                   Java-SCA-Next

> NullPointerException thrown when using Atom binding on a Java component 
> implementation class that does not have a get() method
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-3109
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3109
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA ATOM Binding Extension
>    Affects Versions: Java-SCA-1.5
>         Environment: SVN revision 786908
> Linux
>            Reporter: Mark Combellack
>            Assignee: Mark Combellack
>             Fix For: Java-SCA-Next
>
>
> 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
> [1] 
> http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingListenerServlet.java?annotate=763787&sortby=date&pathrev=763787#l475

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to