当前位置: 代码迷 >> Java Web开发 >> JMS activemq ajxa方式连接mq服务器 消息能发送 但是报错误 activemq有经验的请赐教 非常感谢
  详细解决方案

JMS activemq ajxa方式连接mq服务器 消息能发送 但是报错误 activemq有经验的请赐教 非常感谢

热度:11094   发布时间:2013-02-25 21:13:14.0
JMS activemq ajxa方式连接mq服务器 消息能发送 但是报异常 activemq有经验的请赐教 非常感谢
2012-08-03 15:27:07,119 INFO [STDOUT] (ActiveMQ Session Task) 15:27:07,119 ERROR [ActiveMQ Session Task] AjaxListener:64 - Error receiving message java.lang.NullPointerException
java.lang.NullPointerException
at org.apache.catalina.connector.Request.setAttribute(Request.java:1443)
at org.apache.catalina.connector.RequestFacade.setAttribute(RequestFacade.java:503)
at org.eclipse.jetty.continuation.FauxContinuation.setAttribute(FauxContinuation.java:485)
at org.apache.activemq.web.AjaxListener.onMessageAvailable(AjaxListener.java:61)
at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1250)
at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:134)
at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:205)
at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:122)
at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:43)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)

------------------------------------------------
web.xml配置文件

<filter>
<filter-name>Spring character encoding filter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>utf-8</param-value>
</init-param>
<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>Spring character encoding filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping> 

<filter>
  <filter-name>ContinuationFilter</filter-name>
  <filter-class>org.eclipse.jetty.continuation.ContinuationFilter</filter-class>
  </filter>

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

<context-param> 
<param-name>org.apache.activemq.brokerURL</param-name>  
<!-- <param-value>tcp://localhost:61616</param-value> -->
<param-value>failover://(tcp://192.168.243.181:61616,tcp://192.168.242.151:61616)?randomize=false</param-value> 
  </context-param>
   
  <context-param>
  <param-name>org.apache.activemq.embeddedBroker</param-name>
  <param-value>false</param-value>
  </context-param>
   
  <servlet>
<servlet-name>AjaxServlet</servlet-name>
<servlet-class>org.apache.activemq.web.AjaxServlet</servlet-class>
  </servlet>
   
  <servlet-mapping>
  <servlet-name>AjaxServlet</servlet-name>
  <url-pattern>/amquri/*</url-pattern>
  </servlet-mapping>

有什么需要看的我再补充 谢谢各位了啊

------解决方案--------------------------------------------------------
帮你结贴吧
  相关解决方案