Announcement Announcement Module
Collapse
No announcement yet.
Event error in consol but program run(Flex) Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Event error in consol but program run(Flex)

    hi
    i got error for events in spring but program run

    please explain this error
    tanx

    Code:
    Stack trace: TypeError: Error #2007: Parameter type must be non-null.
    	at flash.events::Event()
    	at flash.events::MouseEvent()
    	at mx.events::DragEvent()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\events\DragEvent.as:249]
    	at org.as3commons.lang::ClassUtils$/newInstance()[/home/christophe/IdeaProjects/as3commons/as3-commons-lang/src/main/actionscript/org/as3commons/lang/ClassUtils.as:327]
    	at org.as3commons.reflect::Type$/getTypeDescription()[/home/christophe/IdeaProjects/as3commons/as3-commons-reflect/src/main/actionscript/org/as3commons/reflect/Type.as:221]
    	at org.as3commons.reflect::Type$/forClass()[/home/christophe/IdeaProjects/as3commons/as3-commons-reflect/src/main/actionscript/org/as3commons/reflect/Type.as:138]
    	at org.as3commons.reflect::Type$/forName()[/home/christophe/IdeaProjects/as3commons/as3-commons-reflect/src/main/actionscript/org/as3commons/reflect/Type.as:108]
    	at TypeXmlParser$/parseParameters()[/home/christophe/IdeaProjects/as3commons/as3-commons-reflect/src/main/actionscript/org/as3commons/reflect/Type.as:668]
    	at TypeXmlParser$/parseMethodsByModifier()[/home/christophe/IdeaProjects/as3commons/as3-commons-reflect/src/main/actionscript/org/as3commons/reflect/Type.as:656]
    	at TypeXmlParser$/parseMethods()[/home/christophe/IdeaProjects/as3commons/as3-commons-reflect/src/main/actionscript/org/as3commons/reflect/Type.as:631]
    	at org.as3commons.reflect::Type$/forClass()[/home/christophe/IdeaProjects/as3commons/as3-commons-reflect/src/main/actionscript/org/as3commons/reflect/Type.as:148]
    	at org.springextensions.actionscript.ioc.factory.support::AbstractObjectFactory/getObject()[C:\Users\martino\workspace\SpringActionscript-NEW\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\ioc\factory\support\AbstractObjectFactory.as:240]
    	at org.springextensions.actionscript.ioc.factory.support::DefaultListableObjectFactory/preInstantiateSingletons()[C:\Users\martino\workspace\SpringActionscript-NEW\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\ioc\factory\support\DefaultListableObjectFactory.as:154]
    	at org.springextensions.actionscript.context.support::XMLApplicationContext/afterParse()[C:\Users\martino\workspace\SpringActionscript-NEW\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\context\support\XMLApplicationContext.as:175]
    	at org.springextensions.actionscript.ioc.factory.xml::XMLObjectFactory/_doParse()[C:\Users\martino\workspace\SpringActionscript-NEW\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\ioc\factory\xml\XMLObjectFactory.as:361]
    	at org.springextensions.actionscript.ioc.factory.xml::XMLObjectFactory/_loadNextProperties()[C:\Users\martino\workspace\SpringActionscript-NEW\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\ioc\factory\xml\XMLObjectFactory.as:332]
    	at org.springextensions.actionscript.ioc.factory.xml::XMLObjectFactory/_onPropertiesComplete()[C:\Users\martino\workspace\SpringActionscript-NEW\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\ioc\factory\xml\XMLObjectFactory.as:339]
    	at flash.events::EventDispatcher/dispatchEventFunction()
    	at flash.events::EventDispatcher/dispatchEvent()
    	at org.springextensions.actionscript.collections::Properties/onLoaderComplete()[C:\Users\martino\workspace\SpringActionscript-NEW\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\collections\Properties.as:154]
    	at flash.events::EventDispatcher/dispatchEventFunction()
    	at flash.events::EventDispatcher/dispatchEvent()
    	at flash.net::URLLoader/onComplete()
    Code:
    Message: Error #2007: Parameter type must be non-null.
    Stack trace: TypeError: Error #2007: Parameter type must be non-null.
    	at flash.events::Event()
    	at mx.messaging.events::MessageEvent()[C:\autobuild\3.5.0\frameworks\projects\rpc\src\mx\messaging\events\MessageEvent.as:123]
    	at mx.rpc.events::AbstractEvent()[C:\autobuild\3.5.0\frameworks\projects\rpc\src\mx\rpc\events\AbstractEvent.as:35]
    	at mx.rpc.events::ResultEvent()[C:\autobuild\3.5.0\frameworks\projects\rpc\src\mx\rpc\events\ResultEvent.as:82]
    	at org.as3commons.lang::ClassUtils$/newInstance()[/home/christophe/IdeaProjects/as3commons/as3-commons-lang/src/main/actionscript/org/as3commons/lang/ClassUtils.as:318]
    	at org.as3commons.reflect::Type$/getTypeDescription()[/home/christophe/IdeaProjects/as3commons/as3-commons-reflect/src/main/actionscript/org/as3commons/reflect/Type.as:221]
    	at org.as3commons.reflect::Type$/forClass()[/home/christophe/IdeaProjects/as3commons/as3-commons-reflect/src/main/actionscript/org/as3commons/reflect/Type.as:138]
    	at org.as3commons.reflect::Type$/forName()[/home/christophe/IdeaProjects/as3commons/as3-commons-reflect/src/main/actionscript/org/as3commons/reflect/Type.as:108]
    	at TypeXmlParser$/parseParameters()[/home/christophe/IdeaProjects/as3commons/as3-commons-reflect/src/main/actionscript/org/as3commons/reflect/Type.as:668]
    	at TypeXmlParser$/parseMethodsByModifier()[/home/christophe/IdeaProjects/as3commons/as3-commons-reflect/src/main/actionscript/org/as3commons/reflect/Type.as:656]
    	at TypeXmlParser$/parseMethods()[/home/christophe/IdeaProjects/as3commons/as3-commons-reflect/src/main/actionscript/org/as3commons/reflect/Type.as:631]
    	at org.as3commons.reflect::Type$/forClass()[/home/christophe/IdeaProjects/as3commons/as3-commons-reflect/src/main/actionscript/org/as3commons/reflect/Type.as:148]
    	at org.as3commons.reflect::Type$/forName()[/home/christophe/IdeaProjects/as3commons/as3-commons-reflect/src/main/actionscript/org/as3commons/reflect/Type.as:108]
    	at TypeXmlParser$/parseMethodsByModifier()[/home/christophe/IdeaProjects/as3commons/as3-commons-reflect/src/main/actionscript/org/as3commons/reflect/Type.as:657]
    	at TypeXmlParser$/parseMethods()[/home/christophe/IdeaProjects/as3commons/as3-commons-reflect/src/main/actionscript/org/as3commons/reflect/Type.as:631]
    	at org.as3commons.reflect::Type$/forClass()[/home/christophe/IdeaProjects/as3commons/as3-commons-reflect/src/main/actionscript/org/as3commons/reflect/Type.as:148]
    	at org.as3commons.reflect::Type$/forName()[/home/christophe/IdeaProjects/as3commons/as3-commons-reflect/src/main/actionscript/org/as3commons/reflect/Type.as:108]
    	at TypeXmlParser$/parseMethodsByModifier()[/home/christophe/IdeaProjects/as3commons/as3-commons-reflect/src/main/actionscript/org/as3commons/reflect/Type.as:657]
    	at TypeXmlParser$/parseMethods()[/home/christophe/IdeaProjects/as3commons/as3-commons-reflect/src/main/actionscript/org/as3commons/reflect/Type.as:631]
    	at org.as3commons.reflect::Type$/forClass()[/home/christophe/IdeaProjects/as3commons/as3-commons-reflect/src/main/actionscript/org/as3commons/reflect/Type.as:148]
    	at org.springextensions.actionscript.ioc.factory.support::AbstractObjectFactory/getObject()[C:\Users\martino\workspace\SpringActionscript-NEW\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\ioc\factory\support\AbstractObjectFactory.as:240]
    	at org.springextensions.actionscript.ioc.factory.support::DefaultListableObjectFactory/preInstantiateSingletons()[C:\Users\martino\workspace\SpringActionscript-NEW\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\ioc\factory\support\DefaultListableObjectFactory.as:154]
    	at org.springextensions.actionscript.context.support::XMLApplicationContext/afterParse()[C:\Users\martino\workspace\SpringActionscript-NEW\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\context\support\XMLApplicationContext.as:175]
    	at org.springextensions.actionscript.ioc.factory.xml::XMLObjectFactory/_doParse()[C:\Users\martino\workspace\SpringActionscript-NEW\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\ioc\factory\xml\XMLObjectFactory.as:361]
    	at org.springextensions.actionscript.ioc.factory.xml::XMLObjectFactory/_loadNextProperties()[C:\Users\martino\workspace\SpringActionscript-NEW\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\ioc\factory\xml\XMLObjectFactory.as:332]
    	at org.springextensions.actionscript.ioc.factory.xml::XMLObjectFactory/_onPropertiesComplete()[C:\Users\martino\workspace\SpringActionscript-NEW\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\ioc\factory\xml\XMLObjectFactory.as:339]
    	at flash.events::EventDispatcher/dispatchEventFunction()
    	at flash.events::EventDispatcher/dispatchEvent()
    	at org.springextensions.actionscript.collections::Properties/onLoaderComplete()[C:\Users\martino\workspace\SpringActionscript-NEW\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\collections\Properties.as:154]
    	at flash.events::EventDispatcher/dispatchEventFunction()
    	at flash.events::EventDispatcher/dispatchEvent()
    	at flash.net::URLLoader/onComplete()

  • #2
    This is because the reflection facilities of as3commons try to instantiate the Event object with zero arguments but one is required. Its not a bug. You can look at
    Code:
    org.as3commons.lang::ClassUtils$/newInstance()
    and see for yourself.

    Comment


    • #3
      Originally posted by Rex Sheridan View Post
      This is because the reflection facilities of as3commons try to instantiate the Event object with zero arguments but one is required. Its not a bug. You can look at
      Code:
      org.as3commons.lang::ClassUtils$/newInstance()
      and see for yourself.
      tanx for your reply
      now Can i fix it?how?

      Comment


      • #4
        There is currently no way to avoid this, neverthless the error thrown it will not affect in any way the application: the reflection api must instantiate a class object in order to overcome a flash bug in reporting the class xml description (full description of the problem in the program code).

        If you show your code maybe we could suggest some way, I don't understand exactly where and why reflection is used on an Event.

        Comment


        • #5
          tanx
          this is my code

          blog.mxml
          Code:
          <?xml version="1.0" encoding="utf-8"?>
          <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" preinitialize="onPreinitialize()" layout="absolute" xmlns:adstrim="com.adstrim.client.blog.view.*" applicationComplete="applicationCompleteHandler()" backgroundGradientAlphas="[1.0, 1.0]" backgroundGradientColors="[#FFFFFF, #CBC9C9]" width="1024" height="768" paddingTop="0" xmlns:videoplayer="com.view.videoplayer.*">
          	<mx:Script>
          		<![CDATA[
          			import org.as3commons.lang.StringUtils;
          			import mx.controls.Alert;
          			import com.adobe.cairngorm.control.CairngormEventDispatcher;
          			import com.adstrim.client.blog.util.Constants;
          			import com.adstrim.client.blog.model.IApplicationModel;
          			import com.adstrim.client.blog.view.PopUp;
          			import mx.managers.PopUpManager;
          			import mx.controls.PopUpButton;
          			import com.adobe.cairngorm.control.CairngormEvent;
          
          			import mx.resources.ResourceBundle;
          			import mx.rpc.remoting.RemoteObject;
          
          			import org.springextensions.actionscript.context.support.FlexXMLApplicationContext;
          
          			[ResourceBundle("classreferences")] private var _classReferences:ResourceBundle;
          
          			private var applicationContext:FlexXMLApplicationContext;
          			[Bindable] private var applicationModel:IApplicationModel;
          
          			private function onPreinitialize():void {
          				StyleManager.loadStyleDeclarations('assets/css/assets.swf');
          			}
          
          			private function applicationCompleteHandler():void {
          
          				applicationContext = new FlexXMLApplicationContext();
          				applicationContext.addConfigLocation("resources/application-context.xml");
          				applicationContext.addEventListener(Event.COMPLETE, applicationContextComplete);
          				applicationContext.load();
          			}
          
          			public function applicationContextComplete(event:Event):void {
          				var authService:RemoteObject = applicationContext.getObject("authService") as RemoteObject;
          
          				applicationModel = applicationContext.getObject("appModelInstance") as IApplicationModel;
          				addChild(applicationContext.getObject("menuBar"));
          
          				applicationModel.addEventListener(Constants.CHANGED_CURRENT_REVIEW_EVENT, play);
          				//PopUp.add(applicationContext.getObject("firstPage"));
          			}
          		]]>
          	</mx:Script>
          	<mx:Label x="436.5" y="740" text="Powered By Navid_GH" width="151" fontWeight="bold"/>
          </mx:Application>
          application-context.xml
          Code:
          <?xml version="1.0" encoding="UTF-8" standalone="no"?>
          <objects xmlns="http://www.springactionscript.org/schema/objects" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          	xsi:schemaLocation="http://www.springactionscript.org/schema/objects http://www.springactionscript.org/schema/objects/spring-actionscript-objects-1.0.xsd">
          
          	<import file="services-context.xml"/>
          
          	<!-- logging section-->
          	<object id="traceTarget" class="org.springextensions.actionscript.ioc.factory.config.LoggingTargetFactoryObject">
          		<property name="loggingTargetClass" value="mx.logging.targets.TraceTarget"/>
          		<property name="includeCategory" value="true"/>
          		<property name="includeDate" value="true"/>
          		<property name="includeLevel" value="true"/>
          		<property name="includeTime" value="true"/>
          		<property name="level" value="2"/>
          		<!-- <property name="filters"> <array> <value>com.domain.model.*</value> <value>com.domain.view.*</value>
          			</array>
          			</property>-->
          	</object>
          
          	<!-- importing properties file -->
          	<property file="config.properties" />
          	<!-- using imported properties-->
          	<!--instantiating our Model class-->
          	<object id="appModelInstance" class="com.adstrim.client.blog.model.ApplicationModel"
          		singleton="true"/>
          	<object id="login" class="com.adstrim.client.blog.view.Login" singleton="true">
          		<property name="applicationModel" ref="appModelInstance"/>
          	</object>
          	<object id="menuBar" class="com.adstrim.client.blog.view.MenuBar" singleton="true">
          		<property name="applicationModel" ref="appModelInstance"/>
          		<property name="loginPanel" ref="login"/>
          		<property name="x" value="0"/>
          		<property name="y" value="0"/>
          		<property name="width" value="1024"/>
          	</object>
          	<object id="authDelegateFactory" class="org.springextensions.actionscript.cairngorm.business.BusinessDelegateFactory">
          		<property name="service" ref="authService"/>
          		<property name="delegateClass" type="class" value="com.adstrim.client.blog.delegates.AuthDelegate"/>
          	</object>
          
          	<object id="appAwareCmdFactory" class="com.adstrim.client.blog.commands.base.ApplicationModelAwareCommandFactory">
          		<property name="applicationModel" ref="appModelInstance"/>
          		<method-invocation name="addBusinessDelegateFactory">
          			<arg>
          				<ref>authDelegateFactory</ref>
          			</arg>
          			<arg>
          				<array>
          					<value type="Class">com.adstrim.client.blog.commands.SigninCommand</value>
          					<value type="Class">com.adstrim.client.blog.commands.SignoutCommand</value>
          				</array>
          			</arg>
          		</method-invocation>
          	</object>
          
          
          	<!--instead of Cairngorm FrontController we use this Controller-->
          	<object id="frontController" class="org.springextensions.actionscript.cairngorm.control.CairngormFrontController">
          		<constructor-arg>
          			<object>
          				<property name="signinEvent" value="SigninCommand"/>
          				<property name="signOutEvent" value="SignoutCommand"/>
          		</constructor-arg>
          		<!-- The followoing argument is optional -->
          		<constructor-arg value="com.adstrim.client.blog.commands"/>
          		<!-- Add a custom command factory instance -->
          		<method-invocation name="addCommandFactory">
          			<arg>
          				<ref>appAwareCmdFactory</ref>
          			</arg>
          		</method-invocation>
          	</object>
          </objects>

          Comment


          • #6
            You should not worry about this "error". It is just a log statement to know what as3commons-reflect is doing, but it will not affect your code.

            Nevertheless, I realize this is causing confusion with a lot of people and we have removed the log statement for the coming version.

            regards,
            Christophe

            Comment


            • #7
              tanx alot for help

              Comment

              Working...
              X