Versions:
gwt: 2.3
smartgwt power: 2.5 (final) and 2.5p (2012-04-09)
DB: Oracle 11g R2
Driver: ojdbc6.jar
Browsers: Any (tested with safari, firefox, chrome, ie) in dev mode as well as deployed mode.
Related link: http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-faq-090281.html#08_01
Dear Isomorphic Team,
we observed some very strange behaviour im smartgwt 2.5.
The client displays columns marked as datetime in ...ds.xml and declared as TIMESTAMP within the ORACLE table without time, or to be precise the time part is always 12:00. That's why we call it the "high noon problem" ;)
Time is displayed correctly if you use ojdbc14.jar or smartgwtee 3.0p (eval, 2012-04-10).
Some observations:
Under failure conditions (sgwt 2.5 + ojdb6) the response contains an instance of ISCDate for the TIMESTAMP column (debugged our DMI before returning the response). The json repsonse on the client receives this as "Date.parseServerDate(04, 04, 2012)" - no time visible.
Under success conditions the TIMESTAMP column is not mapped to an ISCDate. It is either a java.sql.Timestamp (sgwt 2.5 + ojdbc14) or a java.sql.Date (sgwt 3.0 + ojdbc6). Both arrive at the client as "new Date(1337....)" and display the time part correctly.
We concluded from these findings there is a severe misbehaviour in sgwt 2.5 in collaboration with ojdbc6 drivers. Please note, I'm not saying this is a bug in sgwt, because Oracle plays a big part in this issue too.
Since there obviously is a fix available in sgwt 3.0, please apply it to sgwt 2.5 too! You'd save my day (and lots of sleepless nights).
And now for the minimalistic testcase:
Apply the different settings (sgwt 2.5/3.0 and ojdbc14/ojdbc6) as described above and you should observe the same as we did.
Create Table:
Datasource ds.xml:
Entrypoint:
I hope this helps to narrow down and squash this annoying (at least for us) issue.
In the meantime: Do you have an idea how to work around it?
Best regards
martin
gwt: 2.3
smartgwt power: 2.5 (final) and 2.5p (2012-04-09)
DB: Oracle 11g R2
Driver: ojdbc6.jar
Browsers: Any (tested with safari, firefox, chrome, ie) in dev mode as well as deployed mode.
Related link: http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-faq-090281.html#08_01
Dear Isomorphic Team,
we observed some very strange behaviour im smartgwt 2.5.
The client displays columns marked as datetime in ...ds.xml and declared as TIMESTAMP within the ORACLE table without time, or to be precise the time part is always 12:00. That's why we call it the "high noon problem" ;)
Time is displayed correctly if you use ojdbc14.jar or smartgwtee 3.0p (eval, 2012-04-10).
Some observations:
Under failure conditions (sgwt 2.5 + ojdb6) the response contains an instance of ISCDate for the TIMESTAMP column (debugged our DMI before returning the response). The json repsonse on the client receives this as "Date.parseServerDate(04, 04, 2012)" - no time visible.
Under success conditions the TIMESTAMP column is not mapped to an ISCDate. It is either a java.sql.Timestamp (sgwt 2.5 + ojdbc14) or a java.sql.Date (sgwt 3.0 + ojdbc6). Both arrive at the client as "new Date(1337....)" and display the time part correctly.
We concluded from these findings there is a severe misbehaviour in sgwt 2.5 in collaboration with ojdbc6 drivers. Please note, I'm not saying this is a bug in sgwt, because Oracle plays a big part in this issue too.
Since there obviously is a fix available in sgwt 3.0, please apply it to sgwt 2.5 too! You'd save my day (and lots of sleepless nights).
And now for the minimalistic testcase:
Apply the different settings (sgwt 2.5/3.0 and ojdbc14/ojdbc6) as described above and you should observe the same as we did.
Create Table:
Code:
CREATE TABLE "TEST_SCHEMA"."COMMENT" ( COMMENT_ID NUMBER NOT NULL ENABLE, COMMENT_DEF_ID NUMBER NOT NULL ENABLE, COMMENT_TEXT VARCHAR2(512 BYTE) NOT NULL ENABLE, COMMENT_OPERATOR_ID VARCHAR2(100 BYTE) NOT NULL ENABLE, COMMENT_CRETIMESTAMP TIMESTAMP (3) NOT NULL ENABLE, COMMENT_TYPE VARCHAR2(10 BYTE) NOT NULL ENABLE, PRIMARY KEY (COMMENT_ID) )
Code:
<DataSource ID="COMMENT" serverType="sql" dbName="Oracle" schema="TEST_SCHEMA" tableName="COMMENT"> <fields> <field name="COMMENT_ID" primaryKey="true" type="sequence"></field> <field name="COMMENT_DEF_ID" type="integer"></field> <field name="COMMENT_TEXT" length="512" type="text"></field> <field name="COMMENT_OPERATOR_ID" length="45" type="text"></field> <field name="COMMENT_TYPE" length="10" type="text"></field> <field name="COMMENT_CRETIMESTAMP" type="datetime"></field> </fields> </DataSource>
Code:
public void onModuleLoad() { DataSource ds = DataSource.get("COMMENT"); VLayout layout = new VLayout(); layout.setSize("800px", "600px"); ListGrid commentsList = new ListGrid(); commentsList.setMinWidth(1280); commentsList.setDefaultWidth(1280); commentsList.setWidth("100%"); commentsList.setHeight100(); commentsList.setHeaderHeight(20); commentsList.setOverflow(Overflow.VISIBLE); commentsList.setAlternateRecordStyles(true); commentsList.setDataSource(ds); commentsList.fetchData(); layout.addMember(commentsList); RootPanel.get("comments").add(layout); }
In the meantime: Do you have an idea how to work around it?
Best regards
martin
Comment