You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Shu Chao Wan (JIRA)" <de...@tuscany.apache.org> on 2008/12/02 08:01:45 UTC

[jira] Created: (TUSCANY-2701) NPE when verifying conformance item ASM60006 in OASIS sepc

NPE when verifying conformance item ASM60006 in OASIS sepc
----------------------------------------------------------

                 Key: TUSCANY-2701
                 URL: https://issues.apache.org/jira/browse/TUSCANY-2701
             Project: Tuscany
          Issue Type: Test
          Components: Java SCA Assembly Model
    Affects Versions: Java-SCA-1.3
            Reporter: Shu Chao Wan
            Priority: Minor


Conformance item 60006 says that, "The name of a composite <reference/> element MUST be unique across all the composite references in the composite."

According to the above description, I wrote a composite file inner.composite with two same composite  <reference/> element  "NonUniqueReference" within the composite. 
-----------------------
inner.composite
-----------------------
<composite ...>
     <service name="AService" promote="AComponent"/>
     <component name="AComponent">
             <reference name="b" />
             <reference name="c" />
     </component>
     <reference name="NonUniqueReference" promote="AComponent/b" />
     <reference name="NonUniqueReference" promote="AComponent/c" /> 
</composite>

And a outer composite file to use inner composite as the implementation of component.
-----------------------
outer.composite
-----------------------
<composite>
      <component name="TestNonUniqueReferenceComponent">
         <implementation.composite name="assembly-tests:Assembly-non-unique-reference-inner--Composite"/>
         <reference name="NonUniqueReference" target="BComponent"/>
         <reference name="NonUniqueReference" target="CComponent"/> 	
     </component>

    <component name="BComponent">
        <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.BServiceImpl"/>
        <property name="someProperty">some b component value</property>
    </component>
    
    <component name="CComponent">
        <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.CServiceImpl"/>        
    </component>

</composite>

When I invoke two different methods from the component service AService, I got NullPointerException from one method invocation.
--------------
TestCase
--------------
        initDomain("nonuniquereference_outer.composite");
        AService service = ServiceFinder.getService(AService.class, "TestNonUniqueReferenceComponent/AService");
        service.getBProperty();
        service.getState();
        cleanupDomain();

Here is the detailed info about exception
-----------------------
Exception Trace
-----------------------
java.lang.NullPointerException
	at org.apache.tuscany.sca.vtest.assembly.composite.impl.AServiceImpl.getBProperty(AServiceImpl.java:43)
	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:585)
	at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:132)
	at org.apache.tuscany.sca.binding.sca.impl.SCABindingInvoker.invoke(SCABindingInvoker.java:61)
	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:287)
	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:154)
	at $Proxy9.getBProperty(Unknown Source)
	at org.apache.tuscany.sca.vtest.assembly.composite.CompositeTestCase.ASM60006(CompositeTestCase.java:209)
	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:585)
	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.InvokeMethod.evaluate(InvokeMethod.java:20)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
	at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
	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)




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


[jira] Closed: (TUSCANY-2701) NPE when verifying conformance item ASM60006 in OASIS sepc

Posted by "Shu Chao Wan (JIRA)" <de...@tuscany.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shu Chao Wan closed TUSCANY-2701.
---------------------------------


The problem has gone.

> NPE when verifying conformance item ASM60006 in OASIS sepc
> ----------------------------------------------------------
>
>                 Key: TUSCANY-2701
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2701
>             Project: Tuscany
>          Issue Type: Test
>          Components: Java SCA Assembly Model
>    Affects Versions: Java-SCA-1.3
>            Reporter: Shu Chao Wan
>            Assignee: Dan Becker
>            Priority: Minor
>             Fix For: Java-SCA-Next
>
>
> Conformance item 60006 says that, "The name of a composite <reference/> element MUST be unique across all the composite references in the composite."
> According to the above description, I wrote a composite file inner.composite with two same composite  <reference/> element  "NonUniqueReference" within the composite. 
> -----------------------
> inner.composite
> -----------------------
> <composite ...>
>      <service name="AService" promote="AComponent"/>
>      <component name="AComponent">
>              <reference name="b" />
>              <reference name="c" />
>      </component>
>      <reference name="NonUniqueReference" promote="AComponent/b" />
>      <reference name="NonUniqueReference" promote="AComponent/c" /> 
> </composite>
> And a outer composite file to use inner composite as the implementation of component.
> -----------------------
> outer.composite
> -----------------------
> <composite>
>       <component name="TestNonUniqueReferenceComponent">
>          <implementation.composite name="assembly-tests:Assembly-non-unique-reference-inner--Composite"/>
>          <reference name="NonUniqueReference" target="BComponent"/>
>          <reference name="NonUniqueReference" target="CComponent"/> 	
>      </component>
>     <component name="BComponent">
>         <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.BServiceImpl"/>
>         <property name="someProperty">some b component value</property>
>     </component>
>     
>     <component name="CComponent">
>         <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.CServiceImpl"/>        
>     </component>
> </composite>
> When I invoke two different methods from the component service AService, I got NullPointerException from one method invocation.
> --------------
> TestCase
> --------------
>         initDomain("nonuniquereference_outer.composite");
>         AService service = ServiceFinder.getService(AService.class, "TestNonUniqueReferenceComponent/AService");
>         service.getBProperty();
>         service.getState();
>         cleanupDomain();
> Here is the detailed info about exception
> -----------------------
> Exception Trace
> -----------------------
> java.lang.NullPointerException
> 	at org.apache.tuscany.sca.vtest.assembly.composite.impl.AServiceImpl.getBProperty(AServiceImpl.java:43)
> 	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:585)
> 	at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:132)
> 	at org.apache.tuscany.sca.binding.sca.impl.SCABindingInvoker.invoke(SCABindingInvoker.java:61)
> 	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:287)
> 	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:154)
> 	at $Proxy9.getBProperty(Unknown Source)
> 	at org.apache.tuscany.sca.vtest.assembly.composite.CompositeTestCase.ASM60006(CompositeTestCase.java:209)
> 	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:585)
> 	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.InvokeMethod.evaluate(InvokeMethod.java:20)
> 	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
> 	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
> 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
> 	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
> 	at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
> 	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
> 	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)

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


[jira] Assigned: (TUSCANY-2701) NPE when verifying conformance item ASM60006 in OASIS sepc

Posted by "Dan Becker (JIRA)" <de...@tuscany.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Becker reassigned TUSCANY-2701:
-----------------------------------

    Assignee: Dan Becker

> NPE when verifying conformance item ASM60006 in OASIS sepc
> ----------------------------------------------------------
>
>                 Key: TUSCANY-2701
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2701
>             Project: Tuscany
>          Issue Type: Test
>          Components: Java SCA Assembly Model
>    Affects Versions: Java-SCA-1.3
>            Reporter: Shu Chao Wan
>            Assignee: Dan Becker
>            Priority: Minor
>
> Conformance item 60006 says that, "The name of a composite <reference/> element MUST be unique across all the composite references in the composite."
> According to the above description, I wrote a composite file inner.composite with two same composite  <reference/> element  "NonUniqueReference" within the composite. 
> -----------------------
> inner.composite
> -----------------------
> <composite ...>
>      <service name="AService" promote="AComponent"/>
>      <component name="AComponent">
>              <reference name="b" />
>              <reference name="c" />
>      </component>
>      <reference name="NonUniqueReference" promote="AComponent/b" />
>      <reference name="NonUniqueReference" promote="AComponent/c" /> 
> </composite>
> And a outer composite file to use inner composite as the implementation of component.
> -----------------------
> outer.composite
> -----------------------
> <composite>
>       <component name="TestNonUniqueReferenceComponent">
>          <implementation.composite name="assembly-tests:Assembly-non-unique-reference-inner--Composite"/>
>          <reference name="NonUniqueReference" target="BComponent"/>
>          <reference name="NonUniqueReference" target="CComponent"/> 	
>      </component>
>     <component name="BComponent">
>         <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.BServiceImpl"/>
>         <property name="someProperty">some b component value</property>
>     </component>
>     
>     <component name="CComponent">
>         <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.CServiceImpl"/>        
>     </component>
> </composite>
> When I invoke two different methods from the component service AService, I got NullPointerException from one method invocation.
> --------------
> TestCase
> --------------
>         initDomain("nonuniquereference_outer.composite");
>         AService service = ServiceFinder.getService(AService.class, "TestNonUniqueReferenceComponent/AService");
>         service.getBProperty();
>         service.getState();
>         cleanupDomain();
> Here is the detailed info about exception
> -----------------------
> Exception Trace
> -----------------------
> java.lang.NullPointerException
> 	at org.apache.tuscany.sca.vtest.assembly.composite.impl.AServiceImpl.getBProperty(AServiceImpl.java:43)
> 	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:585)
> 	at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:132)
> 	at org.apache.tuscany.sca.binding.sca.impl.SCABindingInvoker.invoke(SCABindingInvoker.java:61)
> 	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:287)
> 	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:154)
> 	at $Proxy9.getBProperty(Unknown Source)
> 	at org.apache.tuscany.sca.vtest.assembly.composite.CompositeTestCase.ASM60006(CompositeTestCase.java:209)
> 	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:585)
> 	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.InvokeMethod.evaluate(InvokeMethod.java:20)
> 	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
> 	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
> 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
> 	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
> 	at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
> 	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
> 	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)

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


[jira] Resolved: (TUSCANY-2701) NPE when verifying conformance item ASM60006 in OASIS sepc

Posted by "Dan Becker (JIRA)" <de...@tuscany.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Becker resolved TUSCANY-2701.
---------------------------------

       Resolution: Fixed
    Fix Version/s: Java-SCA-Next

Resolved in branch 1.x at revision: 741186  


> NPE when verifying conformance item ASM60006 in OASIS sepc
> ----------------------------------------------------------
>
>                 Key: TUSCANY-2701
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2701
>             Project: Tuscany
>          Issue Type: Test
>          Components: Java SCA Assembly Model
>    Affects Versions: Java-SCA-1.3
>            Reporter: Shu Chao Wan
>            Assignee: Dan Becker
>            Priority: Minor
>             Fix For: Java-SCA-Next
>
>
> Conformance item 60006 says that, "The name of a composite <reference/> element MUST be unique across all the composite references in the composite."
> According to the above description, I wrote a composite file inner.composite with two same composite  <reference/> element  "NonUniqueReference" within the composite. 
> -----------------------
> inner.composite
> -----------------------
> <composite ...>
>      <service name="AService" promote="AComponent"/>
>      <component name="AComponent">
>              <reference name="b" />
>              <reference name="c" />
>      </component>
>      <reference name="NonUniqueReference" promote="AComponent/b" />
>      <reference name="NonUniqueReference" promote="AComponent/c" /> 
> </composite>
> And a outer composite file to use inner composite as the implementation of component.
> -----------------------
> outer.composite
> -----------------------
> <composite>
>       <component name="TestNonUniqueReferenceComponent">
>          <implementation.composite name="assembly-tests:Assembly-non-unique-reference-inner--Composite"/>
>          <reference name="NonUniqueReference" target="BComponent"/>
>          <reference name="NonUniqueReference" target="CComponent"/> 	
>      </component>
>     <component name="BComponent">
>         <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.BServiceImpl"/>
>         <property name="someProperty">some b component value</property>
>     </component>
>     
>     <component name="CComponent">
>         <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.CServiceImpl"/>        
>     </component>
> </composite>
> When I invoke two different methods from the component service AService, I got NullPointerException from one method invocation.
> --------------
> TestCase
> --------------
>         initDomain("nonuniquereference_outer.composite");
>         AService service = ServiceFinder.getService(AService.class, "TestNonUniqueReferenceComponent/AService");
>         service.getBProperty();
>         service.getState();
>         cleanupDomain();
> Here is the detailed info about exception
> -----------------------
> Exception Trace
> -----------------------
> java.lang.NullPointerException
> 	at org.apache.tuscany.sca.vtest.assembly.composite.impl.AServiceImpl.getBProperty(AServiceImpl.java:43)
> 	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:585)
> 	at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:132)
> 	at org.apache.tuscany.sca.binding.sca.impl.SCABindingInvoker.invoke(SCABindingInvoker.java:61)
> 	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:287)
> 	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:154)
> 	at $Proxy9.getBProperty(Unknown Source)
> 	at org.apache.tuscany.sca.vtest.assembly.composite.CompositeTestCase.ASM60006(CompositeTestCase.java:209)
> 	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:585)
> 	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.InvokeMethod.evaluate(InvokeMethod.java:20)
> 	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
> 	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
> 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
> 	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
> 	at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
> 	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
> 	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)

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


[jira] Commented: (TUSCANY-2701) NPE when verifying conformance item ASM60006 in OASIS sepc

Posted by "Simon Laws (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-2701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12652736#action_12652736 ] 

Simon Laws commented on TUSCANY-2701:
-------------------------------------

I think the answer to this is to turn what is currently a warning about duplicate reference names...

WARNING: Duplicate component reference name: Component = TestNonUniqueReferenceComponent Reference = NonUniqueReference

Into an ERROR so that when it's detected the runtime won't go on and try and run the composite. 

> NPE when verifying conformance item ASM60006 in OASIS sepc
> ----------------------------------------------------------
>
>                 Key: TUSCANY-2701
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2701
>             Project: Tuscany
>          Issue Type: Test
>          Components: Java SCA Assembly Model
>    Affects Versions: Java-SCA-1.3
>            Reporter: Shu Chao Wan
>            Priority: Minor
>
> Conformance item 60006 says that, "The name of a composite <reference/> element MUST be unique across all the composite references in the composite."
> According to the above description, I wrote a composite file inner.composite with two same composite  <reference/> element  "NonUniqueReference" within the composite. 
> -----------------------
> inner.composite
> -----------------------
> <composite ...>
>      <service name="AService" promote="AComponent"/>
>      <component name="AComponent">
>              <reference name="b" />
>              <reference name="c" />
>      </component>
>      <reference name="NonUniqueReference" promote="AComponent/b" />
>      <reference name="NonUniqueReference" promote="AComponent/c" /> 
> </composite>
> And a outer composite file to use inner composite as the implementation of component.
> -----------------------
> outer.composite
> -----------------------
> <composite>
>       <component name="TestNonUniqueReferenceComponent">
>          <implementation.composite name="assembly-tests:Assembly-non-unique-reference-inner--Composite"/>
>          <reference name="NonUniqueReference" target="BComponent"/>
>          <reference name="NonUniqueReference" target="CComponent"/> 	
>      </component>
>     <component name="BComponent">
>         <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.BServiceImpl"/>
>         <property name="someProperty">some b component value</property>
>     </component>
>     
>     <component name="CComponent">
>         <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.CServiceImpl"/>        
>     </component>
> </composite>
> When I invoke two different methods from the component service AService, I got NullPointerException from one method invocation.
> --------------
> TestCase
> --------------
>         initDomain("nonuniquereference_outer.composite");
>         AService service = ServiceFinder.getService(AService.class, "TestNonUniqueReferenceComponent/AService");
>         service.getBProperty();
>         service.getState();
>         cleanupDomain();
> Here is the detailed info about exception
> -----------------------
> Exception Trace
> -----------------------
> java.lang.NullPointerException
> 	at org.apache.tuscany.sca.vtest.assembly.composite.impl.AServiceImpl.getBProperty(AServiceImpl.java:43)
> 	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:585)
> 	at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:132)
> 	at org.apache.tuscany.sca.binding.sca.impl.SCABindingInvoker.invoke(SCABindingInvoker.java:61)
> 	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:287)
> 	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:154)
> 	at $Proxy9.getBProperty(Unknown Source)
> 	at org.apache.tuscany.sca.vtest.assembly.composite.CompositeTestCase.ASM60006(CompositeTestCase.java:209)
> 	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:585)
> 	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.InvokeMethod.evaluate(InvokeMethod.java:20)
> 	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
> 	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
> 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
> 	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
> 	at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
> 	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
> 	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)

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