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

Default JdbcRowSetImpl().execute() throws Invalid value 'null' passed as parameter 'map'

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 6
    • Fix Version/s: 6u1
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b01
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Backports

        Description

        When using default implementation of JdbcRowSetImpl(), calling execute() throws "Invalid value 'null' passed as parameter 'map' to method 'java.sql.Connection.setTypeMap'" error message, that cannot be caught. This is because it is being throws in JdbcRowSetImpl.java line 659. This either needs to be thrown as an exception or handled appropriately.

        File : com/sun/rowset/JdbcRowSetImpl.java

        Error: JdbcRowSet (setTypeMap): Invalid value 'null' passed as parameter 'map' to method 'java.sql.Connection.setTypeMap'

        Location:

            652 protected PreparedStatement prepare() throws SQLException {
            653 // get a connection
            654 conn = connect();
            655
            656 try {
            657 conn.setTypeMap(getTypeMap());
            658 } catch (Throwable ex) {
            659 System.err.println("JdbcRowSet (setTypeMap): " + <---
            660 ex.getMessage()); <---
            661 }

        Reproducable Code Snippet:
        --------------------------

                try {
                    Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
                    conn = DriverManager.getConnection(dbURL);
                    jrs = new JdbcRowSetImpl(conn);
                    jrs.setCommand("create table restaurants (id integer not null," +
                                 "name varchar(25), city varchar(25))");
                    jrs.setConcurrency(ResultSet.CONCUR_UPDATABLE);
                    jrs.execute();
                } catch (Exception except) {
                    except.printStackTrace();
                }

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  lancea Lance Andersen
                  Reporter:
                  skonchad Sandeep Konchady
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: