Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4867568

Byte array support in CallableStatements missing from PB 4.5

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 8.0pe
    • 1.0
    • core-libs
    • None
    • 8.0pe
    • generic
    • solaris_8

      The following text details the interactions on the PB support system. This bug relfects the history of this issue...

      Hi Jonathan,

      As discussed in yesterday's call, we've built an ECF for you with the fix for one of the CTS problems relating to byte array parameters. In this fix, we've added a byte array wrapper class. With this build and an updated PointBaseProcedures.java file which reflects the change from byte[] to jdbcInOutByteArrayWrapper, the tests pass.

      This build also fixes bug 2758 (an NPE is thrown by getCharacterStream when a null value is encountered in a CLOB column), as also discussed in the call.

      The ECF build is available at http://www.pointbase.com/support/updates-d.html with the password gearbox.

      The updated PointBaseProcedure.java file is attached.

      Can you please let us know if you see this fixing bug 2758 as well as the related CTS tests that were failing.

      Best regards,
      Alec Response (Alec) 05/07/2003 06:44 PM Hi Jonathan and Lance,

      Further to our discussion today about the problem with getParameterMetaData, I've attached a test case that demonstrates the issue. The 2 class files under the directory \com contain the implementation of getParameterMetaData.

      If you unzip the archive and edit toolsCommander.bat so that DBCLASSDIR points to the directory you unzipped to, and JAVA_HOME points to the location of a 1.3 JVM, then you can run the batch file and see the problem. If you then change the name of the directory \com so that the classes in it aren't found, you'll see the SELECT go through with no errors.

      On the other hand, if you edit JAVA_HOME to point to a 1.4 JVM, the problem also won't occur.

      We look forward to any feedback you can provide.

      Best,
      Alec
      PointBase Technical Support Response (Alec) 04/30/2003 05:11 PM Hi Lance,

      We've discovered that there are two issues due to which four tests are failing.

      Issue 1
      We don't support getParameterMetaData, so the test "testGetParameterMetaData" is failing. Can you tell me what you see as the priority for having PointBase support this? Can we get by without it for the present?

      Issue 2
      We need a wrapper for "Inout" and "out" byte array parameters. We have added a byte array wrapper in 4.6 called "com.pointbase.jdbc.jdbcInOutByteArrayWrapper". When we updated the PointBaseProcedures.java file for all the Inout, Out parameters to reflect the change from byte[] to jdbcInOutByteArrayWrapper, these tests pass.

      We can port this into a 4.5 build for you, but before doing that we wanted to find out your thoughts on the lack of support for getParameterMetaData. If we can get by without this, then we can go ahead and port the byte array wrapper code into 4.5 and buld it for you.


      Best regards,
      Alec
      PointBase Technical Support Response (Alec) 04/21/2003 05:51 PM Hi Lance,

      We're investigating this and I will get back to you asap.

      Alec
      PointBase Technical Support Customer (lance andersen) 04/21/2003 03:37 PM We are trying to validate the pointbase 4.5 3.0 JDBC driver against CTS 1.4 test suite.

      We have several failures which can me demonstrated via the attached Issues.java program

      I have also attached an ant script to create the ddl/stored procedures in question as well as the source for the java stored procedures.

      This is a stripped down version of the CTS tests that are failing.

      Any insight would be quite useful.

      Most of the failures had to do with the binary/varbinary procedures when trying to use getBytes() or getObject().

      The ant target which can be used for creating the stored procedures is:







      To run the program:

      java -cp .:/files1/pointbase45/lib/pbclient45GA217.jar Issues
      *** Running testGetParameterMetaData ****
      Exception encountered: getParameterMetaData() not supported.

      *** Running testGetObject43 ****
      getting the bytearray value
      get the PreparedStatement object
      get the CallableStatement object
      register the output parameters
      execute the procedure
      invoke getObject method
      bytearr len=24
      oRetVal len=0
      getObject did not return a non-zero length byte array

      *** Running testRegisterOutParameter29 ****
      getting the bytearray value
      get the CallableStatement object
      register the output parameters
      execute the procedure
      invoke getObject method
      bytearr len=50
      oRetVal len=103
      getObject did not return the proper byte array values
      *****bytearr[0]=0,oRetVal[0]=88
      getObject did not return the proper byte array values
      *****bytearr[1]=1,oRetVal[1]=39
      getObject did not return the proper byte array values
      *****bytearr[2]=2,oRetVal[2]=48
      getObject did not return the proper byte array values
      *****bytearr[3]=3,oRetVal[3]=48
      getObject did not return the proper byte array values
      *****bytearr[4]=4,oRetVal[4]=48
      getObject did not return the proper byte array values
      *****bytearr[5]=5,oRetVal[5]=49
      getObject did not return the proper byte array values
      *****bytearr[6]=6,oRetVal[6]=48
      getObject did not return the proper byte array values
      *****bytearr[7]=7,oRetVal[7]=50
      getObject did not return the proper byte array values
      *****bytearr[8]=8,oRetVal[8]=48
      getObject did not return the proper byte array values
      *****bytearr[9]=9,oRetVal[9]=51
      getObject did not return the proper byte array values
      *****bytearr[10]=10,oRetVal[10]=48
      getObject did not return the proper byte array values
      *****bytearr[11]=11,oRetVal[11]=52
      getObject did not return the proper byte array values
      *****bytearr[12]=12,oRetVal[12]=48
      getObject did not return the proper byte array values
      *****bytearr[13]=13,oRetVal[13]=53
      getObject did not return the proper byte array values
      *****bytearr[14]=14,oRetVal[14]=48
      getObject did not return the proper byte array values
      *****bytearr[15]=15,oRetVal[15]=54
      getObject did not return the proper byte array values
      *****bytearr[16]=16,oRetVal[16]=48
      getObject did not return the proper byte array values
      *****bytearr[17]=17,oRetVal[17]=55
      getObject did not return the proper byte array values
      *****bytearr[18]=18,oRetVal[18]=48
      getObject did not return the proper byte array values
      *****bytearr[19]=19,oRetVal[19]=56
      getObject did not return the proper byte array values
      *****bytearr[20]=20,oRetVal[20]=48
      getObject did not return the proper byte array values
      *****bytearr[21]=21,oRetVal[21]=57
      getObject did not return the proper byte array values
      *****bytearr[22]=22,oRetVal[22]=48
      getObject did not return the proper byte array values
      *****bytearr[23]=23,oRetVal[23]=97

      *** Running testRegisterOutParameter52 ****
      getting the bytearray value
      get the CallableStatement object
      register the output parameters
      execute the procedure
      invoke getObject method
      bytearr len=50
      oRetVal len=103
      getObject did not return the proper byte array values
      *****bytearr[0]=0,oRetVal[0]=88
      getObject did not return the proper byte array values
      *****bytearr[1]=1,oRetVal[1]=39
      getObject did not return the proper byte array values
      *****bytearr[2]=2,oRetVal[2]=48
      getObject did not return the proper byte array values
      *****bytearr[3]=3,oRetVal[3]=48
      getObject did not return the proper byte array values
      *****bytearr[4]=4,oRetVal[4]=48
      getObject did not return the proper byte array values
      *****bytearr[5]=5,oRetVal[5]=49
      getObject did not return the proper byte array values
      *****bytearr[6]=6,oRetVal[6]=48
      getObject did not return the proper byte array values
      *****bytearr[7]=7,oRetVal[7]=50
      getObject did not return the proper byte array values
      *****bytearr[8]=8,oRetVal[8]=48
      getObject did not return the proper byte array values
      *****bytearr[9]=9,oRetVal[9]=51
      getObject did not return the proper byte array values
      *****bytearr[10]=10,oRetVal[10]=48
      getObject did not return the proper byte array values
      *****bytearr[11]=11,oRetVal[11]=52
      getObject did not return the proper byte array values
      *****bytearr[12]=12,oRetVal[12]=48
      getObject did not return the proper byte array values
      *****bytearr[13]=13,oRetVal[13]=53
      getObject did not return the proper byte array values
      *****bytearr[14]=14,oRetVal[14]=48
      getObject did not return the proper byte array values
      *****bytearr[15]=15,oRetVal[15]=54
      getObject did not return the proper byte array values
      *****bytearr[16]=16,oRetVal[16]=48
      getObject did not return the proper byte array values
      *****bytearr[17]=17,oRetVal[17]=55
      getObject did not return the proper byte array values
      *****bytearr[18]=18,oRetVal[18]=48
      getObject did not return the proper byte array values
      *****bytearr[19]=19,oRetVal[19]=56
      getObject did not return the proper byte array values
      *****bytearr[20]=20,oRetVal[20]=48
      getObject did not return the proper byte array values
      *****bytearr[21]=21,oRetVal[21]=57
      getObject did not return the proper byte array values
      *****bytearr[22]=22,oRetVal[22]=48
      getObject did not return the proper byte array values
      *****bytearr[23]=23,oRetVal[23]=97
      ace 147 =>


      output from the console:

      Server started, listening on port 9092, display level: 0 ...
      >The Length of byte[] in Binary_Proc: 24
      The Length of byte[] in Binary_Proc_Io: 103


      Thanks for your time.

      -lance

      ###@###.### 2003-05-21

            jbrucesunw Jonathan Bruce (Inactive)
            jbrucesunw Jonathan Bruce (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: