Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Equinox MyHook - ClassNotFoundException
Equinox MyHook - ClassNotFoundException [message #116507] Tue, 26 August 2008 09:32 Go to next message
Adam Lucarz is currently offline Adam LucarzFriend
Messages: 518
Registered: July 2009
Senior Member
Hi,

I have tried to install a selfmade demohook but it always ends in a
ClassNotFoundException for "de.company.playground.equinox.demohook" at
startup.(implements AdaptorHook and HookConfigurator)

The used system is eclipse 3.4 and the following steps were made:

1. Checkout of the osgi sources from the eclipse cvs repository into the
workspace.

2. Setting of the vm argument:
-Dosgi.framework.extensions=de.company.playground.equinox.de mohook

3. hookconfigurators.properties with
hook.configurators=de.company.playground.equinox.demohook created in the
hook fragment.

The trace give me the info that the extenstion is loaded:
"Loading extension: de.company.playground.equinox.demohook".

Does anyone can give me a hint what I missed to do?
Re: Equinox MyHook - ClassNotFoundException [message #116550 is a reply to message #116507] Tue, 26 August 2008 18:50 Go to previous messageGo to next message
Vinayak is currently offline VinayakFriend
Messages: 5
Registered: July 2009
Junior Member
Adam Lucarz wrote:
> Hi,
>
> I have tried to install a selfmade demohook but it always ends in a
> ClassNotFoundException for "de.company.playground.equinox.demohook" at
> startup.(implements AdaptorHook and HookConfigurator)
>
> The used system is eclipse 3.4 and the following steps were made:
>
> 1. Checkout of the osgi sources from the eclipse cvs repository into the
> workspace.
>
> 2. Setting of the vm argument:
> -Dosgi.framework.extensions=de.company.playground.equinox.de mohook
>
> 3. hookconfigurators.properties with
> hook.configurators=de.company.playground.equinox.demohook created in the
> hook fragment.
>
> The trace give me the info that the extenstion is loaded: "Loading
> extension: de.company.playground.equinox.demohook".
>
> Does anyone can give me a hint what I missed to do?
>

launch with osgi console mode and check the java.class.path property
(getprop java.class.path). You need to see if the hook.configurators
file that you placed is on this path. If not, it means
hook.configurators was not really found by the hook registry. Another
way to confirm this is to log out messages from your
addHook(HookRegistry..) call back method - if it's not being called then
that would point to a classpath issue.
Re: Equinox MyHook - ClassNotFoundException [message #116557 is a reply to message #116507] Tue, 26 August 2008 18:56 Go to previous messageGo to next message
Vinayak is currently offline VinayakFriend
Messages: 5
Registered: July 2009
Junior Member
Adam Lucarz wrote:
> Hi,
>
> I have tried to install a selfmade demohook but it always ends in a
> ClassNotFoundException for "de.company.playground.equinox.demohook" at
> startup.(implements AdaptorHook and HookConfigurator)
>
> The used system is eclipse 3.4 and the following steps were made:
>
> 1. Checkout of the osgi sources from the eclipse cvs repository into the
> workspace.
>
> 2. Setting of the vm argument:
> -Dosgi.framework.extensions=de.company.playground.equinox.de mohook
>
> 3. hookconfigurators.properties with
> hook.configurators=de.company.playground.equinox.demohook created in the
> hook fragment.
>
> The trace give me the info that the extenstion is loaded: "Loading
> extension: de.company.playground.equinox.demohook".
>
> Does anyone can give me a hint what I missed to do?
>
Correction to my previous message - check the osgi.frameworkClassPath
property i.e getprop osgi.frameworkClassPath. This should include path
to the folder were you have the hookconfigurators.properties.

Vin.
Re: Equinox MyHook - ClassNotFoundException [message #116562 is a reply to message #116557] Tue, 26 August 2008 19:03 Go to previous messageGo to next message
Vinayak is currently offline VinayakFriend
Messages: 5
Registered: July 2009
Junior Member
Vinayak Joshi wrote:
> Adam Lucarz wrote:
>> Hi,
>>
>> I have tried to install a selfmade demohook but it always ends in a
>> ClassNotFoundException for "de.company.playground.equinox.demohook" at
>> startup.(implements AdaptorHook and HookConfigurator)
>>
>> The used system is eclipse 3.4 and the following steps were made:
>>
>> 1. Checkout of the osgi sources from the eclipse cvs repository into
>> the workspace.
>>
>> 2. Setting of the vm argument:
>> -Dosgi.framework.extensions=de.company.playground.equinox.de mohook
>>
>> 3. hookconfigurators.properties with
>> hook.configurators=de.company.playground.equinox.demohook created in
>> the hook fragment.
>>
>> The trace give me the info that the extenstion is loaded: "Loading
>> extension: de.company.playground.equinox.demohook".
>>
>> Does anyone can give me a hint what I missed to do?
>>
> Correction to my previous message - check the osgi.frameworkClassPath
> property i.e getprop osgi.frameworkClassPath. This should include path
> to the folder were you have the hookconfigurators.properties.
>
> Vin.

.... And if your hook is a jar file which packages the
hookconfigurators.properties, then this jar needs to be on the framework
classpath as mentioned above. ok, by now i think i have managed to
mention all the details :)
Re: Equinox MyHook - ClassNotFoundException [message #116629 is a reply to message #116562] Thu, 28 August 2008 05:35 Go to previous messageGo to next message
Adam Lucarz is currently offline Adam LucarzFriend
Messages: 518
Registered: July 2009
Senior Member
Hi Vinayak,

thank you very much for your hint. I tried the "getprop
osgi.frameworkClassPath" (info for others: osgi.frameworkClasspath was a
typo) command and it seems that my hook is on the classpath:

osgi.frameworkClassPath=.,
file:C:/Entwicklung/workspaces/playground-equinoxtransforms/ de.company.playground.equinox.demohook/.

Just for info: I start the OSGi Framework from the eclipse (3.4) ide as an
OSGi Framework Launch (Selected Bundles: org.eclipse.osgi and
de.company.playground.equinox.demohook). The OSGi Bundle is checked out
from the eclipse cvs and is in the version 3.5.0.qualifier.

Does anyone has some suggestions? I am a little bit confused.
Re: Equinox MyHook - ClassNotFoundException [message #116739 is a reply to message #116629] Mon, 01 September 2008 06:34 Go to previous message
Adam Lucarz is currently offline Adam LucarzFriend
Messages: 518
Registered: July 2009
Senior Member
Hi,

I have found the failure! And it was my failure, of course ;-).

I missed to add the HookConfigurator class name in the
"hook.configurators" property.

I wrote:
hook.configurators=de.company.playground.equinox.demohook

But that was right:
hook.configurators=de.company.playground.equinox.demohook.De moHook

Greetings
Adam
Previous Topic:[equinox security] JAAS: Principal based authorization
Next Topic:Equinox Security Incubator code broken
Goto Forum:
  


Current Time: Thu Apr 25 02:05:59 GMT 2024

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

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

Back to the top