Hi,

Thanks for the advice, it seems that the missing bundle activator
was the basic problem, but then it started to get really funny (-;

First, I just used the itest/osgi-tuscany bundles and got
an error "missing .componentType side file .componentType".
Ok, that seemed to be one step further. 

Then I used the OSGIBundleActivator in my own bundle (to be able 
to debug the code) - and again I got the "Could not locate OSGi bundle...". 
Hm, strange. Debugging a bit, I found that the class 
org.apache.tuscany.sca.osgi.runtime.EquinoxRuntime is missing
a setBundleContext method like the one in ...FelixRuntime that
also sets the static bundleContext variable in  EquinoxRuntime,
because the instance bundleContext is set to null again else in 
OSGiRuntime.initialize(). I added this method and got the same
message about missing .componentType files using my bundles. Fine.

But why had the original itest-bundle worked without the patch? Debugging 
a bit more I found that it did not instantiate EquinoxRuntime, but FelixRuntime,
because it did not find class org.eclipse.core.runtime.adaptor.EclipseStarter
in EquinoxRuntime.getInstance(). Using my bundle it was probably found
because I had added "DynamicImport-Package: *" to the MANIFEST.MF at some 
point. 
So I added org.eclipse.core.runtime.adaptor to the DynamicImport-Package entry
in the manifest of the itest-runtime-bundle and replaced the EquinoxRuntime 
class with my patched version.
(BTW, I suppose the same problem would occur with the KnopflerfishRuntime, 
but I did not do any tests).

Now I get a 

 java.lang.ClassCastException: 
org.apache.xerces.jaxp.datatype.DatatypeFactoryImpl
        at 
javax.xml.datatype.DatatypeFactory.newInstance(DatatypeFactory.java:87)
        at 
org.apache.tuscany.sca.databinding.impl.SimpleTypeMapperImpl.<init>(SimpleTypeMapperImpl.java:221)
        ...

which is on the other hand actually very similar to the error message that 
occurs 
when I run "mvn" in itest/osgi-tuscany, e.g.:

testOSGiTuscany_ImplementationJava(org.apache.tuscany.sca.test.osgi.tuscany.OSGi
TuscanyRuntimeTestCase)  Time elapsed: 15.156 sec  <<< ERROR!
java.lang.reflect.InvocationTargetException
        ...
        at 
org.apache.tuscany.sca.test.osgi.tuscany.OSGiTuscanyRuntimeTestCase.testOSGiTuscanyUsingOSGiClient(OSGiTuscanyRuntimeTestCase.java:106)
Caused by: java.lang.IllegalArgumentException: 
javax.xml.datatype.DatatypeConfigurationException: Provider 
org.apache.xerces.jaxp.datatype.DatatypeFactoryImpl not found
        at 
org.apache.tuscany.sca.databinding.impl.SimpleTypeMapperImpl.<init>(SimpleTypeMapperImpl.java:223)
        ...
Caused by: javax.xml.datatype.DatatypeConfigurationException: Provider 
org.apache.xerces.jaxp.datatype.DatatypeFactoryImpl not found
        at 
javax.xml.datatype.DatatypeFactory.newInstance(DatatypeFactory.java:93)
        at 
org.apache.tuscany.sca.databinding.impl.SimpleTypeMapperImpl.<init>(SimpleTypeMapperImpl.java:221)
        ... 37 more
Caused by: java.lang.ClassNotFoundException: 
org.apache.xerces.jaxp.datatype.DatatypeFactoryImpl
        at java.lang.ClassLoader.findClass(ClassLoader.java:358)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at 
org.apache.tuscany.sca.osgi.runtime.OSGiBundleActivator$BundleClassLoader.loadClass(OSGiBundleActivator.java:192)

(same for testOSGiTuscany_BindingWS)

So I think, there is crrently something wrong with the Manifest files in the 
itest-bundles
The ones in my own bundles are quite simple: the 3rdparty bundle exports 
everything, the
tuscany bundle even uses "Require-Bundle" to access everything in the 3rdparty 
bundle instead
doing a sensible "Import-Package" ... but it seems to work for the moment.
However, I'm not an OSGi expert myself, so I do not know where the problem is 
exactly.

Should I raise a JIRA for any of this?

Cheers,
Juergen.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to