Szr维 2016-12-12 08:51 采纳率: 0%
浏览 1411

activemq-web报错,activemq版本为5.9

错误代码
java.lang.IllegalStateException: A filter or servlet of the current chain does not support asynchronous operations.
at org.apache.catalina.connector.Request.startAsync(Request.java:1675)
at org.apache.catalina.connector.Request.startAsync(Request.java:1668)
at org.apache.catalina.connector.RequestFacade.startAsync(RequestFacade.java:1022)
at org.eclipse.jetty.continuation.Servlet3Continuation.suspend(Servlet3Continuation.java:202)
at org.apache.activemq.web.MessageListenerServlet.doMessages(MessageListenerServlet.java:349)
at org.apache.activemq.web.MessageListenerServlet.doGet(MessageListenerServlet.java:250)
at org.apache.activemq.web.AjaxServlet.doGet(AjaxServlet.java:47)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.eclipse.jetty.continuation.ContinuationFilter.doFilter(ContinuationFilter.java:137)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:958)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:452)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1087)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2517)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2506)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)

** 我的web.xml配置**

<?xml version="1.0" encoding="UTF-8"?>


mqajax


Whether we should include an embedded broker or not
org.apache.activemq.brokerURL
tcp://127.0.0.1:61616 <!-- 这里可以写tcp://192.168.1.111:61616的形式连接其他服务器上的ActiveMQ服务器 -->


AjaxServlet
org.apache.activemq.web.AjaxServlet
1
true


MessageServlet
org.apache.activemq.web.MessageServlet
1


QueueBrowseServlet
org.apache.activemq.web.QueueBrowseServlet


PortfolioPublishServlet
org.apache.activemq.web.PortfolioPublishServlet
1


AjaxServlet
/amq/*


MessageServlet
/message/*


QueueBrowseServlet
/queueBrowse/*


PortfolioPublishServlet
/portfolioPublish

<!-- 这种方式是在tomcat7版本以下运行,因为ajax+activemq需要servlet3.0的支持,而servlet3.0又只有在tomcat7中得到支持,所有加上jetty此包,就能在tomcat6运行了 -->


session

org.eclipse.jetty.continuation.ContinuationFilter





session

/*


index.jsp


JS代码

var amq = org.activemq.Amq; amq.init({ uri: 'amq', logging: true, timeout: 20 }); var myHandler = function(message){ $("#msgDiv").append(message); $("#msgDiv").append("<br>"); } amq.addListener("smeguangdong","topic://FirstTopic",myHandler); function send(){ var nickname = $("#nickname").val(); var content = $("#content").val(); var msg = nickname + " : " +content; //alert(msg); amq.sendMessage("topic://FirstTopic","<message>"+msg+"</message>"); }
  • 写回答

1条回答 默认 最新

  • zqbnqsdsmd 2016-12-17 05:05
    关注
    评论

报告相同问题?

悬赏问题

  • ¥15 mrk3399刷完安卓11后投屏调试只能显示一个设备
  • ¥20 白日门传奇少一个启动区服和启动服务器的快捷键,东西都是全的 , 他们说套一个出来就行了 但我就是弄不好,谁看看,
  • ¥100 如何用js写一个游戏云存档
  • ¥15 ansys fluent计算闪退
  • ¥15 有关wireshark抓包的问题
  • ¥15 需要写计算过程,不要写代码,求解答,数据都在图上
  • ¥15 向数据表用newid方式插入GUID问题
  • ¥15 multisim电路设计
  • ¥20 用keil,写代码解决两个问题,用库函数
  • ¥50 ID中开关量采样信号通道、以及程序流程的设计