Tomasz,
Sorry for the delay in my reply, I've been extremely busy with work
recently.
I'd like to suggest that you import your plug-ins into your Eclipse
workspace as plug-in projects and run them from there for testing. Then you
won't have to copy them to your Eclipse directory every time you make a
change and you can take advantage of all the Eclipse PDE Tools.
Anyway, on to your problem. You said you saw two new plug-ins,
org.apache.tuscany.sdo.lib and org.apache.tuscany.sdo.spec. Are you also
seeing impl and tools as available plug-ins? If not, that will be a
problem. Also, for the buddy policy to work correctly, the SDO plug-ins
need to depend on each other. Here's how my SDO dependencies are set up in
my manifests:
org.apache.tuscany.sdo.impl depends on
org.apache.tuscany.sdo.spec
org.apache.tuscany.sdo.lib depends on
org.apache.tuscany.sdo.spec
org.apache.tuscany.sdo.impl
org.apache.tuscany.spec and org.apache.tuscany.tools don't need to depend
on the other SDO plug-ins
One final note. What version of EMF are you running with? Tuscany
officially requires EMF 2.2.3, but it may also work with 2.3 (which comes
with Eclipse 3.3). It will NOT work with EMF 2.4, but you probably wouldn't
have that unless you're using Eclipse 3.4.
I hope some of that helps. Write me back with any more questions and I'll
try to be a little more responsive in the future. :-)
Regards,
Eric
Tomasz Klukowski [EMAIL PROTECTED] wrote on 05/20/2008
04:47:51 PM:
[image removed]
Re: SDO in Eclipse Plug-in
Tomasz Klukowski
to:
tuscany-user
05/20/2008 04:58 PM
Please respond to tuscany-user.
Eric,
As you wrote, I had Tuscany in four .jar (api, impl, lib, tools) files
added to my build-path. I appended the line:
Eclipse-BuddyPolicy: dependent
to the each MANIFEST.MF file, but it did not help very much - earlier my
plug-in crashed with
java.lang.NoClassDefFoundError: org/apache/tuscany/sdo/api/SDOUtil
(...)
Caused by: java.lang.ClassNotFoundException:
org.apache.tuscany.sdo.api.SDOUtil at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass
(BundleLoader.java:402)
and now it crashes with
java.lang.ExceptionInInitializerError
(...)
Caused by: java.lang.NullPointerException
at org.apache.tuscany.sdo.api.SDOUtil.clinit(SDOUtil.java:48)
Then I copied these .jar files to /usr/lib/eclipse/plugins/ and ran
eclipse -clean
Two new plug-ins were found: org.apache.tuscany.sdo.lib and
org.apache.tuscany.sdo.spec. I added them to the required plug-ins, but
it did not change anything.
What am I doing wrong?
below is the fragment of code and the error log:
try {
scope = SDOUtil.createHelperContext();
}
catch (Throwable e) {
e.printStackTrace();
}
my error log:
java.lang.ExceptionInInitializerError
at omegaomegavisio.Activator.init(Activator.java:47)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance
(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance
(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator
(AbstractBundle.java:136)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start
(BundleContextImpl.java:962)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker
(BundleHost.java:317)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.start
(AbstractBundle.java:256)
at
org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:342)
at
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.preFindLocalClass
(EclipseLazyStarter.java:88)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass
(ClasspathManager.java:412)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass
(DefaultClassLoader.java:189)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass
(BundleLoader.java:334)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass
(BundleLoader.java:386)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass
(BundleLoader.java:347)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass
(DefaultClassLoader.java:83)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.loadClass
(BundleLoader.java:278)
at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClass
(BundleHost.java:227)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass
(AbstractBundle.java:1245