tuscany-user  

Re: Tuscany in OSGi

Rajini Sivaram
Fri, 07 Mar 2008 10:51:13 -0800

Daniel,

>From your stack trace, it looks like Tuscany didn't get as far as handling a
bundleresource:// URL. It looks like "tuscany-sca.xsd" could not be located,
using ReallySmallRuntimeBuilder.*class*.getClassLoader().getResource("
tuscany-sca.xsd"). Do you have Tuscany packaged as a single bundle? There
are still some outstanding issues with Tuscany classloading when Tuscany is
packaged into multiple bundles at the Tuscany module level - eg.
tuscany-sca.xsd is in the default package.

You could still run into the URL issues described in (
http://marc.info/?l=tuscany-user&m=119559170431301&w=2) once you get as far
as loading your composite files. I will raise that as a JIRA to try and get
it fixed. At the moment, you can workaround the issue either by setting a
thread context classloader (for a generic solution) or using the
ClassLoadingHook described by Jason (for Eclipse). Basically the
classloader.getResource() needs to return a file:// or jar:// URL for the
resources loaded from the contribution, when using DefaultSCADomain.




On 3/7/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> For the EILF project we are trying to get tuscany run within OSGi
> (Equinox to be precise). We had some trouble generating the Tuscany
> bundles but finally managed to start them within Equinox and our code to
> compile.
>
> However, during SCADomain creation I get the following exception:
>
> org.osoa.sca.ServiceRuntimeException: java.lang.NullPointerException
>        at
> org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADoma
> in.java:264)
>        at
> org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.jav
> a:69)
>        at crawlerosgi.Activator.start(Activator.java:28)
>        at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleC
> ontextImpl.java:999)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivato
> r(BundleContextImpl.java:993)
>        at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleC
> ontextImpl.java:974)
>        at
> org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHo
> st.java:346)
>        at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractB
> undle.java:350)
>        at
> org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framewor
> k.java:1118)
>        at
> org.eclipse.osgi.framework.internal.core.PackageAdminImpl.resumeBundles(
> PackageAdminImpl.java:266)
>        at
> org.eclipse.osgi.framework.internal.core.PackageAdminImpl.doResolveBundl
> es(PackageAdminImpl.java:234)
>        at
> org.eclipse.osgi.framework.internal.core.PackageAdminImpl$1.run(PackageA
> dminImpl.java:164)
>        at java.lang.Thread.run(Thread.java:595)
> Caused by: java.lang.NullPointerException
>        at
> org.apache.tuscany.sca.host.embedded.impl.ReallySmallRuntimeBuilder.crea
> teContributionService(ReallySmallRuntimeBuilder.java:183)
>        at
> org.apache.tuscany.sca.host.embedded.impl.ReallySmallRuntime.start(Reall
> ySmallRuntime.java:134)
>        at
> org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.init(DefaultS
> CADomain.java:118)
>        at
> org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(Defaul
> tSCADomain.java:109)
>        at
> org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADoma
> in.java:230)
>        ... 13 more
>
>
>
> After searching the code (ReallySmallRuntimeBuilder.java:183) I found
> that the problem is that file "tuscany-sca.xsd" cannot be found. I guess
> it's because of the "bundleresource://" problem. I found topic "Eclipse
> RCP apps and Tuscany" describing this problem.
> Are there any solutions available, yet ?
>
> BTW: Is it possible to debug the tuscany bundles? I could not attach
> sourcecode in eclipse.
>
> Bye,
> Daniel
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Thank you...

Regards,

Rajini