Hi Frank,

I've not been able to run the osgi supplychain sample due to other
reasons, but during my investiguations I spotted the following in the
build.xml file

<jar jarfile="target/classes/DSRetailer.jar"
manifest="target/classes/osgi/ds/Retailer.mf" >
            <fileset dir="target/classes"
                     includes="supplychain/retailer/Retailer.class \
                               Vosgi/ds/Retailer.xml \

supplychain/retailer/OSGiRetailerComponentImpl.class"
            />

You'll see that there is a spurious "V" at the start of the forth
line, which should not be there.  This is line 78 in the file.

Also, looking at your exception, the OSGi runtime used to host the
implementation.osgi components appears to be missing the declarative
services support.  This is added through a config file, which in the
case of this sample does not appear to exist.  Look for files call
felix.config.properties for examples.  You would also need to set the
system property felix.config.properties to point to your configuration
file.  The line which configures in the Service Component Runtime for
itest/osgi-implementation is

felix.auto.start.1= \
    
"file://${FELIX_DIR}/org.apache.felix.scr/1.0.2/org.apache.felix.scr-1.0.2.jar"
\
    
"file://${FELIX_DIR}/org.apache.felix.configadmin/1.0.1/org.apache.felix.configadmin-1.0.1.jar"

If you look for files call OSGiTestUtil.java , they show the System
property being configured like this:

        String felixConfigFileName =
"file:target/test-classes/osgi/felix/felix.config.properties";
        System.setProperty("felix.config.properties", felixConfigFileName);

I think this sample needs a bit of an overhaul.  I hope this helps.

Regards, Graham.

2008/9/7 Frank Egger <[EMAIL PROTECTED]>:
> hi all!
>
> i tried to get the supplychain-example running with declarative services
> and therefore changed the instanciation of the SCADomain in
> SupplyChainClient.java to supplychain.ds.composite.
>
> but when i run the example with "ant run" i get the following error, which
> i cannot understand:
>
> run:
>
>     [java] Using default configuration properties.
>     [java] Main thread Thread[main,5,main]
>     [java] WARNING: Unable to resolve bundle 3
> (org.osgi.framework.BundleException: Unresolved package in bundle 3:
> package; (package=org.osgi.service.component))
>     [java] java.security.PrivilegedActionException:
> java.lang.ClassNotFoundException: supplychain.retailer.Retailer
>     [java]     at java.security.AccessController.doPrivileged(Native Method)
>     [java]     at
> org.apache.tuscany.sca.implementation.osgi.invocation.OSGiImplementationProvider.resolveWireRegisterProxyService(OSGiImplementationProvider.java:874)
>     [java]     at
> org.apache.tuscany.sca.implementation.osgi.invocation.OSGiImplementationProvider.resolveBundle(OSGiImplementationProvider.java:987)
>     [java]     at
> org.apache.tuscany.sca.implementation.osgi.invocation.OSGiImplementationProvider.startBundle(OSGiImplementationProvider.java:401)
>     [java]     at
> org.apache.tuscany.sca.implementation.osgi.invocation.OSGiImplementationProvider.getScopeContainer(OSGiImplementationProvider.java:1092)
>     [java]     at
> org.apache.tuscany.sca.implementation.osgi.invocation.OSGiTargetInvoker.invokeTarget(OSGiTargetInvoker.java:95)
>     [java]     at
> org.apache.tuscany.sca.implementation.osgi.invocation.OSGiTargetInvoker.invoke(OSGiTargetInvoker.java:190)
>     [java]     at
> org.apache.tuscany.sca.binding.sca.impl.SCABindingInvoker.invoke(SCABindingInvoker.java:61)
>     [java]     at
> org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:287)
>     [java]     at
> org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:154)
>     [java]     at $Proxy7.purchaseGoods(Unknown Source)
>     [java]     at
> supplychain.SupplyChainClient.main(SupplyChainClient.java:37)
>     [java] Caused by: java.lang.ClassNotFoundException:
> supplychain.retailer.Retailer
>     [java]     at
> org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1498)
>     [java]     at
> org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:358)
>     [java]     at
> org.apache.tuscany.sca.implementation.osgi.invocation.OSGiImplementationProvider$3.run(OSGiImplementationProvider.java:876)
>     [java]     at
> org.apache.tuscany.sca.implementation.osgi.invocation.OSGiImplementationProvider$3.run(OSGiImplementationProvider.java:875)
>     [java]     ... 12 more
>     [java] Exception in thread "main"
> org.apache.tuscany.sca.core.factory.ObjectCreationException:
> org.apache.tuscany.sca.core.factory.ObjectCreationException:
> java.security.PrivilegedActionException:
> java.lang.ClassNotFoundException: supplychain.retailer.Retailer
>     [java]     at
> org.apache.tuscany.sca.implementation.osgi.invocation.OSGiImplementationProvider.startBundle(OSGiImplementationProvider.java:446)
>     [java]     at
> org.apache.tuscany.sca.implementation.osgi.invocation.OSGiImplementationProvider.getScopeContainer(OSGiImplementationProvider.java:1092)
>     [java]     at
> org.apache.tuscany.sca.implementation.osgi.invocation.OSGiTargetInvoker.invokeTarget(OSGiTargetInvoker.java:95)
>     [java]     at
> org.apache.tuscany.sca.implementation.osgi.invocation.OSGiTargetInvoker.invoke(OSGiTargetInvoker.java:190)
>     [java]     at
> org.apache.tuscany.sca.binding.sca.impl.SCABindingInvoker.invoke(SCABindingInvoker.java:61)
>     [java]     at
> org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:287)
>     [java]     at
> org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:154)
>     [java]     at $Proxy7.purchaseGoods(Unknown Source)
>     [java]     at
> supplychain.SupplyChainClient.main(SupplyChainClient.java:37)
>     [java] Caused by:
> org.apache.tuscany.sca.core.factory.ObjectCreationException:
> java.security.PrivilegedActionException:
> java.lang.ClassNotFoundException: supplychain.retailer.Retailer
>     [java]     at
> org.apache.tuscany.sca.implementation.osgi.invocation.OSGiImplementationProvider.resolveBundle(OSGiImplementationProvider.java:997)
>     [java]     at
> org.apache.tuscany.sca.implementation.osgi.invocation.OSGiImplementationProvider.startBundle(OSGiImplementationProvider.java:401)
>     [java]     ... 8 more
>     [java] Caused by: java.security.PrivilegedActionException:
> java.lang.ClassNotFoundException: supplychain.retailer.Retailer
>     [java]     at java.security.AccessController.doPrivileged(Native Method)
>     [java]     at
> org.apache.tuscany.sca.implementation.osgi.invocation.OSGiImplementationProvider.resolveWireRegisterProxyService(OSGiImplementationProvider.java:874)
>     [java]     at
> org.apache.tuscany.sca.implementation.osgi.invocation.OSGiImplementationProvider.resolveBundle(OSGiImplementationProvider.java:987)
>     [java]     ... 9 more
>     [java] Caused by: java.lang.ClassNotFoundException:
> supplychain.retailer.Retailer
>     [java]     at
> org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1498)
>     [java]     at
> org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:358)
>     [java]     at
> org.apache.tuscany.sca.implementation.osgi.invocation.OSGiImplementationProvider$3.run(OSGiImplementationProvider.java:876)
>     [java]     at
> org.apache.tuscany.sca.implementation.osgi.invocation.OSGiImplementationProvider$3.run(OSGiImplementationProvider.java:875)
>     [java]     ... 12 more
>     [java] Java Result: 1
>
>
>

Reply via email to