Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Ignored data for non-existent or included columns

    Isomorphic,

    I am writing an add operation at server side. But looks like complete query is not constructed properly.

    Below is my code.

    Code:
    DSRequest dsRequest = new DSRequest("log", DataSource.OP_ADD);
            Calendar currentDate = Calendar.getInstance();
            Date date = currentDate.getTime();
            SimpleDateFormat formatter=  new SimpleDateFormat("yyyy/MMM/dd");
            String dateNow = formatter.format(date);
            HashMap addRec = new HashMap();
            addRec.put("PRODUCT_ID", "NEW MI");
            addRec.put("CLIENT_ID", clientID);
            addRec.put("USER_CD", userName);
            addRec.put("DATES", date);
            addRec.put("ACTIVITY", activity);
            addRec.put("SESSION_ID", sessionID);
            addRec.put("DURATION ", duration);
            addRec.put("TIMESTAMP ", dateNow);
            dsRequest.forceInvalidateCache(true);
            dsRequest.setValues(addRec);
            dsRequest.execute();
    Here is my ds.xml file
    Code:
    <DataSource ID="log"
                serverType="sql"  tableName="USER_LOGS" qualifyColumnNames="false">
        <fields>
            <field name="PRODUCT_ID" title="PRODUCT_ID" type="text"/>
            <field name="CLIENT_ID" title="CLIENT_ID" type="number"/>
            <field name="USER_CD" title="USER_CD" type="text"/>
            <field name="DATES" title="DATES" type="date"/>
            <field name="ACTIVITY" title="ACTIVITY" type="text"/>
            <field name="SESSION_ID" title="SESSION_ID" type="text"/>
            <field name="DURATION" title="DURATION" type="number"/>
            <field name="TIMESTAMP" title="TIMESTAMP" type="text"/>
        </fields>
        <operationBindings>
            <operationBinding operationType="add" allowMultiUpdate="true"/>
        </operationBindings>
    </DataSource>
    Below are the logs

    Code:
    === 2012-06-20 17:41:40,215 [l0-5] DEBUG AppBase - [builtinApplication.null] No userTypes defined, allowing anyone access to all operations for this application
    === 2012-06-20 17:41:40,220 [l0-5] DEBUG AppBase - [builtinApplication.null] No public zero-argument method named '_null' found, performing generic datasource operation
    === 2012-06-20 17:41:40,221 [l0-5] INFO  SQLDataSource - [builtinApplication.null] Performing add operation with
    	criteria: {"TIMESTAMP ":"2012/Jun/20",PRODUCT_ID:"NEW MI",ACTIVITY:"graphsodmidtsummaryDirectionalAggregateGraph",SESSION_ID:"is5mawp6hwmg",DATES:new Date(1340194296790),CLIENT_ID:112,USER_CD:"ba000123","DURATION ":10}	values: {"TIMESTAMP ":"2012/Jun/20",PRODUCT_ID:"NEW MI",ACTIVITY:"graphsodmidtsummaryDirectionalAggregateGraph",SESSION_ID:"is5mawp6hwmg",DATES:new Date(1340194296790),CLIENT_ID:112,USER_CD:"ba000123","DURATION ":10}
    === 2012-06-20 17:41:40,226 [l0-5] INFO  SQLValuesClause - [builtinApplication.null] Ignored data for non-existent or included columns: [TIMESTAMP , DURATION ]
    === 2012-06-20 17:41:40,226 [l0-5] DEBUG SQLValuesClause - [builtinApplication.null] Sequences: {}
    === 2012-06-20 17:41:40,238 [l0-3] INFO  DSResponse - [builtinApplication.summaryDirectionalAggregate] DSResponse: List with 1 items
    === 2012-06-20 17:41:40,297 [l0-5] WARN  SQLDriver - [builtinApplication.null] DSRequest has no RPCManager set when testing if we should join a transaction - transaction will not be joined
    === 2012-06-20 17:41:40,298 [l0-5] DEBUG PoolableSQLConnectionFactory - [builtinApplication.null] DriverManager fetching connection for Oracle via jdbc url jdbc:oracle:thin:@//plabb229.dev.sabre.com:1521/ammiprf2
    === 2012-06-20 17:41:40,298 [l0-5] DEBUG PoolableSQLConnectionFactory - [builtinApplication.null] Passing credentials getConnection separately from JDBC URL
    === 2012-06-20 17:45:39,810 [l0-3] DEBUG AppBase - [builtinApplication.null] No userTypes defined, allowing anyone access to all operations for this application
    === 2012-06-20 17:45:39,810 [l0-3] DEBUG AppBase - [builtinApplication.null] No public zero-argument method named '_null' found, performing generic datasource operation
    === 2012-06-20 17:45:39,812 [l0-3] INFO  SQLDataSource - [builtinApplication.null] Performing add operation with
    	criteria: {"TIMESTAMP ":"2012/Jun/20",PRODUCT_ID:"NEW MI",ACTIVITY:"odmidtsummaryDirectionalAggregate",SESSION_ID:"is5mawp6hwmg",DATES:new Date(1340194538483),CLIENT_ID:112,USER_CD:"ba000123","DURATION ":25}	values: {"TIMESTAMP ":"2012/Jun/20",PRODUCT_ID:"NEW MI",ACTIVITY:"odmidtsummaryDirectionalAggregate",SESSION_ID:"is5mawp6hwmg",DATES:new Date(1340194538483),CLIENT_ID:112,USER_CD:"ba000123","DURATION ":25}
    === 2012-06-20 17:45:39,815 [l0-3] INFO  SQLValuesClause - [builtinApplication.null] Ignored data for non-existent or included columns: [TIMESTAMP , DURATION ]
    === 2012-06-20 17:45:39,815 [l0-3] DEBUG SQLValuesClause - [builtinApplication.null] Sequences: {}
    === 2012-06-20 17:45:39,816 [l0-3] WARN  SQLDriver - [builtinApplication.null] DSRequest has no RPCManager set when testing if we should join a transaction - transaction will not be joined
    === 2012-06-20 17:45:39,816 [l0-3] DEBUG PoolableSQLConnectionFactory - [builtinApplication.null] DriverManager fetching connection for Oracle via jdbc url jdbc:oracle:thin:@//plabb229.dev.sabre.com:1521/ammiprf2
    === 2012-06-20 17:45:39,816 [l0-3] DEBUG PoolableSQLConnectionFactory - [builtinApplication.null] Passing credentials getConnection separately from JDBC URL
    === 2012-06-20 17:45:39,823 [l0-5] ERROR SQLConnectionManager - [builtinApplication.null] Caught exception
    I dont know why i am getting - Ignored data for non-existent or included columns: [TIMESTAMP , DURATION ]
    Hence am not getting these columns in SQL. Can you please let me know what is the mistake i am doing?

    Thanks,
    Yathish

    #2
    You have a trailing space in "DURATION " which is making it not match the field name.

    Comment


      #3
      Yeah. Thanks!!

      Comment

      Working...
      X