Dear support,
I strugged for the last 3 days for this problem. I think it something is wrong with ADEP 4.6
Our testModule flex project points to Adobe samples app: C:\ADEP Data Services for Java EE 4.6\tomcat\webapps\dataservices-samples\ which is created to load 2 modules.
testModule.mxml - Main |
---|
<?xml version="1.0"?> <!-- modules/SimpleProgressEventHandler.mxml --> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:control="ipslib.control.*" implements="flash.events.IEventDispatcher">
<fx:Declarations>
</fx:Declarations>
<fx:Script> <![CDATA[ import mx.controls.Alert; import mx.events.FlexEvent; import mx.events.ModuleEvent; import mx.modules.*;
[Bindable] public var progBar:String = ""; [Bindable] public var progMessage:String = "";
public function createModule():void { firstLoader.loadModule(moduleTxt.text);
} public function createModule2():void { secondLoader.loadModule(moduleTxt2.text); }
public function removeModule():void { firstLoader.unloadModule();
}
public function removeModule2():void { secondLoader.unloadModule();
}
protected function moduleLoader_error(event:ModuleEvent):void { Alert.show("error " + event.errorText); }
]]> </fx:Script> <s:VGroup width="100%" height="100%">
<mx:HBox> <mx:Button label="Load 1st module" click="createModule()"/>
<mx:Button label="Unload 1st module" click="removeModule()"/> <mx:TextInput id="moduleTxt" text="Module1.swf"/> </mx:HBox>
<mx:ModuleLoader id="firstLoader" width="100%" height="100%" error="moduleLoader_error(event)" ready="moduleLoader_error(event)"/>
<mx:HBox> <mx:Button label="Load 2nd module" click="createModule2()"/>
<mx:Button label="Unload 2nd module" click="removeModule2()"/>
<mx:TextInput id="moduleTxt2" text="Module2.swf"/> </mx:HBox>
<mx:ModuleLoader id="secondLoader" width="100%" height="100%" error="moduleLoader_error(event)"/>
</s:VGroup>
</s:Application> |
1st module just has a dummy webservice declared :
Module1.mxml |
---|
<?xml version="1.0" encoding="utf-8"?> <s:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%" creationComplete="init()"> <fx:Declarations>
<s:WebService id="fooWs" destination="ws-foo" useProxy= "true" showBusyCursor="true" result="fooWs_resultHandler(event)" fault="fooWs_faultHandler(event)" >
</s:WebService>
</fx:Declarations>
<fx:Script> <![CDATA[ import mx.controls.Alert; import mx.data.Conflicts; import mx.data.events.DataConflictEvent; import mx.rpc.events.FaultEvent; import mx.rpc.events.ResultEvent;
protected function init():void {
trace('init do nothing'); }
protected function fooWs_resultHandler(event:ResultEvent):void { trace('webserivce result ' +event.message);
}
protected function fooWs_faultHandler(event:FaultEvent):void { trace('webserivce fault '+event.message);
}
]]> </fx:Script>
<mx:Panel width="100%" height="100%" title="Doing nothing, a websvice is declared in the background">
</mx:Panel> </s:Module> |
which points to
proxy-config.xml |
---|
<destination id="ws-foo"> <properties> <wsdl>http://whatever.com:9090/anything?wsdl</wsdl> <soap>*</soap> </properties> <adapter ref="soap-proxy" /> </destination> |
2nd Module: just has a dummy DataSerivce
Module2.mxml |
---|
<?xml version="1.0" encoding="utf-8"?> <s:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%" creationComplete="init()"> <fx:Declarations>
<mx:DataService id="dsEmployee" destination="crm-employee" />
</fx:Declarations>
<fx:Script> <![CDATA[
protected function init():void { trace('init do nothing'); }
]]> </fx:Script>
<mx:Panel width="100%" height="100%" title="Doing nothing, a Dataservice is declared in the background">
</mx:Panel> </s:Module> |
which points to crm-employee in data-management-config.xml.
If you load the 1st module, then you will get this error on 2nd module
Error |
---|
TypeError: Error #1009: Cannot access a property or method of a null object reference. at mx.data::Metadata/applyConfigSettingsForDataService()[C:\depot\DataServices\branches\milestone\adepds46_rc\frameworks\projects\data\src\mx\data\Metadata.as:2307] at mx.data::Metadata/applyConfigSettings()[C:\depot\DataServices\branches\milestone\adepds46_rc\frameworks\projects\data\src\mx\data\Metadata.as:2402] at Function/<anonymous>()[C:\depot\DataServices\branches\milestone\adepds46_rc\frameworks\projects\data\src\mx\data\Metadata.as:119] at mx.data::Metadata/initialize()[C:\depot\DataServices\branches\milestone\adepds46_rc\frameworks\projects\data\src\mx\data\Metadata.as:181] at mx.data::ConcreteDataService()[C:\depot\DataServices\branches\milestone\adepds46_rc\frameworks\projects\data\src\mx\data\ConcreteDataService.as:153] at mx.data::ConcreteDataService$/getService()[C:\depot\DataServices\branches\milestone\adepds46_rc\frameworks\projects\data\src\mx\data\ConcreteDataService.as:2206] at mx.data.mxml::DataService/set destination()[C:\depot\DataServices\branches\milestone\adepds46_rc\frameworks\projects\data\src\mx\data\mxml\DataService.as:136] at Module2/_Module2_DataService1_i()[C:\WB_WS\wb_flex_ws2\testModule\src\Module2.mxml:4] at Module2()[C:\WB_WS\wb_flex_ws2\testModule\src\Module2.mxml:4] at _Module2_mx_core_FlexModuleFactory/create()[_Module2_mx_core_FlexModuleFactory.as:54] at mx.modules::ModuleLoader/moduleReadyHandler()[E:\dev\4.y\frameworks\projects\mx\src\mx\modules\ModuleLoader.as:545] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at ModuleInfoProxy/moduleEventHandler()[E:\dev\4.y\frameworks\projects\framework\src\mx\modules\ModuleManager.as:1149] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at ModuleInfo/readyHandler()[E:\dev\4.y\frameworks\projects\framework\src\mx\modules\ModuleManager.as:793] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::FlexModuleFactory/update()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\FlexModuleFactory.as:535] at mx.core::FlexModuleFactory/docFrameHandler()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\FlexModuleFactory.as:681] at mx.core::FlexModuleFactory/docFrameListener()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\FlexModuleFactory.as:131] |
Could you please confirm if it is the same on your workstation?
Thanks
Views
Replies
Total Likes