-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Asiri Rathnayake Sent: Thursday, July 09, 2009 9:00 PM To: XWiki Developers Subject: Re: [xwiki-devs] EventListener
Hi,
On Fri, Jul 10, 2009 at 4:25 AM, <[email protected]> wrote:
I've implemented the simplest EventListener possible by just implementing the EventListener required methods, adding an @Component("mystartup") line and adding my class to components.txt.
However, on startup I get an error Failed to lookup component [role = [org.xwiki.observation.ObservationManager] hint = [default]]
What am I missing? Is this a chicken and egg problem?
@Component("mystartup")
public class MyStartup implements EventListener {
public List<Event> getEvents() {
return Arrays.asList(new ApplicationStartedEvent(), new ApplicationStoppedEvent());
}
public String getName() {
return "mystartup";
}
public void onEvent(Event arg0, Object arg1, Object arg2) {
// TODO Auto-generated method stub
}
Your code looks fine to me. I'm using a similar listener. Are you working on trunk? or Some XE distribution?
I'm using XE 2.0M1 from the download page. This appears to be XWIKI-4025 fixed in 2.0M2
- Asiri _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs