Hi,

I already filed this issue to
https://issues.apache.org/jira/browse/TUSCANY-3567

At this time I tried only with Apache Felix to launch the example.
Today I gave it a try to use the shipped equinox via:

java -jar osgi-3.5.0-v20090520.jar -clean -console -configuration
..\features\configuration

When I want to start the sample following error appears (the same as in the
JIRA):

03.06.2010 10:26:11 org.apache.tuscany.sca.node.impl.NodeImpl start
INFO: Starting node: http://tuscany.apache.org/sca/1.1/nodes/default0
domain: tuscany.apache.org
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    at java.util.ArrayList.RangeCheck(ArrayList.java:547)
    at java.util.ArrayList.get(ArrayList.java:322)
    at 
org.apache.tuscany.sca.node.osgi.impl.OSGiNodeFactoryImpl.getNodeKey(OSGiNod
eFactoryImpl.java:129)
    at 
org.apache.tuscany.sca.node.impl.NodeFactoryImpl.addNode(NodeFactoryImpl.jav
a:113)
    at org.apache.tuscany.sca.node.impl.NodeImpl.start(NodeImpl.java:115)
    at calculator.CalculatorActivator.start(CalculatorActivator.java:42)
    at 
org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleConte
xtImpl.java:782)
    at java.security.AccessController.doPrivileged(Native Method)
    at 
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(Bu
ndleContextImpl.java:773)
    at 
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleConte
xtImpl.java:754)
    at 
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.j
ava:352)
    at 
org.eclipse.osgi.framework.internal.core.AbstractBundle.updateWorker(Abstrac
tBundle.java:625)
    at 
org.eclipse.osgi.framework.internal.core.AbstractBundle.update(AbstractBundl
e.java:572)
    at 
org.eclipse.osgi.framework.internal.core.AbstractBundle.update(AbstractBundl
e.java:555)
    at 
org.eclipse.osgi.framework.internal.core.FrameworkCommandProvider._update(Fr
ameworkCommandProvider.java:380)
    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:597)
    at 
org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.execute
(FrameworkCommandInterpreter.java:155)
    at 
org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(Framewor
kConsole.java:303)
    at 
org.eclipse.osgi.framework.internal.core.FrameworkConsole.console(FrameworkC
onsole.java:288)
    at 
org.eclipse.osgi.framework.internal.core.FrameworkConsole.run(FrameworkConso
le.java:224)
    at java.lang.Thread.run(Thread.java:637)

Does anyone before used the Activator to launch an SCA composite?

The code looks like this:

    public void start(BundleContext context) throws Exception {
        try {
            NodeFactory factory = NodeFactory.newInstance();
            String url =
ContributionLocationHelper.getContributionLocation(getClass());
            Contribution contrib = new Contribution("c1", url);
            node = factory.createNode("Calculator.composite", contrib);
            node.start();
        } catch (Throwable e) {
            e.printStackTrace();
        }
    }

Is there anything wrong?

I am really stuck on this problem as I have to present some progress next
week. My objective is to to integrate SCA functionality in our framework
which is based on OSGi.

If someone can help me on this issue I would appreciate that...

Thanks,
Alex

Reply via email to