Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Need some clarification points on M6
Need some clarification points on M6 [message #173200] Mon, 22 December 2003 17:04 Go to next message
Eclipse UserFriend
Originally posted by: alexsmr.NOJUNK.sympatico.ca

Hi,

I'm trying to experiment with M6 but still stuck in very simple (or not?)
things. Help will be greatly appreciated.

1)As far as I understang using compatability layer I cannot access the the
Bundle using getBundle on my plugin class because of:
"java.lang.LinkageError: Class org/osgi/framework/Bundle violates loader
constraints"
Is that correct? If yes why?

2)When converting the same plugin to bundle I'm getting MANIFEST.MF and
extensions.xml but there is another problem:
java.lang.InstantiationException:
com.trillint.facelet.registry.RegistryPlugin
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at
org.eclipse.osgi.framework.internal.core.Bundle.loadBundleAc tivator(Bundle.j
ava:178)
It is very simple plugin. What I did wrong?


BTW, next I've got when converting to bundle:
java.lang.NullPointerException
at
org.eclipse.pde.internal.core.schema.SchemaRegistry.getSchem aFile(SchemaRegi
stry.java:223)
at
org.eclipse.pde.internal.core.schema.SchemaRegistry.loadWork spaceDescriptors
(SchemaRegistry.java:202)
at
org.eclipse.pde.internal.core.schema.SchemaRegistry.modelsCh anged(SchemaRegi
stry.java:247)

Thanks,
Alex.
Re: Need some clarification points on M6 [message #173391 is a reply to message #173200] Tue, 23 December 2003 12:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alexsmr.NOJUNK.sympatico.ca

Just wondering. Anybody have problems similar I have?

I believe this info will be useful.

> I'm trying to experiment with M6 but still stuck in very simple (or not?)
> things. Help will be greatly appreciated.

no help so far, but it looks like the problem are specific to my purpose:
playing with OSGi framework. If you just want to run your plugins
with M6 compatability layer - it will work fine.

> 1)As far as I understang using compatability layer I cannot access the the
> Bundle using getBundle on my plugin class because of:
> "java.lang.LinkageError: Class org/osgi/framework/Bundle violates loader
> constraints"

I still have no answer for this. It looks like compatability problem , but
could
be a bug.

> 2)When converting the same plugin to bundle I'm getting MANIFEST.MF and
> extensions.xml but there is another problem:
> java.lang.InstantiationException:
> com.trillint.facelet.registry.RegistryPlugin
> at java.lang.Class.newInstance0(Unknown Source)
> at java.lang.Class.newInstance(Unknown Source)
> at
>
org.eclipse.osgi.framework.internal.core.Bundle.loadBundleAc tivator(Bundle.j
> ava:178)
> It is very simple plugin. What I did wrong?

The problem I guess was that I did not had default empty constructor. When
extending my plugin from AbstractUIPlugin I had to provide one. But this
create incompatability with AbstractUIPlugin (it has only one implicit
constructor AbstractUIPlugin(IPluginDescriptor descriptor)). It is not
possible
just set it to "null" in super() call because you'll fail on assertion. I
guess it is
possible to mock it, but I didn't go further. Instead I just extended my
plugin
from Plugin class. Now I was able to run the plugin as a bundle, but again
as soon as I was trying to get the bundle ( Plugin.getBundle ) I fall back
to
question 1) with

LinkageError: Class org/osgi/framework/Bundle violates loader constrains

If anybody knows what is it about, please help.

Thanks,
Alex.
Re: Need some clarification points on M6 [message #173448 is a reply to message #173391] Tue, 23 December 2003 13:15 Go to previous message
Eclipse UserFriend
Originally posted by: alexsmr.NOJUNK.sympatico.ca

>
> LinkageError: Class org/osgi/framework/Bundle violates loader constrains
>

This was a trivial problem: one must define "Import-Package:
org.osgi.framework"
in manifest file. Otherwise framework will prohibit the use of any class in
this
package. So it is not enough to have Require-Bundle, it is also necessary to
specify the packages that are to be used. somehow I missed this... Sorry.

That is actually means that I cannot access bundles using compatability
layer.

Alex.
Previous Topic:Running WebLogic 8.1 under Eclipse 3.0
Next Topic:Trouble accessing cvs 1.11.10 and 1.11.11
Goto Forum:
  


Current Time: Wed Apr 30 19:57:57 EDT 2025

Powered by FUDForum. Page generated in 0.03248 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top