Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-4250

Bug In remote jdbc adapter

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Minor Minor
    • No Release
    • JBossAS-4.0.5.GA
    • None
    • None
    • Windows XP, Oracle 9i

    • Low
    • Workaround Exists
    • Hide

      InputStream inputStream = resultSet.getBinaryStream(column.name());
      if (inputStream != null)
      {
      ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
      byte[] buffer = new byte[1024];
      try
      {
      int len;
      while ((len = inputStream.read(buffer, 0, buffer.length)) > 0)

      { outputStream.write(buffer, 0, len); }

      outputStream.close();
      inputStream.close();
      bytes = outputStream.toByteArray();
      ....

      Show
      InputStream inputStream = resultSet.getBinaryStream(column.name()); if (inputStream != null) { ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); byte[] buffer = new byte [1024] ; try { int len; while ((len = inputStream.read(buffer, 0, buffer.length)) > 0) { outputStream.write(buffer, 0, len); } outputStream.close(); inputStream.close(); bytes = outputStream.toByteArray(); ....

      I have found some bugs inside jboss when I access datasource remotly.

      1. The code bellow throws NullPointerException when the blob field is empty. failed on org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService:553
      Code:

      Blob blob = resultSet.getBlob(column.name());
      bytes = blob.getBytes(1, (int)blob.length());

      2. The same code above does not return the contents of the blob when the blob is filled.

      3. There is a failue on org.jboss.resource.adapter.jdbc.remote.SerializableInputStream:266
      Correction should be Code:

      return read(b, 0, b.length);

              Unassigned Unassigned
              eblasf_jira Frédéric Blaser (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: