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?

- Asiri
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to