Apache TUSCANY SCA tutorial has a broken link

687 Views Asked by At

I am trying to learn Service Component Architecture (SCA), so I started with the Apache Tuscany tutorial in this link: http://tuscany.apache.org/getting-started-with-tuscany.html

At the beginning of this tutorial, the author provides a link to the latest release distribution, and asks to download the tuscany libraries from that link. Here's the link he provided: http://cwiki.apache.org/TUSCANY/sca-java-releases.html

Whenever I open this link, the page says: The requested URL /TUSCANY/sca-java-releases.html was not found on this server.

So, I tried to solve this problem by searching in google for apache-tuscany-sca-1.3.2. Though, I only found the libraries for apache-tuscany-sca-1.6.2. I downloaded them from this link: http://tuscany.apache.org/sca-java-1x-releases.html, and I followed the tutorial.

However, the apache-tuscany-sca-1.6.2 library seems to be missing. In the first part of the tutorial which says create the Catalog Interface,

package services;

    import org.osoa.sca.annotations.Remotable;

    @Remotable
    public interface Catalog {
        Item[] get();
    }

Here, I get an error in this line import org.osoa.sca.annotations.Remotable;. This library does not exist with the TUSCANY library I downloaded.

I tried to solve the problem by searching for the jar file that contains org.osoa.sca.annotations.Remotable. I found one and I added it to the library. I did similar things over and over again to get the missing jar files and I added them to the tuscany library. However, when I run the program, I get errors. These errors directs me to the jar files I added to the tuscany library. Here are the errors:

Starting ...
يول 12, 2013 7:08:54 م org.apache.tuscany.sca.node.impl.NodeImpl <init>
INFO: Creating node: store.composite
يول 12, 2013 7:08:55 م org.apache.tuscany.sca.node.impl.NodeImpl configureNode
INFO: Loading contribution: file:/C:/Users/student/workspace/store/bin/
Exception in thread "main" org.osoa.sca.ServiceRuntimeException: java.lang.NullPointerException
    at org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:204)
    at org.apache.tuscany.sca.node.impl.NodeFactoryImpl.createSCANodeFromClassLoader(NodeFactoryImpl.java:37)
    at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.init(DefaultSCADomain.java:178)
    at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(DefaultSCADomain.java:100)
    at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:182)
    at org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.java:63)
    at launch.Launch.main(Launch.java:8)
Caused by: java.lang.NullPointerException
    at org.apache.tuscany.sca.databinding.DefaultDataBindingExtensionPoint.addDataBinding(DefaultDataBindingExtensionPoint.java:85)
    at org.apache.tuscany.sca.databinding.DefaultDataBindingExtensionPoint.loadDataBindings(DefaultDataBindingExtensionPoint.java:122)
    at org.apache.tuscany.sca.databinding.DefaultDataBindingExtensionPoint.introspectType(DefaultDataBindingExtensionPoint.java:196)
    at org.apache.tuscany.sca.core.databinding.processor.DataBindingJavaInterfaceProcessor.processInterface(DataBindingJavaInterfaceProcessor.java:128)
    at org.apache.tuscany.sca.core.databinding.processor.DataBindingJavaInterfaceProcessor.visitInterface(DataBindingJavaInterfaceProcessor.java:55)
    at org.apache.tuscany.sca.interfacedef.java.impl.JavaInterfaceIntrospectorImpl.introspectInterface(JavaInterfaceIntrospectorImpl.java:123)
    at org.apache.tuscany.sca.interfacedef.java.impl.JavaInterfaceFactoryImpl.createJavaInterface(JavaInterfaceFactoryImpl.java:58)
    at org.apache.tuscany.sca.implementation.java.introspect.impl.ServiceProcessor.createService(ServiceProcessor.java:175)
    at org.apache.tuscany.sca.implementation.java.introspect.impl.ServiceProcessor.visitClass(ServiceProcessor.java:75)
    at org.apache.tuscany.sca.implementation.java.impl.JavaClassIntrospectorImpl.introspectClass(JavaClassIntrospectorImpl.java:72)
    at org.apache.tuscany.sca.implementation.java.impl.JavaImplementationFactoryImpl.createJavaImplementation(JavaImplementationFactoryImpl.java:55)
    at org.apache.tuscany.sca.implementation.java.xml.JavaImplementationProcessor.resolve(JavaImplementationProcessor.java:228)
    at org.apache.tuscany.sca.implementation.java.xml.JavaImplementationProcessor.resolve(JavaImplementationProcessor.java:74)
    at org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint$LazyStAXArtifactProcessor.resolve(DefaultStAXArtifactProcessorExtensionPoint.java:388)
    at org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor.resolve(ExtensibleStAXArtifactProcessor.java:183)
    at org.apache.tuscany.sca.assembly.xml.BaseAssemblyProcessor.resolveImplementation(BaseAssemblyProcessor.java:340)
    at org.apache.tuscany.sca.assembly.xml.CompositeProcessor.resolve(CompositeProcessor.java:1028)
    at org.apache.tuscany.sca.assembly.xml.CompositeProcessor.resolve(CompositeProcessor.java:90)
    at org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint$LazyStAXArtifactProcessor.resolve(DefaultStAXArtifactProcessorExtensionPoint.java:388)
    at org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor.resolve(ExtensibleStAXArtifactProcessor.java:183)
    at org.apache.tuscany.sca.assembly.xml.CompositeDocumentProcessor.resolve(CompositeDocumentProcessor.java:231)
    at org.apache.tuscany.sca.assembly.xml.CompositeDocumentProcessor.resolve(CompositeDocumentProcessor.java:59)
    at org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor.resolve(ExtensibleURLArtifactProcessor.java:106)
    at org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl.processResolvePhase(ContributionServiceImpl.java:625)
    at org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl.addContribution(ContributionServiceImpl.java:430)
    at org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl.contribute(ContributionServiceImpl.java:198)
    at org.apache.tuscany.sca.node.impl.NodeImpl.configureNode(NodeImpl.java:524)
    at org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:200)
    ... 6 more

It seems that I should not add the missing libraries one by one. Therefore, I need help in finding the right collection of TUSCANY library that will work with this tutorial. Thank you.

1

There are 1 best solutions below

0
On

I solved the problem. In the part where they say:

"Since some of you maybe interested in debugging also the Tuscany runtime code we will attachthe Tuscany source to the Tuscany runtime jar in the following step. In the User Libraies dialog scroll down until you see the Tuscany runtime jar and select its Source attachment." 

I believe I did not get this step, and deleted one of the jar files, instead of adding.

apache-tuscany-sca-1.6.2 works OK with this tutorial. There is no problem.