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与 java 通信常见错误: [RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error NetConnection.Call.Failed: ...
根据WSDL文件生成客户端代码与创建客户端工程 注意小细节:在根据对方提供的... 否则报:WSDLException (at /html): faultCode=INVALID_WSDL: Expected element '{http://schemas.xmlsoap.org/wsdl/}definitions'.:
#define HNTC_fault 0x03fd //High resister NTC fault value #define IGBT_HTPD 645 //IGBT high temperature power down=78c #define IGBT_HTP 635 //IGBT high temperature protect=80c #define Load_HT ...
Android之Webservice详解与调用天气预报Webservice完整实例
collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core dumped g++/gcc都不能编译了,一直抱ld的问题。网上找了很多方法都不行,弄了好久终于搞定了
FLEX ;Unable to access UserTransaction in DataService 解决配置问题
Alert.show(event.fault.faultString, event.fault.faultCode); } ]]> <mx:HTTPService id="service" url="data/slideshow.xml" result="resultHandler(event)" fault="faultHandler(event)...
Alert.show(event.fault.faultString, event.fault.faultCode); } ]]> <mx:HTTPService id="service" url="data/slideshow.xml" result="resultHandler(event)" fault="faultHandler(event)...
Data-driven Design of Fault Diagnosis and Fault-tolerant Control Systems 2014 杜伊斯堡埃森大学 丁教授
Maj Ethernet Switch Port Fault Subrack=1,Slot=2,PlugInUnit=1,ExchangeTerminalIp=1,EthernetSwitch=1,EthernetSwitchPort=2 (LINK_DOWN) Maj Plug-In Unit General Problem Subrack=1,Slot=11,PlugInUnit=1 ...
STM32常见Hard Fault的诊断信息,STM32常见Hard Fault的诊断信息
A SURVEY OF FAULT SIMULATION, FAULT GRADING AND TEST PATTERN GENERATION TECHNIQUES WITH EMPHASIS ON THE FEASIBILITY OF VHDL BASED FAULT SIMULATION
本文简单介绍了Segmentation fault发生的原因,结合实际例子描述了内核向用户态程序发送SIGSEGV信号的流程。文中以实例回答了常见的一些SIGSEGV问题,例如“为什么函数返回了栈还可以访问?”、“为什么free()后的...
Maj Ethernet Switch Port Fault Subrack=1,Slot=2,PlugInUnit=1,ExchangeTerminalIp=1,EthernetSwitch=1,EthernetSwitchPort=2 (LINK_DOWN) Maj Plug-In Unit General Problem Subrack=1,Slot=11,PlugInUnit=1 ...
基于模型和信号的故障诊断综述SCI原文,同时上传了该文章的翻译版,可以搜索“故障诊断与容错技术概述第一部分基于模型和基于信号的方法(翻译)”进行下载,谢谢
STM32出现HardFault故障的解决方法
STM32 HardFault的诊断.pdf STM32 Hard Fault STM32 HardFault的诊断.pdf STM32 Hard Fault STM32 HardFault的诊断.pdf STM32 Hard Fault STM32 HardFault的诊断.pdf STM32 Hard Fault STM32 HardFault的诊断.pdf ...
在单片机进入hardfault是非常常见的一个问题,对于新手来说这是最令人头疼的,对于ARM内核的不熟悉,但是查找问题变得很困难,希望这篇文章能解决你的问题
写的qt程序为hello,然后运行命令为:...==32140== General Protection Fault ==32140== at 0x222D16E6: ??? (in /usr/lib/x86_64-linux-gnu/dri/vmwgfx_dri.so) ==32140== by 0x222DEBD5: ??? (in /usr/lib/x86_6