flex和java交互中的一个问题? 400 报错
使用flex和java交互时,java bean和flex的一个bean相对应,
java中的包名是:com.moto.sqm.model.bms.spManagement
flex中的包名是:com.moto.mals.model.bms.sp.
在flex bean文件中加了:[RemoteClass(alias="com.moto.sqm.model.bms.spManagement.SpInfo")]
在mxml文件中加了registerClassAlias("com.moto.sqm.model.bms.spManagement.SpInfo",SpInfo);
现在是两个不同的页面,用到了相同的bean。一般操作是不会出错的,但是如果先操作第一个页面,再操作第二个页面,再操作第一个,再操作第二个,就会出错了(我知道我说的神仙也听不懂,但是请看下错误信息),如下:
[BlazeDS]Cannot create class of type 'com.moto.mals.model.bms.sp::SpInfo'.
flex.messaging.MessageException: Cannot create class of type 'com.moto.mals.model.bms.sp::SpInfo'. Type 'com.moto.mals.model.bms.sp::SpInfo' not found.
at flex.messaging.util.ClassUtil.createClass(ClassUtil.java:66)
at flex.messaging.io.AbstractProxy.getClassFromClassName(AbstractProxy.java:103)
at flex.messaging.io.amf.Amf3Input.readScriptObject(Amf3Input.java:430)
at flex.messaging.io.amf.Amf3Input.readObjectValue(Amf3Input.java:153)
at flex.messaging.io.amf.Amf3Input.readObject(Amf3Input.java:132)
at flex.messaging.io.amf.Amf3Input.readArray(Amf3Input.java:371)
at flex.messaging.io.amf.Amf3Input.readObjectValue(Amf3Input.java:157)
at flex.messaging.io.amf.Amf3Input.readObject(Amf3Input.java:132)
at flex.messaging.io.amf.Amf3Input.readScriptObject(Amf3Input.java:473)
at flex.messaging.io.amf.Amf3Input.readObjectValue(Amf3Input.java:153)
at flex.messaging.io.amf.Amf3Input.readObject(Amf3Input.java:132)
at flex.messaging.io.amf.Amf0Input.readObjectValue(Amf0Input.java:135)
at flex.messaging.io.amf.Amf0Input.readArrayValue(Amf0Input.java:326)
at flex.messaging.io.amf.Amf0Input.readObjectValue(Amf0Input.java:139)
at flex.messaging.io.amf.Amf0Input.readObject(Amf0Input.java:95)
at flex.messaging.io.amf.AmfMessageDeserializer.readObject(AmfMessageDeserializer.java:226)
at flex.messaging.io.amf.AmfMessageDeserializer.readBody(AmfMessageDeserializer.java:205)
at flex.messaging.io.amf.AmfMessageDeserializer.readMessage(AmfMessageDeserializer.java:125)
at flex.messaging.endpoints.amf.SerializationFilter.invoke(SerializationFilter.java:114)
at flex.messaging.endpoints.BaseHTTPEndpoint.service(BaseHTTPEndpoint.java:278)
at flex.messaging.MessageBrokerServlet.service(MessageBrokerServlet.java:322)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at com.moto.sqm.util.ForceNoCacheFilter.doFilter(Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:619)