On 8/16/07, Steve Jones <[EMAIL PROTECTED] > wrote:
>
> Hi,
>
> If I do a full build of java\sca using:
>
> mvn -o -fn clean install
>
>
> The "Calculator Sample WebApp" builds and the unit test passes OK.
>
>
> If I go to the java\sca\samples\calculator-webapp folder
> and issue the same command the code builds but
> the test fails on a NPE.
>
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> Running calculator.CalculatorTestCase
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.265
> sec <<< FAILURE!
> testCalculator(calculator.CalculatorTestCase)  Time elapsed: 0.187 sec
> <<< ERROR!
> org.osoa.sca.ServiceRuntimeException: java.lang.NullPointerException
>         at
> org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(
> SCADomain.java:264)
>         at org.apache.tuscany.sca.host.embedded.SCADomain.newInstance (
> SCADomain.java:69)
>         at calculator.CalculatorTestCase.setUp(CalculatorTestCase.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.executeTestSet(
> AbstractDirectoryTestSuite.java:138)
>         at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute (
> AbstractDirectoryTestSuite.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(
> DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess (
> SurefireBooter.java:290)
>         at org.apache.maven.surefire.booter.SurefireBooter.main(
> SurefireBooter.java:818)
> Caused by: java.lang.NullPointerException
>         at
> org.apache.tuscany.sca.host.embedded.impl.ReallySmallRuntime.start (
> ReallySmallRuntime.java:94)
>         at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain
> .<init>(DefaultSCADomain.java:93)
>         at
> org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(
> SCADomain.java :230)
>         ... 20 more
>
>
> I'm new to Tuscany (and Maven) can somebody give me a hint as to what
> I might be
> doing wrong?
>
> Thanks, Steve.
>
Hi Steve,

It's not obvious from the stack trace but I just had something very similar.
I have been messing about with different builds to get the snapshots out.
When I went back to my development build lo and behold everything built fine
but some things wouldn't run from the individual projects. I did my usual
thing...

Closed down my ide
Started fresh dos windows
svn update .....
cd java/sca
mvn clean
remove all sca artefacts from my local repo
cd java/sca
mvn

And it sorted it for me.

Regards

Simon

Reply via email to