Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Flashbuilder 4 and DTO2FX generates errors

DTO2Fx
Anonymous
2010-05-28
2013-04-29

  • Anonymous
    2010-05-28

    I am using Flashbuilder 4 to build my application and have added the proper files and annotations to get DTO2FX to work and on the initial build my java objects created my remote flex objects perfectly.  All except 1 file.  This is a very simple file that has inheritance which produces an error in the equivalent .as file.  One file is easy enough to change; however, I recently created a new project and put the output of DTO2FX to another project and all my model objects show this behavior.  The following is the information for the simpler case.

    The error I get is:
    1084: Syntax error: expecting identifier before rightparen.    _Resource.as            /nueFed/src/flex/com/foo/ue/model/resource/generated        line 27  Flex Problem

    The _Resource.as file looks like this:  (Notice the  duplicate import statements and the duplication ););  in the toXML function)

    package com.foo.ue.model.resource.generated {
       
      import com.foo.ue.model.Entity;
      import com.foo.ue.model.Entity;
      import flash.utils.Dictionary;
     
      /*  */
      public class _Resource extends com.foo.ue.model.Entity {
     
        /* Constructor */
        public function _Resource():void {
          super();
        }  
       
       
        override public function get properties():Dictionary {                  
          var properties:Dictionary = super.properties;  
          return properties;
        }   
       
        override public function set properties(properties:Dictionary):void {
          super.properties = properties;
        }   

        override public function toXML():XML {
          var xml:XML = super.toXML(););
          return xml;
        }
         
       
      }
    }  

    The java Resource file looks like this:

    package com.foo.ue.model.resource;

    import com.foo.ue.model.Entity;
    import com.farata.dto2fx.annotations.FXClass;

    /**
    * @author castleboomer
    * @version 1.0
    * @created 25-May-2010 3:21:02 PM
    */
    @FXClass
    public class Resource extends Entity {

          public Resource(){

          }

    }   

    I am using the 3.2.2 rev of the DTO2FX jar

     
  • hairyone
    hairyone
    2010-08-31

    I am experiencing exactly the same error. Does anyone have a fix for this ?

     
  • hairyone
    hairyone
    2010-08-31

    here's what is being generated, notice the missing ");"

    override public function toXML():XML {
          var xml:XML = super.toXML();
          xml.appendChild(<departmentIdList>{departmentIdList}</departmentIdList>
          xml.appendChild(<departments>{departments}</departments>
          xml.appendChild(<email>{email}</email>
          xml.appendChild(<forename>{forename}</forename>
          xml.appendChild(<initials>{initials}</initials>
          xml.appendChild(<password>{password}</password>
          xml.appendChild(<status>{status}</status>
          xml.appendChild(<surname>{surname}</surname>
          xml.appendChild(<username>{username}</username>);
          return xml;

     

  • Anonymous
    2010-09-01

    I have resolved this problem by using an earlier version of the DTO2FX jars.

    I could not find anywhere to download earlier versions but someone was kind enough to send me their copies of com.farata.dto2fx.asap_3.1.0.20090225034925.jar and the corresponding com.farata.dto2fx.annotations.jar with class files around the same date.

    I would be happy to email these out to anyone who asks.

     
  • Thank you guys for reporting, there was a bug in cdb.dto2fx.plugin/xslt/as3-remote-class-generated.xslt and I have checked in the fix to the code repository. In essense, replaced
          xml.appendChild(<xsl:element name="{@name}">{this.<xsl:value-of select="@name"/>}</xsl:element></xsl:for-each>);
    with
          xml.appendChild(<xsl:element name="{@name}">{this.<xsl:value-of select="@name"/>}</xsl:element>);</xsl:for-each>

    Victor

     
  • Also added new plugin and new annotation jars to DTO2Fx upload folder, timestamp _3.2.2.20100901123043.

    V

     
  • Marty Pitt
    Marty Pitt
    2010-09-01

    Awesome - thanks Victor.

     
  • Vishal
    Vishal
    2011-08-13

    Problem is Executing the Sample Clear Data Builder Project..
    I am using Flash Builder 4.5 Plugin
    Eclipse Indigo Based v3.7
    Clear Data Builder v4.5
    Tomcat 6.0
    and MS SQL Server 2008.
    I'm getting problem during execution. The error says "DataSource not found". My Sample Project is done as shown on

    http://www.cleartoolkit.com/dokuwiki/doku.php?id=clearwiki:20.cleardatabuilder:08.tutorial

    this website tutorial. But still i am unable to run the program

     
  • Vishal
    Vishal
    2011-08-14

    yes i have configured for MS SQL server instead of MySQL.