1

I have the following setup: wicket: 6.1.0 wicket-atmosphere: 0.4

(via Maven)

On Application.init() I get a NullPointerException during instantiation of EventBus

    new EventBus(this);

Exception:

    java.lang.NullPointerException
at org.apache.wicket.atmosphere.EventBus.<init>(EventBus.java:105)

This is caused because the method

    public synchronized static BroadcasterFactory getDefault()

delivers null (the protected static member "factory" is not initialized).

How do I use Wicket/Atmosphere properly? Did I forget something to initialize? I'm starting Wicket as a ServletFilter.

<filter>
    <filter-name>AtmosphereTest</filter-name>
    <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
    <init-param>
        <param-name>applicationClassName</param-name>
        <param-value>com.atmosphere.wicket.Application</param-value>
    </init-param>
    <init-param>
        <param-name>configuration</param-name>
        <param-value>development</param-value>
    </init-param>
    <init-param>
        <param-name>ignorePaths</param-name>
        <param-value>/css,/js,/images,/icons</param-value>
    </init-param>
</filter>

<filter-mapping>
    <filter-name>AtmosphereTest</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>

I don't have a atmosphere configuration, do I need one?

Thanks

4

1 に答える 1

3

users-wicket リストからのこの電子メールによると、web.xml で を設定し、web.xml で直接構成するのではなく、AtmosphereServletをロードする方法を雰囲気に指示する Atmunity.xml 構成ファイルを提供する必要があります。WicketFilterWicketFilter

私は雰囲気を使っていないので、これを本当に保証することはできませんが、賢明に聞こえます。

上記の電子メールには、この設定を行うのに役立つ web.xml と Atmium.xml の構成が含まれています。

于 2012-10-27T18:17:27.520 に答える