我是Atmosphere的新手,我创建了一个wicket快速启动应用程序(6.19.0)并配置了Atmosphere但是出现了以下错误:
2016-11-09 17:29:31 WARN AtmosphereFramework:1679 - Failed using comet support: org.atmosphere.container.Tomcat7CometSupport, error: Tomcat failed to detect this is a Comet application because context.xml is missing or the Http11NioProtocol Connector is not enabled.You must use the atmosphere-native-runtime dependency in order to use native Comet Support
If that's not the case, you can also remove META-INF/context.xml and WEB-INF/lib/atmosphere-compat-tomcat7.jar Is the NIO or APR Connector enabled?
2016-11-09 17:29:31 ERROR AtmosphereFramework:1682 - If you have more than one Connector enabled, make sure they both use the same protocol, e.g NIO/APR or HTTP for all. If not, org.atmosphere.container.BlockingIOCometSupport will be used and cannot be changed.
2016-11-09 17:29:31 WARN AtmosphereFramework:1694 - Using org.atmosphere.container.BlockingIOCometSupport
2016-11-09 17:29:31 WARN Component:3969 - Markup id set on a component that is usually not rendered into markup. Markup id: version4, component id: version, component tag: container.
pom.xml如下:
<properties>
<wicket.version>6.19.0</wicket.version>
<jetty.version>7.6.13.v20130916</jetty.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<wtp.version>none</wtp.version>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-core</artifactId>
<version>${wicket.version}</version>
</dependency>
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-runtime</artifactId>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-runtime-native</artifactId>
<version>2.0.1</version>
<exclusions>
<exclusion>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-compat-tomcat7</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-atmosphere</artifactId>
<version>0.18</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.6.4</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.aggregate</groupId>
<artifactId>jetty-all-server</artifactId>
<version>${jetty.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
的web.xml:
<servlet>
<servlet-name>AtmosphereServlet</servlet-name>
<servlet-class>org.atmosphere.cpr.AtmosphereServlet</servlet-class>
<init-param>
<param-name>applicationClassName</param-name>
<param-value>com.cg.web.test.WicketApplication</param-value>
</init-param>
<init-param>
<param-name>org.atmosphere.useWebSocket</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>org.atmosphere.useNative</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>filterMappingUrlPattern</param-name>
<param-value>/*</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>
并且没有context.xml文件。我已从server.xml中的以下行删除了注释
<Connector port="9443" protocol="org.apache.coyote.http11.Http11NioProtocol"
maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
keystorefile="file:///D:/SSL/keystore" keystorepass="changeit"
clientAuth="false" sslProtocol="TLS" />
有人可以就此提出一些想法吗?
提前致谢。