Null Pointer Exception in databinding-echo sample using .99 snapshot (8-23)
---------------------------------------------------------------------------

                 Key: TUSCANY-1582
                 URL: https://issues.apache.org/jira/browse/TUSCANY-1582
             Project: Tuscany
          Issue Type: Bug
          Components: Java SCA Samples
    Affects Versions: Java-SCA-0.99
         Environment: windows
            Reporter: haleh mahbod
            Priority: Critical
             Fix For: Java-SCA-0.99


Following directions in the sample:

1) ant run gets nullp exception
echo>ant run
Buildfile: build.xml

run:
     [java] [Property] prefix: ABC
     [java] [Property] prefix1: ABC
     [java] [Property] bar: BAR
     [java] ComponentA --> Received message: <message><foo>123</foo></message> [
java.lang.String]
     [java] ComponentB --> Received message: [root: null] [org.apache.xerces.dom
.ElementNSImpl]
     [java] Passing thro invoker...
     [java] ComponentB --> Returned message: [root: null] [org.apache.xerces.dom
.ElementNSImpl]
     [java] ComponentA --> Returned message: <message><foo>123</foo></message> [
java.lang.String]
     [java] [Property] prefix: ABC
     [java] [Property] prefix1: ABC
     [java] [Property] bar: BAR
     [java] ComponentA --> Received message: <message><foo>123</foo></message> [
java.lang.String]
     [java] Exception in thread "main" java.lang.NullPointerException
     [java]     at org.apache.tuscany.sca.databinding.axiom.AxiomHelper.createOM
Element(AxiomHelper.java:68)
     [java]     at org.apache.tuscany.sca.databinding.axiom.Object2OMElement.cre
ateElement(Object2OMElement.java:45)
     [java]     at org.apache.tuscany.sca.databinding.axiom.Object2OMElement.cre
ateElement(Object2OMElement.java:34)
     [java]     at org.apache.tuscany.sca.databinding.impl.Java2SimpleTypeTransf
ormer.transform(Java2SimpleTypeTransformer.java:48)
     [java]     at org.apache.tuscany.sca.databinding.DefaultTransformerExtensio
nPoint$LazyPullTransformer.transform(DefaultTransformerExtensionPoint.java:166)
     [java]     at org.apache.tuscany.sca.databinding.impl.MediatorImpl.mediate(
MediatorImpl.java:73)
     [java]     at org.apache.tuscany.sca.core.databinding.transformers.Input2In
putTransformer.transform(Input2InputTransformer.java:181)
     [java]     at org.apache.tuscany.sca.core.databinding.transformers.Input2In
putTransformer.transform(Input2InputTransformer.java:46)
     [java]     at org.apache.tuscany.sca.databinding.impl.MediatorImpl.mediate(
MediatorImpl.java:73)
     [java]     at org.apache.tuscany.sca.core.databinding.wire.DataTransformati
onInteceptor.transform(DataTransformationInteceptor.java:168)
     [java]     at org.apache.tuscany.sca.core.databinding.wire.DataTransformati
onInteceptor.invoke(DataTransformationInteceptor.java:66)
     [java]     at org.apache.tuscany.sca.binding.sca.impl.RuntimeSCABindingInvo
ker.invoke(RuntimeSCABindingInvoker.java:48)
     [java]     at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.i
nvoke(JDKInvocationHandler.java:236)
     [java]     at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.i
nvoke(JDKInvocationHandler.java:93)
     [java]     at $Proxy9.call1(Unknown Source)
     [java]     at dbecho.ComponentAImpl.call1(ComponentAImpl.java:50)
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
sorImpl.java:39)
     [java]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
hodAccessorImpl.java:25)
     [java]     at java.lang.reflect.Method.invoke(Method.java:585)
     [java]     at org.apache.tuscany.sca.implementation.java.invocation.JavaImp
lementationInvoker.invoke(JavaImplementationInvoker.java:91)
     [java]     at org.apache.tuscany.sca.implementation.java.invocation.PassByV
alueInvoker.invoke(PassByValueInvoker.java:62)
     [java]     at org.apache.tuscany.sca.binding.sca.impl.RuntimeSCABindingInvo
ker.invoke(RuntimeSCABindingInvoker.java:48)
     [java]     at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.i
nvoke(JDKInvocationHandler.java:236)
     [java]     at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.i
nvoke(JDKInvocationHandler.java:93)
     [java]     at $Proxy9.call1(Unknown Source)
     [java]     at dbecho.EchoDataBindingClient.main(EchoDataBindingClient.java:
35)
     [java] Java Result: 1

Step  2) mvn gets the same issue

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running dbecho.EchoDataBindingTestCase
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.631 sec <<< FA
ILURE!
testTransform(dbecho.EchoDataBindingTestCase)  Time elapsed: 0.591 sec  <<< ERRO
R!
org.osoa.sca.ServiceRuntimeException: java.lang.NullPointerException
        at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCAD
omain.java:264)
        at org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.
java:69)
        at dbecho.EchoDataBindingTestCase.setUp(EchoDataBindingTestCase.java:34)

        at junit.framework.TestCase.runBare(TestCase.java:132)
        at junit.framework.TestResult$1.protect(TestResult.java:110)
        at junit.framework.TestResult.runProtected(TestResult.java:128)
        at junit.framework.TestResult.run(TestResult.java:113)
        at junit.framework.TestCase.run(TestCase.java:124)
        at junit.framework.TestSuite.runTest(TestSuite.java:232)
        at junit.framework.TestSuite.run(TestSuite.java:227)
        at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.
java:35)
        at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.
java:62)
        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes
tSet(AbstractDirectoryTestSuite.java:138)
        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Ab
stractDirectoryTestSuite.java:125)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Su
refireBooter.java:290)
        at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.j
ava:818)
Caused by: java.lang.NullPointerException
        at echo.module.EchoModuleActivator.start(EchoModuleActivator.java:48)
        at org.apache.tuscany.sca.host.embedded.impl.ReallySmallRuntime.startMod
ules(ReallySmallRuntime.java:225)
        at org.apache.tuscany.sca.host.embedded.impl.ReallySmallRuntime.start(Re
allySmallRuntime.java:142)
        at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(Def
aultSCADomain.java:93)
        at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCAD
omain.java:230)
        ... 20 more


Results :

Tests in error:
  testTransform(dbecho.EchoDataBindingTestCase)

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] There are test failures.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10 seconds
[INFO] Finished at: Thu Aug 23 17:54:49 PDT 2007
[INFO] Final Memory: 7M/14M
[INFO] ------------------------------------------------------------------------

C:\tuscany-new\sca-dist\tuscany-sca-1.0-incubating-SNAPSHOT\samples\databinding-
echo>

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to