glassfish
  1. glassfish
  2. GLASSFISH-691

Java2DB generates wrong data types against oracle for BLOB and CLOB

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 9.1pe
    • Fix Version/s: 9.1pe_dev
    • Component/s: entity-persistence
    • Labels:
      None
    • Environment:

      Operating System: Solaris
      Platform: All

    • Issuezilla Id:
      691
    • Status Whiteboard:
      Hide

      fixed-9.0peur1

      Show
      fixed-9.0peur1

      Description

      Java2DB generates LONG RAW and LONG for BLOB and CLOB data types against Oracle
      DB and this caused the following exception when the DDL is called:
      [java] [TopLink Info]: 2006.05.25 04:15:18.264-ServerSession(14780827)-
      file:/space1/appservers/sqetest/trunk/appserver-sqe/build/pe/sparc_jws-280r-
      2_SunOS/ejb30-dataTypes/classes-manager login successful
      [java] [TopLink Warning]: 2006.05.25 04:15:19.513-ServerSession(14780827)
      -Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.4 (Build 060412)):
      oracle.toplink.essentials.exceptions.DatabaseException
      [java] Internal Exception: java.sql.SQLException: [sunm][Oracle JDBC
      Driver][Oracle]ORA-00942: table or view does not exist
      [java] Error Code: 942
      [java] Call:DROP TABLE DATATYPES
      [java] Query:DataModifyQuery()
      [java] [TopLink Warning]: 2006.05.25 04:15:19.541-ServerSession(14780827)
      -Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.4 (Build 060412)):
      oracle.toplink.essentials.exceptions.DatabaseException
      [java] Internal Exception: java.sql.SQLException: [sunm][Oracle JDBC
      Driver][Oracle]ORA-01754: a table may contain only one column of type LONG
      [java] Error Code: 1754
      [java] Call:CREATE TABLE DATATYPES (ID NUMBER(10) NOT NULL, BLOBDATA LONG
      RAW NULL, CLOBDATA LONG NULL, INTEGERDATA NUMBER(10) NULL, PRIMARY KEY (ID))
      ...

      When the same Java2DB test is run against Derby, the generated DDL is:
      CREATE TABLE DATATYPES (ID INTEGER NOT NULL, BLOBDATA BLOB(64000), CLOBDATA CLOB
      (64000), INTEGERDATA INTEGER, PRIMARY KEY (ID))
      and the test passed.

      In regular mode against Oracle(not Java2DB), the following DDL is used:
      create table datatypes(ID INTEGER, integerData integer, clobData clob, blobData
      blob, CONSTRAINT DATATYPES_PK PRIMARY KEY (ID));
      and the test passed also.

        Activity

        Hide
        mzh777 added a comment -

        Created an attachment (id=282)
        Java2DB test case

        Show
        mzh777 added a comment - Created an attachment (id=282) Java2DB test case
        Hide
        marina vatkina added a comment -

        Reassigned

        Show
        marina vatkina added a comment - Reassigned
        Hide
        gfbugbridge added a comment -

        <BT6443426>

        Show
        gfbugbridge added a comment - <BT6443426>
        Hide
        marina vatkina added a comment -

        This is not a java2db error - the bug is in mapping defaults

        Show
        marina vatkina added a comment - This is not a java2db error - the bug is in mapping defaults
        Hide
        mf125085 added a comment -

        The fix has been checked into the trunk, please see:

        http://fisheye5.cenqua.com/changelog/glassfish/?cs=MAIN:mf125085:20060824180927

        Show
        mf125085 added a comment - The fix has been checked into the trunk, please see: http://fisheye5.cenqua.com/changelog/glassfish/?cs=MAIN:mf125085:20060824180927
        Hide
        mf125085 added a comment -

        Updated target milestone

        Show
        mf125085 added a comment - Updated target milestone
        Hide
        Mitesh Meswani added a comment -

        Changes backported to 9.0 UR1

        Show
        Mitesh Meswani added a comment - Changes backported to 9.0 UR1

          People

          • Assignee:
            mf125085
            Reporter:
            mzh777
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: