Menu

#30 [PLUGIN] Starting too early?

Everything
open
All Add-Ons (4)
5
2007-03-20
2007-03-20
No

A user reported this bug (see https://sourceforge.net/forum/message.php?msg_id=4201999\):

java.lang.NullPointerException
at ch.ethz.dcg.spamato.filter.FilterPageHandler.renderPage(FilterPageHandler.java:57)
at ch.ethz.dcg.spamato.webconfig.handler.ContentHandler.handle(ContentHandler.java:63)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1457)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1409)
at org.mortbay.http.HttpServer.service(HttpServer.java:889)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:829)
at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:998)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:846)
at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:345)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:530)

Looking for the problem, I found out that the SpamatoProxy component (not the Spamatoxy!) is accessible only after the complete plugin system has started up. The NullPointerException results from accessing the proxy from the web configuration pages although it is not initialized yet.

This shows a general problem with the plugin system: Some components might start working before the complete system actually runs. There are (at least) two possible ways to circumvent this:

1) Send an 'up and running' event to all plugins after everything has been initialized.
2) Every plugin has to make sure that the plugin system is working before doing things.

For the bug mentioned above, it might be enough to prevent the web configuration from handling incoming connections before everything is fine. But for the underlying problem, we have to find a general solution.

Discussion

  • Keno Albrecht

    Keno Albrecht - 2007-03-20
    • priority: 9 --> 5
     
  • Keno Albrecht

    Keno Albrecht - 2007-06-04

    Logged In: YES
    user_id=1217053
    Originator: YES

    > For the bug mentioned above, it might be enough to prevent the web configuration from handling incoming connections before everything is fine.

    This has been done in 0.99.1.3

     

Log in to post a comment.

MongoDB Logo MongoDB