Bundle debug for NoClassDefFoundErrors [message #43185] |
Thu, 10 June 2004 12:59  |
Eclipse User |
|
|
|
I created a new Bundle and enhanced the Eclipse HelloWorld sample to use it.
The HelloWorld SampleAction calls a testcase that uses classes in my Bundle.
The Bundle exports and provides a set of packages. I added a Bundle
Manifest to the HelloWorld plugin and used a Require-Bundle entry to specify
the dependencies.
When the testcase is invoked (within the Sample Action), it reports two
errors. The first is an "Unhandled event loop exception" with no
exception stack. The second is a "java.lang.NoClassDefFoundError" for one
of the classes in my new Bundle. The runtime did manage to find a class
provided by my Bundle but failed to find another class during the static
initialization. I verified the class not found was in a package provided
and exported by my Bundle.
Can someone point me to procedures for debugging this type of problem.
Is there a trace I can activate to verify my Bundle was started?
Jim V.O.
|
|
|
|
|
|
Re: Bundle debug for NoClassDefFoundErrors [message #43317 is a reply to message #43278] |
Sun, 13 June 2004 19:01   |
Eclipse User |
|
|
|
Originally posted by: pascal.ibm.canada
Plugins become automatically ACTIVE on classload. You should not have to
start them manually.
I'm sorry but the details available here, I can't help you much...
PaScaL
Alex Weirig wrote:
> Hello,
>
> I have the same problem in relationship to cheatsheet (I've posted to
> the platform group).
>
> I have tried with the -console but when I run the runtime workbench, all
> I see, is a osgi> prompt in the Console view. When I type in status, it
> tells me that my bundles are RESOLVED.
>
> In the runtime workbench, I can open my perspective, my editors and my
> cheatsheet, but I can't execute my action in the cheatsheet.
>
> This is my configuration
> plugin.project.1
> Plugin class
> Wizard class
> Perspective class
> Editor class
> plugin.project.2
> Plugin class
> Cheatsheet
> Cheatsheet action (should open the wizard from plugin.project.1
>
> So how can I get my bundle to be ACTIVE. Do I have to take care of this
> myself or is Eclipse doing this for me?
>
> Thanks for your help
>
> Alex
>
>
> Pascal Rapicault wrote:
>
>> Start your target with -console. This will provide you an osgi console
>> in which you can see the state of all the bundles (type in status or ss).
>>
>> PaScaL
>>
>> Jim Van Oosten wrote:
>>
>>> I created a new Bundle and enhanced the Eclipse HelloWorld sample to
>>> use it.
>>> The HelloWorld SampleAction calls a testcase that uses classes in my
>>> Bundle.
>>> The Bundle exports and provides a set of packages. I added a Bundle
>>> Manifest to the HelloWorld plugin and used a Require-Bundle entry to
>>> specify
>>> the dependencies.
>>>
>>> When the testcase is invoked (within the Sample Action), it reports two
>>> errors. The first is an "Unhandled event loop exception" with no
>>> exception stack. The second is a "java.lang.NoClassDefFoundError"
>>> for one
>>> of the classes in my new Bundle. The runtime did manage to find a
>>> class
>>> provided by my Bundle but failed to find another class during the static
>>> initialization. I verified the class not found was in a package
>>> provided
>>> and exported by my Bundle.
>>>
>>> Can someone point me to procedures for debugging this type of problem.
>>>
>>> Is there a trace I can activate to verify my Bundle was started?
>>>
>>> Jim V.O.
>>>
>>>
|
|
|
Re: Bundle debug for NoClassDefFoundErrors [message #43964 is a reply to message #43278] |
Mon, 28 June 2004 15:39   |
Eclipse User |
|
|
|
Originally posted by: jeff_mcaffer.REMOVE.ca.ibm.com
Suspect you are having trouble with your manifests getting out of sync with
your code.
- if you are managing your own manifest.mf files, you have to ensure that
code you want to be visible to others is actually listed in the manifest
(either in an export-package or provide-package statement as appropriate)
- if you do not have a manifest.mf then it may be the case that the
manifest.mf generated for you by Eclipse is out of date with the plugin.xml
and java code you have in your pluign. Try running with -clean and see if
that fixes if up.
Jeff
"Alex Weirig" <alex.weirig@telewalfer.lu> wrote in message
news:cah21t$3l7$1@eclipse.org...
> Hello,
>
> I have the same problem in relationship to cheatsheet (I've posted to
> the platform group).
>
> I have tried with the -console but when I run the runtime workbench,
> all I see, is a osgi> prompt in the Console view. When I type in
> status, it tells me that my bundles are RESOLVED.
>
> In the runtime workbench, I can open my perspective, my editors and my
> cheatsheet, but I can't execute my action in the cheatsheet.
>
> This is my configuration
> plugin.project.1
> Plugin class
> Wizard class
> Perspective class
> Editor class
> plugin.project.2
> Plugin class
> Cheatsheet
> Cheatsheet action (should open the wizard from plugin.project.1
>
> So how can I get my bundle to be ACTIVE. Do I have to take care of
> this myself or is Eclipse doing this for me?
>
> Thanks for your help
>
> Alex
>
>
> Pascal Rapicault wrote:
> > Start your target with -console. This will provide you an osgi console
> > in which you can see the state of all the bundles (type in status or
ss).
> >
> > PaScaL
> >
> > Jim Van Oosten wrote:
> >
> >> I created a new Bundle and enhanced the Eclipse HelloWorld sample to
> >> use it.
> >> The HelloWorld SampleAction calls a testcase that uses classes in my
> >> Bundle.
> >> The Bundle exports and provides a set of packages. I added a Bundle
> >> Manifest to the HelloWorld plugin and used a Require-Bundle entry to
> >> specify
> >> the dependencies.
> >>
> >> When the testcase is invoked (within the Sample Action), it reports two
> >> errors. The first is an "Unhandled event loop exception" with no
> >> exception stack. The second is a "java.lang.NoClassDefFoundError"
> >> for one
> >> of the classes in my new Bundle. The runtime did manage to find a
class
> >> provided by my Bundle but failed to find another class during the
static
> >> initialization. I verified the class not found was in a package
> >> provided
> >> and exported by my Bundle.
> >>
> >> Can someone point me to procedures for debugging this type of problem.
> >>
> >> Is there a trace I can activate to verify my Bundle was started?
> >>
> >> Jim V.O.
> >>
> >>
|
|
|
Re: Bundle debug for NoClassDefFoundErrors [message #44221 is a reply to message #43964] |
Tue, 29 June 2004 14:01  |
Eclipse User |
|
|
|
Originally posted by: alex.weirig.telewalfer.lu
Hi Jeff,
that's a good point.
I created my plugin using the standard wizards and choose the OSGi option.
I never touched the manifest.mf file by hand and let Eclipse handle it.
After I manually added a "Provide-package" statement to the manifest
file my cheatsheet is working.
I tried to run a "Clean" from the Project Menu and also added -clean
to both my Eclipse startup and the Runtime Workbench startup but
nothing helped.
After being somewhat "frustrated" I remembered the good old "RTFM" and
had a look into the Online Help and found the documentation about the
"Runtime" page. Bingo ... there it is.
Thanks for your help
Alex
Jeff McAffer wrote:
> Suspect you are having trouble with your manifests getting out of sync with
> your code.
>
> - if you are managing your own manifest.mf files, you have to ensure that
> code you want to be visible to others is actually listed in the manifest
> (either in an export-package or provide-package statement as appropriate)
>
> - if you do not have a manifest.mf then it may be the case that the
> manifest.mf generated for you by Eclipse is out of date with the plugin.xml
> and java code you have in your pluign. Try running with -clean and see if
> that fixes if up.
>
> Jeff
>
> "Alex Weirig" <alex.weirig@telewalfer.lu> wrote in message
> news:cah21t$3l7$1@eclipse.org...
>
>>Hello,
>>
>>I have the same problem in relationship to cheatsheet (I've posted to
>>the platform group).
>>
>>I have tried with the -console but when I run the runtime workbench,
>>all I see, is a osgi> prompt in the Console view. When I type in
>>status, it tells me that my bundles are RESOLVED.
>>
>>In the runtime workbench, I can open my perspective, my editors and my
>>cheatsheet, but I can't execute my action in the cheatsheet.
>>
>>This is my configuration
>>plugin.project.1
>>Plugin class
>>Wizard class
>>Perspective class
>>Editor class
>>plugin.project.2
>>Plugin class
>>Cheatsheet
>>Cheatsheet action (should open the wizard from plugin.project.1
>>
>>So how can I get my bundle to be ACTIVE. Do I have to take care of
>>this myself or is Eclipse doing this for me?
>>
>>Thanks for your help
>>
>>Alex
>>
>>
>>Pascal Rapicault wrote:
>>
>>>Start your target with -console. This will provide you an osgi console
>>>in which you can see the state of all the bundles (type in status or
>
> ss).
>
>>>PaScaL
>>>
>>>Jim Van Oosten wrote:
>>>
>>>
>>>>I created a new Bundle and enhanced the Eclipse HelloWorld sample to
>>>>use it.
>>>>The HelloWorld SampleAction calls a testcase that uses classes in my
>>>>Bundle.
>>>>The Bundle exports and provides a set of packages. I added a Bundle
>>>>Manifest to the HelloWorld plugin and used a Require-Bundle entry to
>>>>specify
>>>>the dependencies.
>>>>
>>>>When the testcase is invoked (within the Sample Action), it reports two
>>>>errors. The first is an "Unhandled event loop exception" with no
>>>>exception stack. The second is a "java.lang.NoClassDefFoundError"
>>>>for one
>>>>of the classes in my new Bundle. The runtime did manage to find a
>
> class
>
>>>>provided by my Bundle but failed to find another class during the
>
> static
>
>>>>initialization. I verified the class not found was in a package
>>>>provided
>>>>and exported by my Bundle.
>>>>
>>>>Can someone point me to procedures for debugging this type of problem.
>>>>
>>>>Is there a trace I can activate to verify my Bundle was started?
>>>>
>>>>Jim V.O.
>>>>
>>>>
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.07108 seconds