On Wed, Jun 23, 2010 at 4:00 PM, Roberts, Keith (SAIC)
<keith.robe...@va.gov> wrote:
> Hi all
>
>
>
> I’m a newbie, trying to get a better understanding of Tuscany be studying
> and executing the examples…
>
>
>
> I’m embarrassed to admit that I have not gotten past the simplest helloworld
> example.
>
>
>
> I’ve looked at the ‘store’ example and feel that I understand it pretty
> well. I went through the tutorial and was able to get it to work.
>
>
>
> I am assuming that the helloworld example needs to be launched to host the
> helloworld service just like the store example. I tried installing the
> eclipse Tuscany plugin but had problems with the eclipse update manager.
>
>
>
> I didn’t see a launcher so I built one like the store example listed below.
>
>
>
> package launch;
>
>
>
> 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;
>
>
>
> public class Launch {
>
>
>
>             /**
>
>              * @param args
>
>              */
>
>             public static void main(String[] args)  throws Exception {
>
>         System.out.println("Starting ...");
>
>         String contribution =
> ContributionLocationHelper.getContributionLocation(Launch.class);
>
>         Node node =
> NodeFactory.newInstance().createNode("helloworld.composite", new
> Contribution("test", contribution));
>
>         node.start();
>
>         System.out.println("store.composite ready for big business !!!");
>
>         System.in.read();
>
>         System.out.println("Stopping ...");
>
>         node.stop();
>
>         System.out.println();
>
>             }
>
>
>
> }
>
>
>
>
>
> But when I launch I get this exception.
>
>
>
> SEVERE: Element
> {http://docs.oasis-open.org/ns/opencsa/sca/200912}implementation.java cannot
> be processed. ([row,col,system-id]:
> [26,9,"file:/C:/data/frameworks/tuscany-sca-2.0-M5/samples/helloworld/target/classes/helloworld.composite"])
>
> Exception in thread "main" java.lang.IllegalStateException:
> org.oasisopen.sca.ServiceRuntimeException: [Contribution: test, Artifact:
> helloworld.composite] - Element
> {http://docs.oasis-open.org/ns/opencsa/sca/200912}implementation.java cannot
> be processed. ([row,col,system-id]:
> [26,9,"file:/C:/data/frameworks/tuscany-sca-2.0-M5/samples/helloworld/target/classes/helloworld.composite"])
>
>       at org.apache.tuscany.sca.node.impl.NodeImpl.start(NodeImpl.java:173)
>
>       at launch.Launch.main(Launch.java:17)
>
> Caused by: org.oasisopen.sca.ServiceRuntimeException: [Contribution: test,
> Artifact: helloworld.composite] - Element
> {http://docs.oasis-open.org/ns/opencsa/sca/200912}implementation.java cannot
> be processed. ([row,col,system-id]:
> [26,9,"file:/C:/data/frameworks/tuscany-sca-2.0-M5/samples/helloworld/target/classes/helloworld.composite"])
>
>       at
> org.apache.tuscany.sca.node.impl.NodeFactoryImpl.analyzeProblems(NodeFactoryImpl.java:199)
>
>       at
> org.apache.tuscany.sca.node.impl.NodeFactoryImpl.loadContributions(NodeFactoryImpl.java:432)
>
>       at org.apache.tuscany.sca.node.impl.NodeImpl.start(NodeImpl.java:125)
>
>       ... 1 more
>
>
>
> I expected this to run. I’m not sure if there is an issue with how I have
> specified the helloworld.composite in the launcher or if there is a problem
> instantiating the HelloWorldImpl class, or some other issue.
>
>
>
> Once I get the helloworld example to run on the server; I’m expecting the
> helloworld-scaclient – HelloworldSCAClient application to run as the client
> to the helloworld server service.
>
>
>
> I think I’m on the right track but not sure. This is probably some little
> simple thing that I’m overlooking.
>
>
>
> Thanks in advance…
>
>
>
>
>
>
>
> Keith G. Roberts
>
> SAIC/Evolvent VA Account
>
> CHDR team
>
> 801-924-2130
>
>

Hi Keith

The error means that you don't have the implementation.java extension
on the classpath.  Can you check that you have the same set of Tuscany
modules on the classpath as you do for the store example. FYI, a
number of other ways of running SCA contributions with Tuscany are
described in the sample modules starting with the word "launcher"

Having said all that the helloworld module doesn't actually do
anything on it's own. It's a contribution that Tuscany will fire up
and then wait for someone to call the services that it provides.

There is a helloworld client that I believe will call the helloworld
service (see samples/helloworld-scaclient).  So once you manage to get
the helloworld contribution running try running HelloworldSCAClient.

The samples, and in particular the READMEs that go with them, are not
done yet so apologies that this is not obvious.

Regards

Simon

-- 
Apache Tuscany committer: tuscany.apache.org
Co-author of a book about Tuscany and SCA: tuscanyinaction.com

Reply via email to