blazeds 消息 错误

blazeds  StreamingAMFChannel 使用的几个小问题:

异常信息1:

2012-7-31 12:21:01 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet Spring MVC Dispatcher Servlet threw exception
java.lang.IllegalStateException
	at org.apache.catalina.connector.ResponseFacade.sendError(ResponseFacade.java:421)
	at flex.messaging.endpoints.BaseStreamingHTTPEndpoint.handleFlexClientStreamingOpenRequest(BaseStreamingHTTPEndpoint.java:764)
	at flex.messaging.endpoints.BaseStreamingHTTPEndpoint.serviceStreamingRequest(BaseStreamingHTTPEndpoint.java:1055)
	at flex.messaging.endpoints.BaseStreamingHTTPEndpoint.service(BaseStreamingHTTPEndpoint.java:460)
	at flex.messaging.endpoints.StreamingAMFEndpoint$$EnhancerByCGLIB$$195648ee.service(<generated>)
	at org.springframework.flex.servlet.MessageBrokerHandlerAdapter.handle(MessageBrokerHandlerAdapter.java:109)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:669)
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:585)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
	at java.lang.Thread.run(Thread.java:662)

 

错误原因:发送消息的通道错了,发送消息不能使用流通道,只能使用AMFChannel通道,Poroducer的通道改为AMFChannel即可

<mx:Producer id="producer" destination="chat" channelSet="{cs}"/>
	<mx:ChannelSet id="cs">
		<mx:AMFChannel url="/messagebroker/amfpolling"/>
		<!--<mx:StreamingAMFChannel url="/messagebroker/streamingamf"/>-->
	</mx:ChannelSet>
 

订阅消息异常信息:

Flex Message (flex.messaging.messages.ErrorMessage) 
message =  Channel endpoint does not support polling.
 details =  Client attempted to contact a server endpoint that does not support a polling channel.

错误原因:如果使用流通道必须使用StreamingAMFChannel,如果使用AMFChannel 指定的url是streamingamf 就报通道不支持轮询的错误

<mx:Consumer id="consumer" destination="chat" message="messageHandler(event.message)"  channelSet="{cs}" />
	<mx:ChannelSet id="cs">
			<!--<mx:AMFChannel url="/messagebroker/streamingamf"/>-->
		<mx:StreamingAMFChannel url="/messagebroker/streamingamf"/>
	</mx:ChannelSet>
 

 

 

你可能感兴趣的:(blazeds)