`
zcq100
  • 浏览: 21757 次
  • 性别: Icon_minigender_1
  • 来自: 重庆
最近访客 更多访客>>
文章分类
社区版块
存档分类
最新评论

[RPC Fault faultString="Error #2070

阅读更多
I’m in the process of developing a new Flex 3 RIA, and the server code is not yet written, so I’m using static XML files to provide data while I build out the UI functionality. The XML files are stored on my development machine in a subdirectory of the folder that holds the main SWF. It’s all a very standard setup, and I was successfully loading two files from the same subdirectory, so I was very surprised this morning when I got a security sandbox error:

Error #2070: Security sandbox violation:
caller  cannot access Stage owned by .
As implied by the reference to “Stage owned by”, this error is supposed to occur when you are loading a SWF from an unauthorized domain. I did some quick searching on Google, and everything I looked at had to do with loading a SWF. The stack trace did not clarify the issue either:

[RPC Fault faultString="Error #2070: Security sandbox
violation:caller  cannot access Stage owned by ."
faultCode="Client.CouldNotDecode" faultDetail="null"]
   at mx.rpc.http::HTTPService/http://www.adobe.com/
      2006/flex/mx/internal::processResult()
      [E:\dev \3.0.x\frameworks\projects\rpc\src\mx\rpc\http
      \HTTPService.as:842]
   at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/
      mx/internal::resultHandler()
      [E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\
      AbstractInvoker.as:186]
   at mx.rpc::Responder/result()[E:\dev\3.0.x\frameworks\
      projects\rpc\src\mx\rpc\Responder.as:41]
   at mx.rpc::AsyncRequest/acknowledge()
      [E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\
      AsyncRequest.as:74]
   at DirectHTTPMessageResponder/completeHandler()
      [E:\dev\3.0.x\frameworks\projects\rpc\src\mx\
      messaging\channels\DirectHTTPChannel.as:381]
   at flash.events::EventDispatcher/dispatchEventFunction()
   at flash.events::EventDispatcher/dispatchEvent()
   at flash.net::URLLoader/onComplete()
I suspected something was wrong with the XML file, since the UI was successfully loading other files from the same directory. I opened the file in XML Spy, which immediately displayed a message to the effect that the XML was not well-formed. And sure enough, I had missed something. Here is what the XML looked like:

<page>
   <name>page1</name>
   <type>pagetype</type>
   <previewUrl>previewUrl</previewUrl>
   <path>page/path1</path>
   <promoTypes>
      </promoType>typeOne</promoType>
      </promoType>typeN</promoType>
   </promoTypes>
</page>
You will probably see the error right away, but to my embarrassment I didn’t. How did the error creep in? Well, I had copied the sample XML from the design document (which I did not write) and pasted it into an XML file so that I’d have something to pull in for development purposes, and evidently I did not check it over very carefully. (If you don’t see the error, look closely at the promoType tags, and you’ll see that the opening tags have closing slashes.)

I fixed the XML, the error vanished, and I was able to resume forward progress. Clearly, the error message displayed by the debug player was not only non-helpful, it was actually misleading.

I thought I’d post this here in case anyone else runs into a similar problem. It may save you a few minutes of wonderment.
visit url:http://hi.baidu.com/zcq100/blog/item/de12ec1f93f85b69f724e434.html
分享到:
评论

相关推荐

    flex的rpc错误整理

    6. **RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Security.Error error Error #2048...** 错误#2048提示安全沙箱冲突,这通常发生在跨域访问时。确保已正确...

    Flex_RPC错误大全

    标题和描述均提到“Flex_RPC错误大全”,这表明文章...错误信息:“RPCFault faultString="Sendfailed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed errorNetConnection.Call.Failed:...

    flex与 java 通信常见错误

    ### Flex与Java通信常见错误分析 #### 一、Send Failed 错误 ...RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error NetConnection.Call.Failed: ...

    根据WSDL文件生成客户端代码与创建客户端工程

    根据WSDL文件生成客户端代码与创建客户端工程 注意小细节:在根据对方提供的... 否则报:WSDLException (at /html): faultCode=INVALID_WSDL: Expected element '{http://schemas.xmlsoap.org/wsdl/}definitions'.:

    Android之Webservice详解与调用天气预报Webservice完整实例

    在Android开发中,Webservice是一种常见的数据交互方式,它允许移动应用通过网络获取远程服务器上的数据。本实例将深入探讨Android中如何使用Webservice,特别是针对天气预报服务的调用。我们将关注以下几个核心知识...

    flex的第一步,安装、配置、与tomcat的挂接

    ### Flex 的第一步:安装、配置及与 Tomcat 的集成 #### 一、环境搭建与配置 **1.... - **安装路径**: 假设安装到了 `C:\Program Files\` 目录下。 - **环境变量设置**: - **JAVA_HOME**: 设置为 `C:\Program Files\...

    collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core d

    在编程过程中,我们时常会遇到各种编译错误,其中一种比较棘手的错误是"collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core dumped"。这个错误通常发生在尝试使用g++或gcc编译C++或C...

    应用笔记LAT1185+一个地址未对齐引起的+HardFault+异常

    ### 应用笔记LAT1185:一个地址未对齐引起的HardFault异常 #### 1. 概述 在使用STM32G070微控制器的过程中,客户遇到了一个有趣且令人困惑的问题:当使用KEIL MDK作为编译工具,并将编译优化选项设置为Level0时,...

    Segmentation_fault_in_linux.pdf

    #### 一、Segmentation Fault的概念 Segmentation fault,通常缩写为SIGSEGV,是一种在计算机软件运行过程中可能发生的特定错误条件。当一个程序试图访问它无权访问的内存位置,或者以不被允许的方式访问内存位置时...

    java解析wsdl文档获取方法与参数

    在Java开发中,有时我们需要与Web服务进行交互,这时候就需要用到WSDL(Web Services Description Language)文档。WSDL是一种XML格式,它定义了服务的位置、接口以及如何调用这些服务。本文将深入探讨如何使用Java...

    STM32出现HardFault故障的解决方法

    ### STM32出现HardFault故障的解决方法 #### 一、引言 在嵌入式系统开发中,STM32微控制器因其丰富的外设资源、高性能的处理器内核以及广泛的市场应用而备受青睐。然而,在实际开发过程中,开发者可能会遇到各种...

    Linux环境下段错误(Segmentation fault)的产生原因及调试方法

    在Linux环境下,编程时经常会遇到一个让开发者头疼的问题——段错误(Segmentation fault)。这个问题通常是由于程序尝试访问其不应该访问或者无法访问的内存区域而触发的。本文将深入探讨段错误的原因以及如何在...

    A way to locate Cortex-M hard fault

    Cortex-MHard Fault Cortex-M微控制器在执行代码时,可能会出现Hard Fault错误,这是一种致命的错误,可能是由栈溢出、访问违规等原因引起的。在调试代码时,遇到Hard Fault错误时,如何快速定位错误的位置是一个...

    STM32常见Hard Fault的诊断

    STM32微控制器是基于ARM Cortex-M内核的广泛使用的32位微控制器,其中Hard Fault是一种常见的异常类型,本文将详细介绍STM32在遇到Hard Fault时的诊断方法。 首先,我们需要理解Hard Fault的含义。在ARM Cortex-M...

    stm32的fault错误解析_FaultT32_stm32故障分析_stm32的fault_

    例如,`CFSR`(Configurable Fault Status Register)、`HFSR`(Hard Fault Status Register)、`BFAR`(Bus Fault Address Register)和`MMFAR`(Memory Management Fault Address Register)等。这些寄存器可以...

    flash+xml超酷欧美FLASH整站源码

    Alert.show(event.fault.faultString, event.fault.faultCode); } ]]&gt; &lt;mx:HTTPService id="service" url="data/slideshow.xml" result="resultHandler(event)" fault="faultHandler(event)...

    Flex调用xml通过DataGrid遍历简单示例

    Alert.show(event.fault.faultString, event.fault.faultCode); } ]]&gt; &lt;mx:HTTPService id="service" url="data/slideshow.xml" result="resultHandler(event)" fault="faultHandler(event)...

    ARM内核单片机进入 hardfault的问题查找

    **ARM内核单片机进入HardFault的问题查找** 在嵌入式系统开发中,遇到单片机进入HardFault状态是一个常见的挑战,特别是对于新手开发者来说,可能会感到困惑和无助。HardFault是ARM Cortex-M系列处理器内核中的一个...

Global site tag (gtag.js) - Google Analytics