`

开发flex错误篇-Couldn't establish a connection to

阅读更多

现在在做flex和spring的集成,在写好了工厂类,配置好服务以后再启动服务使用服务是提示如下错误

[RPC Fault faultString="[MessagingError message='Destination 'product' either does not exist or the destination has no channels defined (and the application does not define any default channels.)']" faultCode="InvokeFailed" faultDetail="Couldn't establish a connection to 'product'"]
 at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::invoke()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:257]
 at mx.rpc.remoting.mxml::Operation/http://www.adobe.com/2006/flex/mx/internal::invoke()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\remoting\mxml\Operation.as:197]
 at mx.rpc.remoting::Operation/send()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\remoting\Operation.as:113]
 at Function/http://adobe.com/AS3/2006/builtin::apply()
 at mx.rpc.remoting.mxml::Operation/send()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\remoting\mxml\Operation.as:170]
 at Function/http://adobe.com/AS3/2006/builtin::apply()
 at mx.rpc::AbstractService/http://www.adobe.com/2006/actionscript/flash/proxy::callProperty()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AbstractService.as:285]
 at list/___list_Button1_click()[E:\3.3\flex\test\flex_src\list.mxml:8]

分析大体意思就是连接不到服务器上。

问题描述:

1、缓存数据问题,如果编译出现问题,第二次不会发生变异,可以采用project -> clean...来清除所有的编译生成的文件

2、问题点发现就是在flex编译的时候没有找到services-config.xml,当找到这个文件以后,因为里面包含了一个factories标签,发现错误,不进行编译

3、在配置的工程编译属性中添加-context-root=/flex工程出错,不进行编译,编译完成的context-root名称为默认的工程名称,通过修改工程目录下的.flexproperties文件修改就可以。

4、可以编译,可以运行代码,但是运行中出现如下错误:

*** MessageBrokerServlet failed to initialize due to runtime exception: flex.messaging.config.ConfigurationException: Unrecognized tag found in <properties>.  Please consult the documentation to determine if the tag is invalid or belongs inside of a different tag:
  '/flex-client-outbound-queue-processor/properties/flush-delay' in channel with id: 'per-client-qos-polling-amf' from file: services-config.xml
 at flex.messaging.config.MessagingConfiguration.reportUnusedProperties(MessagingConfiguration.java:670)
 at flex.messaging.MessageBrokerServlet.init(MessageBrokerServlet.java:151)
 at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
 at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
 at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956)
 at org.apache.catalina.core.StandardContext.start(StandardContext.java:4230)
 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
 at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
 at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
 at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
 at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
 at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
 at org.apache.catalina.core.StandardService.start(StandardService.java:448)
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics