Weird plugin classloading problem (I think) [message #258257] |
Mon, 26 January 2009 09:39  |
Eclipse User |
|
|
|
Hi,
I'm developing some eclipse plugins. However, I'm getting some weird
problems at runtime. The best way to explain is with an example:
MyPlugin has two classes; ClassA and ClassB. Class A creates a new
instance of ClassB and calls a method in it. However, at runtime nothing
in Class B is executed, and nothing in ClassA is executed past the
reference to ClassB. the application doesn't terminate, but doesn't seem
to run any further code.
There are no errors and I have no idea what's wrong. The strange thing is
that sometimes it will work for a while, and then stop working again. If
I had to guess, I'd say that ClassB can't be found at runtime. This is
hard to understand though, as it's just a class in the plugin, in the same
package as ClassA?
If anyone has any ideas/suggestions I'd really appreciate it.
Regards,
Paul
|
|
|
Re: Weird plugin classloading problem (I think) [message #258261 is a reply to message #258257] |
Mon, 26 January 2009 11:54  |
Eclipse User |
|
|
|
"Paul MacRory" <pmacrory@atg.com> wrote in message
news:e14ec71215498ad7d7f4f2abf51b90cd$1@www.eclipse.org...
> Hi,
>
> I'm developing some eclipse plugins. However, I'm getting some weird
> problems at runtime. The best way to explain is with an example:
>
> MyPlugin has two classes; ClassA and ClassB. Class A creates a new
> instance of ClassB and calls a method in it. However, at runtime nothing
> in Class B is executed, and nothing in ClassA is executed past the
> reference to ClassB. the application doesn't terminate, but doesn't seem
> to run any further code.
> There are no errors and I have no idea what's wrong. The strange thing is
> that sometimes it will work for a while, and then stop working again. If
> I had to guess, I'd say that ClassB can't be found at runtime. This is
> hard to understand though, as it's just a class in the plugin, in the same
> package as ClassA?
>
> If anyone has any ideas/suggestions I'd really appreciate it.
Since in general it obviously works fine to have more than one class in a
plugin, there must be something unique about your code, or about the way you
are invoking it. How is the plugin being loaded (e.g., what is it
extending), and is either A or B the BundleActivator for the plugin? Maybe
you are having a problem with recursive initialization of statics?
I'd suggest trying to whittle down your actual code into sample code that
demonstrates the problem, and post it here.
If you're like me, you probably won't be able to get as far as a concise
failing sample, but trying to produce it will lead you to figure out what is
special about your code to cause this failure.
|
|
|
Powered by
FUDForum. Page generated in 0.02818 seconds