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

CachedRowSet throws NullPointerException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 5.0
    • 5.0
    • core-libs
    • rc
    • generic
    • solaris_8

      Bug received from ###@###.###

      --Boundary_(ID_cjTqyGT2pljOmUyrrihYIA)
      Content-type: text/plain; charset=us-ascii
      Content-transfer-encoding: 7BIT

      If the data row has columns that have null values, you get a
      NullPointerException. If I change the nulls to values, it works fine.
      Could you give an idea of the process to address this? How long, etc.
       
      Jim Falanga
       
      This code snippet:
       
            DaoRowSet data = dao.getTeamMember("admin3");
              System.out.println(Integer.toString(data.size())+" rows
      "+data.getTableName());
              data.first();
              data.updateString(data.findColumn("comment"),"test332");
              data.updateRow();
              data=dao.updateRowSet(data);
       
      Get this output:
       
      1 rows TeamMembers
      java.lang.NullPointerException
                  at
      com.sun.rowset.internal.CachedRowSetWriter.updateOriginalRow(CachedRowSe
      tWriter.java:519)
                  at
      com.sun.rowset.internal.CachedRowSetWriter.writeData(CachedRowSetWriter.
      java:335)
                  at
      com.sun.rowset.CachedRowSetImpl.acceptChanges(CachedRowSetImpl.java:810)
                  at
      pstor.dao.DaoController.updateRowSet(DaoController.java:15)
                  at pstor.dao.DaoController.main(DaoController.java:49)
      Exception in thread "main"

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: