Announcement

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

    Problem transforming Add request to SQL -- fields missing?

    This problem was observed in the 2/18 build of SmartGWT EE, and using Firefox.

    We have an add operation where several fields are being dropped between the request and SQL (and also in the response). See the request and SQL from the server log below. Note that the "HVAM" fields are in the add request but not in the SQL a few lines later.

    By way of additional info, we are custom generating the part of the data source definition where these fields are defined, and have some additional attributes. But reviewing the data source using the DataSourceLoader servlet/browser trick, it looks correct:

    {
    customSelectExpression:"CASE WHEN HVAM03='Y' THEN 'Y' ELSE 'N' END",
    detail:true,
    labelAsTitle:"true",
    menuItem:"Costing>END OF SEASON Match",
    name:"HVAM03",
    sqlStorageStrategy:"singleCharYN",
    title:"END OF SEASON Match",
    type:"boolean"
    },


    Is there an explanation for this behavior? If so, how can I fix it?

    Thanks in advance.

    === 2011-02-23 14:07:52,413 [0-59] INFO SQLDataSource - [builtinApplication.add_PoHeader_member(F023)] Performing add operation with
    criteria: {} values: {HVAG:"1",HTPINV:true,HHND:" ",HUSR:"GUI",HOCR:"O",HRNO:0,HAEX:true,HPSP:"N",HDRP:"N",HBYR:"SP",HFGP:23,HFDG:"1",HNU1:"GUI","HUA#":false,HUAA:false,HPRF:"L",OrderType:"B",HLNF:0.0,HART:"N",HBLK:"EDS0223113",HVEN:821,HODI:new Date(1298440800000),HSDI:new Date(1298440800000),HADI:new Date(1298440800000),HCDI:new Date(1298440800000),HBC3:" ",HBC1:" ",HBC2:" ",HFNM:" ",HEML:false,HPED:false,HTC2:" ",HTC1:" ",HTC4:" ",HTC3:" ",HTCD:" ",HCMD:" ",HFA1:" ",HFA2:" ",HFTD:" ",HGPA:0.0,HEXP:false,HFDM04:false,HFDM03:false,HFDM05:false,HFDM02:false,HFDM01:false,HFAX:false,HPTK:false,HFTC:" ",HCUR:" ",HCUT:"H",HFST:" ",HFZP:" ",HCSG:false,HFCN:" ",HTI1:" ",HTI2:" ",HTI5:" ",HTI3:" ",HTI4:" ",HEDI:false,HVAM01:true,HVAM02:true,HVAM03:false,HPRT:true,HFCT:" ",HVAM05:false,HVAM04:true,HTRM:" ",HEADR:" ",HFPH:" ",HSPA:0.0,HFOB:" ",HVIA:" ",HOP2:false,HCRT:1.0,HFDQ01:1,HFDY01:"V",HFDV01:0.06800000369548798,HFDQ02:2,HFDY02:"V",HFDV02:0.04500000178813934,HFDQ03:0,HFDY03:"V",HFDV03:0.0,HFDQ04:0,HFDY04:"V",HFDV04:0.0,HFDQ05:0,HFDY05:"V",HFDV05:0.0,HVAQ01:1,HVAY01:"V",HVAV01:0.03500000014901161,HVAQ02:0,HVAY02:"V",HVAV02:0.0,HVAQ03:0,HVAY03:"V",HVAV03:0.0,HVAQ04:0,HVAY04:"V",HVAV04:0.0,HVAQ05:2,HVAY05:"V",HVAV05:0.020999999716877937,HSTR:1,HDPT:81,SelectedTerms:[],HDXMOQ:"N",HSTS:"A",HCLO:false,HFTB:false,HONO:"EDS0223113",HBOQ:false,HAPF:"I",HODT:110223,HSDT:110223,HCDT:110223,HOAI:new Date(1298440800000),HADT:110223,HOAD:110223,HSTX:1,HDIV:81,HFRI:new Date(-62135748000000),HFVI:new Date(-62135748000000),HLVI:new Date(-62135748000000),HLSI:new Date(-62135748000000),HLCI:new Date(-62135748000000),HLCE:new Date(-62135748000000),HLRI:new Date(-62135748000000)}
    === 2011-02-23 14:07:52,415 [0-59] INFO SQLValuesClause - [builtinApplication.add_PoHeader_member(F023)] Ignored data for non-existent columns: [SelectedTerms]
    === 2011-02-23 14:07:52,424 [0-59] DEBUG SQLValuesClause - [builtinApplication.add_PoHeader_member(F023)] Sequences: {}
    === 2011-02-23 14:07:52,429 [0-59] DEBUG PoolableSQLConnectionFactory - [builtinApplication.add_PoHeader_member(F023)] DriverManager fetching connection for iptsfilz via jdbc url jdbc:as400://iwave;toolbox trace=error;naming=system;prompt=false;user=IPGUI;password=IPGUI;libraries=IPTSFILZ,IPWMFILZ,IPPAFILZ,IPASFILZ
    === 2011-02-23 14:07:52,429 [0-59] DEBUG PoolableSQLConnectionFactory - [builtinApplication.add_PoHeader_member(F023)] Passing JDBC URL only to getConnection
    === 2011-02-23 14:07:52,998 [0-59] DEBUG PoolableSQLConnectionFactory - [builtinApplication.add_PoHeader_member(F023)] Returning pooled Connection
    === 2011-02-23 14:07:52,998 [0-59] INFO SQLDriver - [builtinApplication.add_PoHeader_member(F023)] Executing SQL update on 'iptsfilz': INSERT INTO
    IPPOHDR_F023 (HHND, HCLO, HRNO, HBLK, HBYR, HFDG, HOP2, HADI, HTI4, HFDV01, HTI3, HFDV02, HTI2, HFNM, HTI1, HFDV03, HFDV04, HFDV05, HBC2, HBC1, HBC3, HTI5, HOAD, HOAI, HART, HONO, HCSG, HSPA, HEADR, HTRM, HAEX, HFOB, HNU1, HTCD, HFVI, HVEN, HLNF, HLVI, HUSR, HGPA, HCDT, HAPF, HFPH, HCMD, HCUT, HCDI, HFGP, HCUR, HADT, HTC2, HTC1, HTC4, HTC3, HTPINV, HLSI, HODT, HPRT, HVAV05, HFAX, HVAV03, HVAV04, HVAV01, HVAV02, HEDI, HEXP, HLCI, HLCE, HVAQ05, HEML, HVAQ04, HVAQ03, HODI, HVAQ02, HFRI, HDIV, HPSP, HSDI, HPTK, HVAY01, HVAY03, HVAY02, HVAY05, HSDT, HVAY04, HPED, HFA1, HFA2, HCRT, HSTX, HSTR, HVIA, HSTS, HDRP, HFDQ01, HFDQ02, HFDQ03, HFST, HFDQ04, HFDQ05, HUA#, HFCT, HFZP, HBOQ, HFCN, HVAG, HOCR, HFDY04, HFDY03, HLRI, HFDY02, HVAQ01, HFDY01, HFDY05, HDPT, HUAA, HPRF, HFTD, HFTB, HFTC) VALUES (' ', 'N', 0, 'EDS0223113', 'SP', '1', 'N', '2011-02-23', ' ', 0.06800000369548798, ' ', 0.04500000178813934, ' ', ' ', ' ', 0.0, 0.0, 0.0, ' ', ' ', ' ', ' ', 110223, '2011-02-23', 'N', 'EDS0223113', 'N', 0.0, ' ', ' ', 'Y', ' ', 'GUI', ' ', '0001-01-01', 821, 0.0+1 , '0001-01-01', 'GUI', 0.0, 110223, 'I', ' ', ' ', 'H', '2011-02-23', 23, ' ', 110223, ' ', ' ', ' ', ' ', 'Y', '0001-01-01', 110223, 'Y', 0.020999999716877937, 'N', 0.0, 0.0, 0.03500000014901161, 0.0, 'N', 'N', '0001-01-01', '0001-01-01', 2, 'N', 0, 0, '2011-02-23', 0, '0001-01-01', 81, 'N', '2011-02-23', 'N', 'V', 'V', 'V', 'V', 110223, 'V', 'N', ' ', ' ', 1.0, 1, 1, ' ', 'A', 'N', 1, 2, 0, ' ', 0, 0, 'N', ' ', ' ', 'N', ' ', '1', 'O', 'V', 'V', '0001-01-01', 'V', 1, 'V', 'V', 81, 'N', 'L', ' ', 'N', ' ')

    #2
    It would be normal for values to be dropped if there's no such DataSource field. You can see that being logged (SelectedTerms) but obviously we're not logging the other fields that are being removed.

    We would suggest:

    1. add logging to see where the value is dropped. You can look at dsRequest.values in a DMI, in DataSource.execute(), executeAdd() etc, before and after any of your own custom code executes.

    2. turn the SQLDataSource logging up to INFO or DEBUG to see more logs

    3. look at all the fields that are dropped. Do they have something in common?

    Comment

    Working...
    X