Ah yes, sorry... I had a <Export-Package> in my pom.xml ... Now it works.

Thanks to you for the quick reply :),
Mathieu

2009/5/5 Clement Escoffier <[email protected]>

>
> On 05.05.2009, at 09:36, Triquoit Mathieu wrote:
>
>  Yes I follow the same schema...
>>
>> EditorModule which contains my HelpExtender with onBundleArrival
>>
>> English help module: in the MF, I have HelpExtension:
>> org.mtr.EnglishHelpService
>> French help module: in the MF, HelpExtension: org.mtr.FrenchHelpService
>>
>> In the onBundleArrival method, I have exactly what you mention, for the
>> first extension, OK... for the second one, I have the exception when I
>> perform the bundle.loadClass(clazz);
>>
>
> Hum, sounds tricky. Are you sure to use the good bundle object (the
> received one). Did you try to get the name of the class that cannot be
> loaded?
>
> I might be related to a classloading conflict, like a duplicated package.
>
> Clement
>
>
>
>
>>
>> Regards,
>> Mathieu
>>
>> 2009/5/5 Clement Escoffier <[email protected]>
>>
>>  Hi,
>>>
>>> Do you know which class cannot be loaded ? Is it the instantiated class,
>>> or
>>> a used class ?
>>>
>>> To load the class, you must follow such kind of pattern:
>>> void onBundleArrival(Bundle bundle, String header) {
>>>  String clazz = ... // Get the class to load from the header
>>>  Class theClass = bundle.loadClass(clazz);
>>>  // Create the object
>>>  Object obj = theClass.newInstance();
>>> }
>>>
>>> Regards,
>>>
>>> Clement
>>>
>>>
>>>
>>> On 05.05.2009, at 07:09, Triquoit Mathieu wrote:
>>>
>>> Hi,
>>>
>>>>
>>>> I have a module A which could be viewed as an Editor (with the GUI etc).
>>>> In
>>>> this module I have implemented the iPojo Extender Pattern for the Help
>>>> package in different language.
>>>> So, in each help package, I have in the manifest something like
>>>> <HelpExtension> which contains the class name to instanciate to retrieve
>>>> some useful information...
>>>>
>>>> My problem is that I can deploy the first extension... but with the
>>>> second
>>>> one, I have a ClassNotFoundException ? If I deploy the second extension
>>>> as
>>>> first extension, it is ok but for the other, ClassNotFoundException
>>>> again
>>>> ?
>>>>
>>>> Any idea ?
>>>>
>>>> Thanks,
>>>> Regards,
>>>> Mathieu
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [email protected]
>>> For additional commands, e-mail: [email protected]
>>>
>>>
>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to