Rest AtmosphereMappingException:JBoss应用程序中的集成

Rest AtmosphereMappingException:JBoss应用程序中的集成,rest,jboss,configuration-files,resteasy,atmosphere,Rest,Jboss,Configuration Files,Resteasy,Atmosphere,我试图在JBoss应用程序中添加REST气氛。目的是保持web应用程序运行并添加web服务。(通过Ant部署的应用程序) 我添加了以下罐子: atmosphere-runtime.jar jaxrs-api-1.1-RC2.jar jboss-seam-resteasy-2.2.0.GA.jar resteasy-jaxrs-1.1-RC2.jar web.xml: <servlet> <description>AtmosphereServlet</de

我试图在JBoss应用程序中添加REST气氛。目的是保持web应用程序运行并添加web服务。(通过Ant部署的应用程序)

我添加了以下罐子:

  • atmosphere-runtime.jar
  • jaxrs-api-1.1-RC2.jar
  • jboss-seam-resteasy-2.2.0.GA.jar
  • resteasy-jaxrs-1.1-RC2.jar
web.xml:

<servlet>
    <description>AtmosphereServlet</description>
    <servlet-name>AtmosphereServlet</servlet-name>
    <servlet-class>org.atmosphere.cpr.AtmosphereServlet</servlet-class>
    <load-on-startup>0</load-on-startup>
    <async-supported>true</async-supported>
</servlet>
<servlet-mapping>
    <servlet-name>AtmosphereServlet</servlet-name>
    <url-pattern>/atmosphere/*</url-pattern>
</servlet-mapping>
网址:

每次尝试输入URL时,都会出现以下错误:

ERROR [[AtmosphereServlet]] Servlet.service() for servlet AtmosphereServlet threw exception
org.atmosphere.cpr.AtmosphereMappingException: No AtmosphereHandler maps request for /posmngr/atmosphere/test/
我将根上下文更改为“/atmosphere/*”,但得到了404。
我错过什么了吗?任何帮助都将不胜感激。提前谢谢

由于我们自己的框架,我是一个小把戏。我必须将Spring和Sein集成在一起,并考虑这些初始化的顺序。< /P> 我的atmosphere.xml上下文根现在是:
“/atmosphere/*”

我从web.xml中删除了atmosphere servlet定义,并将其放在spring使用的外部文件中

Web.xml片段:

<context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>classpath*:META-INF/servlet/*.xml</param-value>
</context-param>

上下文配置位置
classpath*:META-INF/servlet/*.xml
外部文件包含:

<beans default-lazy-init="true">
    <bean id="atmosphereHandler" class="com.ourcompany.webapp.support.ServletUrlHandlerMapping" parent="abstractHandler">
        <property name="mappings">
            <props>
                <prop key="/atmosphere/**">atmosphereResourceController</prop>              
            </props>
        </property>
    </bean>


    <bean id="atmosphereResourceController" class="org.springframework.web.servlet.mvc.ServletWrappingController"  depends-on="servletContextInitializer">
        <property name="servletClass" value="org.atmosphere.cpr.AtmosphereServlet"/>
    </bean> 
</beans>

大气源控制器
未对java进行任何更改,有效URL为:


非常感谢

您使用的是哪种版本的Atmosphere?试试atmosphere-runtime-2.0.0.jar谢谢——JeanfrancoisI正在使用atmosphere 2.1.7
<context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>classpath*:META-INF/servlet/*.xml</param-value>
</context-param>
<beans default-lazy-init="true">
    <bean id="atmosphereHandler" class="com.ourcompany.webapp.support.ServletUrlHandlerMapping" parent="abstractHandler">
        <property name="mappings">
            <props>
                <prop key="/atmosphere/**">atmosphereResourceController</prop>              
            </props>
        </property>
    </bean>


    <bean id="atmosphereResourceController" class="org.springframework.web.servlet.mvc.ServletWrappingController"  depends-on="servletContextInitializer">
        <property name="servletClass" value="org.atmosphere.cpr.AtmosphereServlet"/>
    </bean> 
</beans>