Wicket大气初始化异常

Wicket大气初始化异常,wicket,atmosphere,Wicket,Atmosphere,我有以下设置: 边门:6.1.0 导叶大气:0.4 (通过Maven) 在Application.init()上,我在实例化EventBus时得到一个NullPointerException new EventBus(this); 例外情况: java.lang.NullPointerException at org.apache.wicket.atmosphere.EventBus.<init>(EventBus.java:105) 传递null(受保护的静态成

我有以下设置: 边门:6.1.0 导叶大气:0.4

(通过Maven)

在Application.init()上,我在实例化EventBus时得到一个NullPointerException

    new EventBus(this);
例外情况:

    java.lang.NullPointerException
at org.apache.wicket.atmosphere.EventBus.<init>(EventBus.java:105)
传递null(受保护的静态成员“factory”未初始化)

如何正确使用导叶/大气?我忘记初始化什么了吗?我开始把Wicket作为一个服务过滤器

<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>

大气试验
org.apache.wicket.protocol.http.WicketFilter
应用程序类名
com.atmosphere.wicket.Application
配置
发展
无知者
/css、/js、/images、/icons
大气试验
/*
我没有大气配置,需要吗

谢谢

根据用户wicket列表,您应该在web.xml中设置
AtmosphereServlet
,并为其提供atmosphere.xml配置文件,告诉atmosphere如何加载
WicketFilter
,而不是直接在web.xml中配置
WicketFilter

我并没有使用大气,所以我不能保证这一点,但这听起来很合理


上面提到的电子邮件具有web.xml和atmosphere.xml配置,可以帮助您进行此设置

这很可能是你们大气初始化中的一个遗漏。你能展示你的web.xml和atmosphere.xml吗?这可能很有用。添加了web.xml extract,我没有atmosphere.xml。是的,这就是诀窍。必须在web.xml中配置atmosphere servlet。然后必须在atmosphere.xml中配置应用程序类
<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>