Hi Neil:

What bundle? If you mean compendium one it is ACTIVE, and all the other ones
as well (poster+listener).

They are all active, but when I try to restart the poster bundle it keeps
crashing when he puts the Event, aka

" Event event = new *Event*(POST_EVENT_QUEUE, (Dictionary)props);"
>

I will try now with the Felix jar and will keep in contact.

Thanks,

Asier


On 6 April 2010 23:45, Neil Bartlett <[email protected]> wrote:

> What is the state of the bundle? Is it Resolved? Please show the
> output of the "ss" command (or "ps" for Felix).
>
> Regards
> Neil
>
> On Tue, Apr 6, 2010 at 3:50 PM, Asier Aranbarri Beldarrain
> <[email protected]> wrote:
> > Hi BJ;
> >
> > No, the manifest is ok, the blank lines are made by me for the e-mail
> just
> > to show that compendium was included, but thanks anyway, appreciated
> >
> > Regards,
> >
> > Asier
> >
> > On 6 April 2010 16:43, BJ Hargrave <[email protected]> wrote:
> >>
> >> I hope you do not have any blank lines in your manifest until after all
> >> the headers. Your example has blank lines which will mean all headers
> after
> >> the first blank line are ignored.
> >>
> >> BJ Hargrave
> >> Senior Technical Staff Member, IBM
> >> OSGi Fellow and CTO of the OSGi Alliance
> >> [email protected]
> >> Office: +1 386 848 1781 Mobile: +1 386 848 3788
> >>
> >> ________________________________
> >>
> >>   From: Asier Aranbarri Beldarrain [[email protected]]
> >>   Sent: 04/06/2010 01:36 PM ZE2
> >>   To: OSGi Developer Mail List <[email protected]>
> >>   Subject: Re: [osgi-dev] Problem with Events
> >>
> >> Hi Miguel:
> >>
> >> Yes, you are right. I put the bundles on the system (separately) just to
> >> make the attempt, but none of the two ways work. Now i don't have the
> >> compendium bundle to load on my indep. osgi system, but the same error
> shows
> >> about "Event".
> >>
> >>
> >> On 6 April 2010 13:26, Miguel <[email protected]> wrote:
> >>>
> >>> asier, are you probably loading twice the same org.osgi.compendium
> >>> bundle?
> >>> in the bundle classpath you point that you have this jar inside your
> >>> bundle and in the previous mail you showed a screenshot with the bundle
> load
> >>> in your system ... I may be wrong but this is not a good practice in
> osgi...
> >>> i would suggest to put the compendium bundle away of this bundle ....
> >>>
> >>> Miguel
> >>>
> >>>
> >>>
> >>>
> >>> On Tue, Apr 6, 2010 at 1:10 PM, Asier Aranbarri Beldarrain
> >>> <[email protected]> wrote:
> >>>>
> >>>> Of course:
> >>>>
> >>>>
> >>>>>>> Manifest-Version: 1.0
> >>>>>>> Bundle-ManifestVersion: 2
> >>>>>>> Bundle-Name: TestMarta
> >>>>>>> Bundle-SymbolicName: testMarta
> >>>>>>> Bundle-Version: 1.0.0
> >>>>>>> Bundle-Activator: testmarta.Activator
> >>>>>>> Bundle-ActivationPolicy: lazy
> >>>>>>> Bundle-RequiredExecutionEnvironment: JavaSE-1.6
> >>>>>>>
> >>>>>>> Bundle-ClassPath: log4j-1.2.15.jar,
> >>>>>>>  .,
> >>>>>>>  org.osgi.compendium-1.4.0.jar
> >>>>>>>
> >>>>>>> Require-Bundle: org.eclipse.osgi;bundle-version="3.6.0",
> >>>>>>>  bundleMartaContextEvaluator;bundle-version="1.0.0"
> >>>>>>> Import-Package: bundlemartacontextevaluator,
> >>>>>>>  org.eclipse.equinox.launcher,
> >>>>>>>  org.osgi.framework;version="1.3.0",
> >>>>>>>  org.osgi.service.event,
> >>>>>>>  org.osgi.util.tracker
> >>>>
> >>>> On 6 April 2010 12:54, Eva Madrazo <[email protected]>
> wrote:
> >>>>>
> >>>>> mmmm, so maybe something is not imported correctly...  can you send
> the
> >>>>> manifest.mf include in your bundle?
> >>>>> Regards!
> >>>>>  Eva
> >>>>>
> >>>>> Asier Aranbarri Beldarrain escribió:
> >>>>>>
> >>>>>> Hi Eva; I think that the bundles are active and ok; I send an
> >>>>>> screenshot of the error.
> >>>>>>
> >>>>>> The error seems to appear when, in the event poster, I make this:
> >>>>>>
> >>>>>>        " Event event = new *Event*(POST_EVENT_QUEUE,
> >>>>>> (Dictionary)props);"
> >>>>>>
> >>>>>>
> >>>>>> Somehow it doesn't recognize "Event", even it is declared on the
> jars
> >>>>>> I included and active on osgi.
> >>>>>> Thanks for the help,
> >>>>>> Asier
> >>>>>>
> >>>>>>
> >>>>>> On 6 April 2010 11:10, Eva Madrazo <[email protected]
> >>>>>> <mailto:[email protected]>> wrote:
> >>>>>>
> >>>>>>    This can sound stupid but, are you sure that the eventAdmin
> bundle
> >>>>>>    is active in your independent equinox environment?
> >>>>>>
> >>>>>>    Asier Aranbarri Beldarrain escribió:
> >>>>>>
> >>>>>>        Hi Neil:
> >>>>>>
> >>>>>>        I'm using Eclipse's plug-in development tool (equinox). I
> made
> >>>>>>        several attempts and inside eclipse, with the same
> >>>>>>        configuration, everything seems to be ok. But when exporting
> >>>>>>        it (I have an independent equinox environment, with an
> >>>>>>        "osgi.exe" , it doesn't seem to work. I'm not sure what you
> >>>>>>        are refering to when you say that the listener doesn't import
> >>>>>>        the package, since the listener and poster have the same
> build
> >>>>>>        configuration.
> >>>>>>        Thanks for your help, appreciated ,
> >>>>>>
> >>>>>>        Asier
> >>>>>>
> >>>>>>        On 30 March 2010 14:19, Neil Bartlett <[email protected]
> >>>>>>        <mailto:[email protected]> <mailto:[email protected]
> >>>>>>        <mailto:[email protected]>>> wrote:
> >>>>>>
> >>>>>>           The listener bundle is not importing the package
> >>>>>>           "org.osgi.service.event".
> >>>>>>
> >>>>>>           This should have been caught at build-time. What
> development
> >>>>>>           environment or OSGi tooling are you using? Eclipse PDE
> >>>>>>        would show this
> >>>>>>           as a compilation error, and bnd (or a bnd-based tool such
> >>>>>>        as Maven's
> >>>>>>           bundle plugin) would automatically add the import.
> >>>>>>
> >>>>>>           Regards
> >>>>>>           Neil
> >>>>>>
> >>>>>>           On 3/30/10, Asier Aranbarri Beldarrain
> >>>>>>        <[email protected] <mailto:[email protected]>
> >>>>>>           <mailto:[email protected]
> >>>>>>        <mailto:[email protected]>>> wrote:
> >>>>>>           > Hi all*:
> >>>>>>           >
> >>>>>>           > *I am having some trouble with osgi "event" services;
> >>>>>>           > What I have is really simple: An event poster and a
> >>>>>> listener.
> >>>>>>           One sends an
> >>>>>>           > string and the second one just receives it and prints
> it.
> >>>>>>           >
> >>>>>>           > I'm making it in Eclipse and it executes OK there, but
> my
> >>>>>>           problem appears
> >>>>>>           > when I export the bundles ( to separate .jar bundles)
> and
> >>>>>>        try to
> >>>>>>           execute
> >>>>>>           > them on an independent equinox framework.
> >>>>>>           > Also, when I export the bundles, I make sure that the
> >>>>>>        libraries
> >>>>>>           that include
> >>>>>>           > the service.Event class are included in the classpath.
> In
> >>>>>> my
> >>>>>>           case, I use "*
> >>>>>>           > org.osgi.compendium-1.4.0.jar*" .
> >>>>>>           > I printed the error so you can see it properly. I also
> >>>>>>        send the
> >>>>>>           resumed code
> >>>>>>           > of the two bundles (the part of sending and receiving
> >>>>>>        events).
> >>>>>>           >
> >>>>>>           > Any help would be appreciated. Thanks!
> >>>>>>           > *
> >>>>>>           >
> >>>>>>           >   EVENT POSTER*
> >>>>>>           >
> >>>>>>           >   *     private static final String POST_EVENT_QUEUE =
> >>>>>>        "1234";*
> >>>>>>           >
> >>>>>>           >         Hashtable props = new Properties();
> >>>>>>           >         props.put("property",(XXX.toString() );
> >>>>>>           >         Event event = new Event(POST_EVENT_QUEUE,
> >>>>>>           (Dictionary)props);
> >>>>>>           >         eventAdmin.postEvent(event);
> >>>>>>           >
> >>>>>>           > *  EVENT LISTENER*
> >>>>>>           >
> >>>>>>           > *    private static final String POST_EVENT_QUEUE =
> >>>>>> "1234";*
> >>>>>>           >
> >>>>>>           >       Dictionary dp = new Hashtable();
> >>>>>>           >       dp.put(EventConstants.EVENT_TOPIC,
> >>>>>> POST_EVENT_QUEUE);
> >>>>>>           >
> >>>>>>  context.registerService(EventHandler.class.getName(), new *
> >>>>>>           > PostEventHandler*(), dp);  ---->
> >>>>>>        *PostEventHandler*()-->does--->
> >>>>>>            * String
> >>>>>>           > value = event.getProperty("property");
> >>>>>>        System.out.println(value);*
> >>>>>>           >
> >>>>>>           _______________________________________________
> >>>>>>           OSGi Developer Mail List
> >>>>>>           [email protected] <mailto:[email protected]>
> >>>>>>        <mailto:[email protected] <mailto:
> [email protected]>>
> >>>>>>
> >>>>>>           https://mail.osgi.org/mailman/listinfo/osgi-dev
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
>  ------------------------------------------------------------------------
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>        _______________________________________________
> >>>>>>        OSGi Developer Mail List
> >>>>>>        [email protected] <mailto:[email protected]>
> >>>>>>        https://mail.osgi.org/mailman/listinfo/osgi-dev
> >>>>>>
> >>>>>>
> >>>>>>    _______________________________________________
> >>>>>>    OSGi Developer Mail List
> >>>>>>    [email protected] <mailto:[email protected]>
> >>>>>>    https://mail.osgi.org/mailman/listinfo/osgi-dev
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> ------------------------------------------------------------------------
> >>>>>>
> >>>>>>
> >>>>>>
> ------------------------------------------------------------------------
> >>>>>>
> >>>>>> _______________________________________________
> >>>>>> OSGi Developer Mail List
> >>>>>> [email protected]
> >>>>>> https://mail.osgi.org/mailman/listinfo/osgi-dev
> >>>>>
> >>>>> _______________________________________________
> >>>>> OSGi Developer Mail List
> >>>>> [email protected]
> >>>>> https://mail.osgi.org/mailman/listinfo/osgi-dev
> >>>>
> >>>>
> >>>> _______________________________________________
> >>>> OSGi Developer Mail List
> >>>> [email protected]
> >>>> https://mail.osgi.org/mailman/listinfo/osgi-dev
> >>>
> >>>
> >>> _______________________________________________
> >>> OSGi Developer Mail List
> >>> [email protected]
> >>> https://mail.osgi.org/mailman/listinfo/osgi-dev
> >>
> >>
> >> _______________________________________________
> >> OSGi Developer Mail List
> >> [email protected]
> >> https://mail.osgi.org/mailman/listinfo/osgi-dev
> >> _______________________________________________
> >> OSGi Developer Mail List
> >> [email protected]
> >> https://mail.osgi.org/mailman/listinfo/osgi-dev
> >
> >
> > _______________________________________________
> > OSGi Developer Mail List
> > [email protected]
> > https://mail.osgi.org/mailman/listinfo/osgi-dev
> >
>
> _______________________________________________
> OSGi Developer Mail List
> [email protected]
> https://mail.osgi.org/mailman/listinfo/osgi-dev
>
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to