Ok if its not the .classpath what else could be causing it? The problem was when running in Eclipse the test classes from the deployment and node-impl modules were being included in the classpath for the calculator sample.
...ant On Tue, Nov 24, 2009 at 5:24 PM, Raymond Feng <[email protected]> wrote: > I don't think it is a .classpath issue. When you launch a test case or main > class within Eclipse, it aggregates all the class path entries from the > depending projects. Eclipse doesn't have the concept of "test" dependency > but maven does. > > Thanks, > Raymond > -------------------------------------------------- > From: "ant elder" <[email protected]> > Sent: Tuesday, November 24, 2009 3:49 AM > To: <[email protected]> > Subject: Re: svn commit: r719807 - > /tuscany/java/sca/samples/calculator/src/test/java/calculator/CalculatorTestCase.java > >> I chatted with Luciano about this the other day and we debugged >> through it and it turns out the problem was caused by some module test >> classes being added to the samples classpath. It looked like that >> could have been caused by a bug in the mvn -Peclipse .classpath >> generation though i've not been able to recreate it. Does anyone else >> see any of the module test classes in the samples referenced libraries >> in Eclipse? >> >> ...ant >> >> On Sat, Nov 22, 2008 at 5:11 AM, <[email protected]> wrote: >>> >>> Author: lresende >>> Date: Fri Nov 21 21:11:38 2008 >>> New Revision: 719807 >>> >>> URL: http://svn.apache.org/viewvc?rev=719807&view=rev >>> Log: >>> Using contribution helper to properly discover the contribution location >>> >>> Modified: >>> >>> >>> tuscany/java/sca/samples/calculator/src/test/java/calculator/CalculatorTestCase.java >>> >>> Modified: >>> tuscany/java/sca/samples/calculator/src/test/java/calculator/CalculatorTestCase.java >>> URL: >>> http://svn.apache.org/viewvc/tuscany/java/sca/samples/calculator/src/test/java/calculator/CalculatorTestCase.java?rev=719807&r1=719806&r2=719807&view=diff >>> >>> ============================================================================== >>> --- >>> tuscany/java/sca/samples/calculator/src/test/java/calculator/CalculatorTestCase.java >>> (original) >>> +++ >>> tuscany/java/sca/samples/calculator/src/test/java/calculator/CalculatorTestCase.java >>> Fri Nov 21 21:11:38 2008 >>> @@ -18,9 +18,11 @@ >>> */ >>> package calculator; >>> >>> -import static org.junit.Assert.*; >>> +import static org.junit.Assert.assertEquals; >>> >>> import org.apache.tuscany.sca.node.Client; >>> +import org.apache.tuscany.sca.node.Contribution; >>> +import org.apache.tuscany.sca.node.ContributionLocationHelper; >>> import org.apache.tuscany.sca.node.Node; >>> import org.apache.tuscany.sca.node.NodeFactory; >>> import org.junit.AfterClass; >>> @@ -40,7 +42,9 @@ >>> >>> �...@beforeclass >>> public static void setUpBeforeClass() throws Exception { >>> - node = NodeFactory.newInstance().createNode(); >>> + NodeFactory factory = NodeFactory.newInstance(); >>> + String contribution = >>> ContributionLocationHelper.getContributionLocation(CalculatorClient.class); >>> + node = factory.createNode("Calculator.composite", new >>> Contribution("calculator", contribution)); >>> node.start(); >>> >>> calculatorService = >>> ((Client)node).getService(CalculatorService.class, >>> "CalculatorServiceComponent"); >>> >>> >>> >
