Hi Eva, what shows
System.out.println(event.getProperty("measure").toString()); or System.out.println(event.getProperty("measure").getClass().getName()); Maybe you have a ClassLoader problem so that casting to the Measure-class fails. What does the OSGi console say? Are there any errors? Btw, this mailing-list is for general issues with OSGi, especially with the spec and so on. You should consider posting to the eRCP mailing-list. Cheers, Siamak Am 16.03.2010 um 11:20 schrieb Eva Madrazo: > Hi, > maybe this is a very simple problem but I do not achieve to resolve it and I > found difficult to find information about it, so sorry if this is being > answered before. First of all I'm executing an equinox eRCP platform on a > Windows Mobile 6.1 using J9. > > I have a very strange problem while receiving an Event. When posting the > event I add a propietary object (Measure) to the hashtable props: > > Hashtable props = new Hashtable(); > props.put("measure", measure); > eventAdmin.postEvent(new Event(measure.getName(), props)); > > When receiving the event I want to extract this Measure object. If I do > Object measure = (Object) event.getProperty("measure"); > > no problem occur, but when I try to do: > > Measure measure = (Measure) event.getProperty("measure"); > > I have this error in logs: > ERROR - Exception while dispatching event org.osgi.service.event.Event > [topic=topicName] to handler mypackage.simpleeventhand...@3e953e95 > > > I have check that the bundle imports the bundle with the definition of > Measure object. > > I cannot imagine anything to change, please help me :) > > Thank you very much, > Eva > > _______________________________________________ > OSGi Developer Mail List > osgi-dev@mail.osgi.org > https://mail.osgi.org/mailman/listinfo/osgi-dev -- Dipl. Inf. (FH) Siamak Haschemi Humboldt-Universität zu Berlin Dept. of Computer Science Room: III.309 Rudower Chaussee 25 12489 Berlin, Germany +49 30 2093 3198 (phone) +49 30 2093 3112 (fax) hasch...@informatik.hu-berlin.de Website: http://informatik.hu-berlin.de/~haschemi Private Website: http://www.haschemi.org Xing profile: Siamak_Haschemi Skype: siamak.haschemi _______________________________________________ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev