views:

28

answers:

1

I am pretty new to GraniteDS..So far I have been able to successfully configure it to work with my remote java services as well as generate the equivalent AS3 files from my POJO's. But I am getting this strange error while building one of the classes using GAS3

[ERROR] C:\TestGDS_All\TestGDS-flex-remoteobjects\target\generated-sources\com\mycompany\TestGDS\masterdata\model\TankGradesMlBas
e.as:[77,29] Syntax error: expecting identifier before use.        public function set use(value:String):void {
[ERROR] C:\TestGDS_All\TestGDS-flex-remoteobjects\target\generated-sources\com\mycompany\TestGDS\masterdata\model\TankGradesMlBas
e.as:[77,52] Syntax error: expecting leftparen before leftbrace.        public function set use(value:String):void {
[ERROR] C:\TestGDS_All\TestGDS-flex-remoteobjects\target\generated-sources\com\mycompany\TestGDS\masterdata\model\TankGradesMlBas
e.as:[77,52] Syntax error: expecting identifier before leftbrace.        public function set use(value:String):void {
[ERROR] C:\TestGDS_All\TestGDS-flex-remoteobjects\target\generated-sources\com\mycompany\TestGDS\masterdata\model\TankGradesMlBas
e.as:[77,52] Syntax error: expecting rightparen before leftbrace.        public function set use(value:String):void {
[ERROR] C:\TestGDS_All\TestGDS-flex-remoteobjects\target\generated-sources\com\mycompany\TestGDS\masterdata\model\TankGradesMlBas
e.as:[80,29] Syntax error: expecting identifier before use.        public function get use():String {
[ERROR] C:\TestGDS_All\TestGDS-flex-remoteobjects\target\generated-sources\com\mycompany\TestGDS\masterdata\model\TankGradesMlBas
e.as:[80,42] Syntax error: expecting leftparen before leftbrace.        public function get use():String {
[ERROR] C:\TestGDS_All\TestGDS-flex-remoteobjects\target\generated-sources\com\mycompany\TestGDS\masterdata\model\TankGradesMlBas
e.as:[80,42] Syntax error: expecting identifier before leftbrace.        public function get use():String {
[ERROR] C:\TestGDS_All\TestGDS-flex-remoteobjects\target\generated-sources\com\mycompany\TestGDS\masterdata\model\TankGradesMlBas
e.as:[80,42] Syntax error: expecting rightparen before leftbrace.        public function get use():String {

The java class appears like this

@Entity`
@Table(name = "mmd_tank_grades_ml")
@SuppressWarnings("serial")
public class TankGradesMl implements Serializable {
....
private String use;

    @Basic
    @Column(name = "USE", length = 45)
    public String getUse() {
        return use;
    }

    public void setUse(String use) {
        this.use = use;
    }

What am I doing wrong? How to resolve this error?

I tried by changing the java source variable like below

private String usedFor;

----

    @Basic
    @Column(name = "USE", length = 45)
    public String getUsedFor() {
        return usedFor;
    }

    /**
     * @param use
     *            new value for use
     */
    public void setUsedFor(String usedFor) {
        this.usedFor = usedFor;
    }

and the error is gone...not sure why it was throwing exception for 'use'..too small for variable name :-)

A: 

I think "use" is a keyword.

There is a directive called "use namespace". Look here

I think that is the reason why Flex don't want to compile.

Daniel Engmann