You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Andreas Korneliussen (JIRA)" <de...@db.apache.org> on 2006/04/03 16:25:48 UTC

[jira] Created: (DERBY-1177) updateObject with null as argument causes network driver to fail with NullPointerException

updateObject with null as argument causes network driver to fail with NullPointerException
------------------------------------------------------------------------------------------

         Key: DERBY-1177
         URL: http://issues.apache.org/jira/browse/DERBY-1177
     Project: Derby
        Type: Bug

  Components: Network Client  
    Versions: 10.2.0.0    
    Reporter: Andreas Korneliussen
    Priority: Minor


Calling ResultSet.updateObject(column, object) causes the network driver to give NullPointerException if the object parameter is null.

Stack trace from test:

Test output:
........E.
Time: 7.597
There was 1 error:
1) testUpdateObjectWithNull(org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest)java.lang.NullPointerException
        at org.apache.derby.client.am.CrossConverters.setObject(CrossConverters.java:845)
        at org.apache.derby.client.am.ResultSet.updateObject(ResultSet.java:3073)
        at org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest.testUpdateObjectWithNull(UpdateXXXTest.java:215)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

Will attach the test.

To run:
java -Dframework=DerbyNetClient org.apache.derbyTesting.functionTests.harness.RunTest jdbcapi/UpdateXXXTest.junit

The test does not fail with the embedded framework.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Gjenåpnet: (DERBY-1177) updateObject with null as argument causes network driver to fail with NullPointerException

Posted by "Andreas Korneliussen (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1177?page=all ]
     
Andreas Korneliussen reopened DERBY-1177:
-----------------------------------------


> updateObject with null as argument causes network driver to fail with NullPointerException
> ------------------------------------------------------------------------------------------
>
>          Key: DERBY-1177
>          URL: http://issues.apache.org/jira/browse/DERBY-1177
>      Project: Derby
>         Type: Bug

>   Components: Network Client
>     Versions: 10.2.0.0
>     Reporter: Andreas Korneliussen
>     Assignee: Andreas Korneliussen
>     Priority: Minor
>      Fix For: 10.2.0.0
>  Attachments: DERBY-1177.diff, DERBY-1177.stat, DERBY-1177v2.diff, DERBY-1177v2.stat, DERBY-1177v3.diff, UpdateXXXTest.java, derbyall_report.txt, derbyall_report.txt
>
> Calling ResultSet.updateObject(column, object) causes the network driver to give NullPointerException if the object parameter is null.
> Stack trace from test:
> Test output:
> ........E.
> Time: 7.597
> There was 1 error:
> 1) testUpdateObjectWithNull(org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest)java.lang.NullPointerException
>         at org.apache.derby.client.am.CrossConverters.setObject(CrossConverters.java:845)
>         at org.apache.derby.client.am.ResultSet.updateObject(ResultSet.java:3073)
>         at org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest.testUpdateObjectWithNull(UpdateXXXTest.java:215)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> Will attach the test.
> To run:
> java -Dframework=DerbyNetClient org.apache.derbyTesting.functionTests.harness.RunTest jdbcapi/UpdateXXXTest.junit
> The test does not fail with the embedded framework.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-1177) updateObject with null as argument causes network driver to fail with NullPointerException

Posted by "Andreas Korneliussen (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1177?page=comments#action_12373080 ] 

Andreas Korneliussen commented on DERBY-1177:
---------------------------------------------

I intend to make a patch which fixes this issue. The patch will make the network and embedded driver behave identical when ResultSet.updateObject(..) is called with a null value: it will be handled as if updateNull(..) was called, and the updated value will be SQL null. This is also somewhat symmetrical to getObject(..) which returns null if the value in the database is SQL null. If the value cannot be set to null, i.e due to constraints, an error should be given in updateRow() 
(this is also the case in EmbedResultSet).


> updateObject with null as argument causes network driver to fail with NullPointerException
> ------------------------------------------------------------------------------------------
>
>          Key: DERBY-1177
>          URL: http://issues.apache.org/jira/browse/DERBY-1177
>      Project: Derby
>         Type: Bug

>   Components: Network Client
>     Versions: 10.2.0.0
>     Reporter: Andreas Korneliussen
>     Assignee: Andreas Korneliussen
>     Priority: Minor
>  Attachments: UpdateXXXTest.java
>
> Calling ResultSet.updateObject(column, object) causes the network driver to give NullPointerException if the object parameter is null.
> Stack trace from test:
> Test output:
> ........E.
> Time: 7.597
> There was 1 error:
> 1) testUpdateObjectWithNull(org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest)java.lang.NullPointerException
>         at org.apache.derby.client.am.CrossConverters.setObject(CrossConverters.java:845)
>         at org.apache.derby.client.am.ResultSet.updateObject(ResultSet.java:3073)
>         at org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest.testUpdateObjectWithNull(UpdateXXXTest.java:215)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> Will attach the test.
> To run:
> java -Dframework=DerbyNetClient org.apache.derbyTesting.functionTests.harness.RunTest jdbcapi/UpdateXXXTest.junit
> The test does not fail with the embedded framework.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (DERBY-1177) updateObject with null as argument causes network driver to fail with NullPointerException

Posted by "Bernt M. Johnsen (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1177?page=all ]
     
Bernt M. Johnsen resolved DERBY-1177:
-------------------------------------

    Resolution: Fixed
    Derby Info: [Patch Available, Regression]  (was: [Regression, Patch Available])

Committed revision 392236.


> updateObject with null as argument causes network driver to fail with NullPointerException
> ------------------------------------------------------------------------------------------
>
>          Key: DERBY-1177
>          URL: http://issues.apache.org/jira/browse/DERBY-1177
>      Project: Derby
>         Type: Bug

>   Components: Network Client
>     Versions: 10.2.0.0
>     Reporter: Andreas Korneliussen
>     Assignee: Andreas Korneliussen
>     Priority: Minor
>  Attachments: DERBY-1177.diff, DERBY-1177.stat, DERBY-1177v2.diff, DERBY-1177v2.stat, DERBY-1177v3.diff, UpdateXXXTest.java, derbyall_report.txt, derbyall_report.txt
>
> Calling ResultSet.updateObject(column, object) causes the network driver to give NullPointerException if the object parameter is null.
> Stack trace from test:
> Test output:
> ........E.
> Time: 7.597
> There was 1 error:
> 1) testUpdateObjectWithNull(org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest)java.lang.NullPointerException
>         at org.apache.derby.client.am.CrossConverters.setObject(CrossConverters.java:845)
>         at org.apache.derby.client.am.ResultSet.updateObject(ResultSet.java:3073)
>         at org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest.testUpdateObjectWithNull(UpdateXXXTest.java:215)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> Will attach the test.
> To run:
> java -Dframework=DerbyNetClient org.apache.derbyTesting.functionTests.harness.RunTest jdbcapi/UpdateXXXTest.junit
> The test does not fail with the embedded framework.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-1177) updateObject with null as argument causes network driver to fail with NullPointerException

Posted by "Andreas Korneliussen (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1177?page=all ]

Andreas Korneliussen updated DERBY-1177:
----------------------------------------

    Attachment: derbyall_report.txt

I have now run derbyall with the patch DERBY-1177v3.diff. It had no failures.

> updateObject with null as argument causes network driver to fail with NullPointerException
> ------------------------------------------------------------------------------------------
>
>          Key: DERBY-1177
>          URL: http://issues.apache.org/jira/browse/DERBY-1177
>      Project: Derby
>         Type: Bug

>   Components: Network Client
>     Versions: 10.2.0.0
>     Reporter: Andreas Korneliussen
>     Assignee: Andreas Korneliussen
>     Priority: Minor
>  Attachments: DERBY-1177.diff, DERBY-1177.stat, DERBY-1177v2.diff, DERBY-1177v2.stat, DERBY-1177v3.diff, UpdateXXXTest.java, derbyall_report.txt, derbyall_report.txt
>
> Calling ResultSet.updateObject(column, object) causes the network driver to give NullPointerException if the object parameter is null.
> Stack trace from test:
> Test output:
> ........E.
> Time: 7.597
> There was 1 error:
> 1) testUpdateObjectWithNull(org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest)java.lang.NullPointerException
>         at org.apache.derby.client.am.CrossConverters.setObject(CrossConverters.java:845)
>         at org.apache.derby.client.am.ResultSet.updateObject(ResultSet.java:3073)
>         at org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest.testUpdateObjectWithNull(UpdateXXXTest.java:215)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> Will attach the test.
> To run:
> java -Dframework=DerbyNetClient org.apache.derbyTesting.functionTests.harness.RunTest jdbcapi/UpdateXXXTest.junit
> The test does not fail with the embedded framework.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-1177) updateObject with null as argument causes network driver to fail with NullPointerException

Posted by "Andreas Korneliussen (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1177?page=all ]

Andreas Korneliussen updated DERBY-1177:
----------------------------------------

    Derby Info: [Patch Available, Regression]

> updateObject with null as argument causes network driver to fail with NullPointerException
> ------------------------------------------------------------------------------------------
>
>          Key: DERBY-1177
>          URL: http://issues.apache.org/jira/browse/DERBY-1177
>      Project: Derby
>         Type: Bug

>   Components: Network Client
>     Versions: 10.2.0.0
>     Reporter: Andreas Korneliussen
>     Assignee: Andreas Korneliussen
>     Priority: Minor
>  Attachments: DERBY-1177.diff, DERBY-1177.stat, DERBY-1177v2.diff, DERBY-1177v2.stat, DERBY-1177v3.diff, UpdateXXXTest.java, derbyall_report.txt
>
> Calling ResultSet.updateObject(column, object) causes the network driver to give NullPointerException if the object parameter is null.
> Stack trace from test:
> Test output:
> ........E.
> Time: 7.597
> There was 1 error:
> 1) testUpdateObjectWithNull(org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest)java.lang.NullPointerException
>         at org.apache.derby.client.am.CrossConverters.setObject(CrossConverters.java:845)
>         at org.apache.derby.client.am.ResultSet.updateObject(ResultSet.java:3073)
>         at org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest.testUpdateObjectWithNull(UpdateXXXTest.java:215)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> Will attach the test.
> To run:
> java -Dframework=DerbyNetClient org.apache.derbyTesting.functionTests.harness.RunTest jdbcapi/UpdateXXXTest.junit
> The test does not fail with the embedded framework.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Løst: (DERBY-1177) updateObject with null as argument causes network driver to fail with NullPointerException

Posted by "Andreas Korneliussen (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1177?page=all ]
     
Andreas Korneliussen resolved DERBY-1177:
-----------------------------------------

    Fix Version: 10.2.0.0
     Resolution: Fixed

> updateObject with null as argument causes network driver to fail with NullPointerException
> ------------------------------------------------------------------------------------------
>
>          Key: DERBY-1177
>          URL: http://issues.apache.org/jira/browse/DERBY-1177
>      Project: Derby
>         Type: Bug

>   Components: Network Client
>     Versions: 10.2.0.0
>     Reporter: Andreas Korneliussen
>     Assignee: Andreas Korneliussen
>     Priority: Minor
>      Fix For: 10.2.0.0
>  Attachments: DERBY-1177.diff, DERBY-1177.stat, DERBY-1177v2.diff, DERBY-1177v2.stat, DERBY-1177v3.diff, UpdateXXXTest.java, derbyall_report.txt, derbyall_report.txt
>
> Calling ResultSet.updateObject(column, object) causes the network driver to give NullPointerException if the object parameter is null.
> Stack trace from test:
> Test output:
> ........E.
> Time: 7.597
> There was 1 error:
> 1) testUpdateObjectWithNull(org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest)java.lang.NullPointerException
>         at org.apache.derby.client.am.CrossConverters.setObject(CrossConverters.java:845)
>         at org.apache.derby.client.am.ResultSet.updateObject(ResultSet.java:3073)
>         at org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest.testUpdateObjectWithNull(UpdateXXXTest.java:215)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> Will attach the test.
> To run:
> java -Dframework=DerbyNetClient org.apache.derbyTesting.functionTests.harness.RunTest jdbcapi/UpdateXXXTest.junit
> The test does not fail with the embedded framework.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (DERBY-1177) updateObject with null as argument causes network driver to fail with NullPointerException

Posted by "Andreas Korneliussen (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1177?page=all ]

Andreas Korneliussen reassigned DERBY-1177:
-------------------------------------------

    Assign To: Andreas Korneliussen

> updateObject with null as argument causes network driver to fail with NullPointerException
> ------------------------------------------------------------------------------------------
>
>          Key: DERBY-1177
>          URL: http://issues.apache.org/jira/browse/DERBY-1177
>      Project: Derby
>         Type: Bug

>   Components: Network Client
>     Versions: 10.2.0.0
>     Reporter: Andreas Korneliussen
>     Assignee: Andreas Korneliussen
>     Priority: Minor
>  Attachments: UpdateXXXTest.java
>
> Calling ResultSet.updateObject(column, object) causes the network driver to give NullPointerException if the object parameter is null.
> Stack trace from test:
> Test output:
> ........E.
> Time: 7.597
> There was 1 error:
> 1) testUpdateObjectWithNull(org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest)java.lang.NullPointerException
>         at org.apache.derby.client.am.CrossConverters.setObject(CrossConverters.java:845)
>         at org.apache.derby.client.am.ResultSet.updateObject(ResultSet.java:3073)
>         at org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest.testUpdateObjectWithNull(UpdateXXXTest.java:215)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> Will attach the test.
> To run:
> java -Dframework=DerbyNetClient org.apache.derbyTesting.functionTests.harness.RunTest jdbcapi/UpdateXXXTest.junit
> The test does not fail with the embedded framework.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-1177) updateObject with null as argument causes network driver to fail with NullPointerException

Posted by "Andreas Korneliussen (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1177?page=all ]

Andreas Korneliussen updated DERBY-1177:
----------------------------------------

    Attachment: DERBY-1177v3.diff

One of the testcases in the previous diff contained some dead code which has been removed in this patch. The stat is the same.

> updateObject with null as argument causes network driver to fail with NullPointerException
> ------------------------------------------------------------------------------------------
>
>          Key: DERBY-1177
>          URL: http://issues.apache.org/jira/browse/DERBY-1177
>      Project: Derby
>         Type: Bug

>   Components: Network Client
>     Versions: 10.2.0.0
>     Reporter: Andreas Korneliussen
>     Assignee: Andreas Korneliussen
>     Priority: Minor
>  Attachments: DERBY-1177.diff, DERBY-1177.stat, DERBY-1177v2.diff, DERBY-1177v2.stat, DERBY-1177v3.diff, UpdateXXXTest.java, derbyall_report.txt
>
> Calling ResultSet.updateObject(column, object) causes the network driver to give NullPointerException if the object parameter is null.
> Stack trace from test:
> Test output:
> ........E.
> Time: 7.597
> There was 1 error:
> 1) testUpdateObjectWithNull(org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest)java.lang.NullPointerException
>         at org.apache.derby.client.am.CrossConverters.setObject(CrossConverters.java:845)
>         at org.apache.derby.client.am.ResultSet.updateObject(ResultSet.java:3073)
>         at org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest.testUpdateObjectWithNull(UpdateXXXTest.java:215)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> Will attach the test.
> To run:
> java -Dframework=DerbyNetClient org.apache.derbyTesting.functionTests.harness.RunTest jdbcapi/UpdateXXXTest.junit
> The test does not fail with the embedded framework.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-1177) updateObject with null as argument causes network driver to fail with NullPointerException

Posted by "Fernanda Pizzorno (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1177?page=comments#action_12373270 ] 

Fernanda Pizzorno commented on DERBY-1177:
------------------------------------------

I have reviewed the patch and I have some comments:

1. lang/updatableResultSet.java

The behaviour of the method updateObject(columnIndex/Name, x) has been changed in the client driver so that it will no longer throw and exception when it is used with x = null. The cannons have been updated, but the test has not been updated, so it still gives the impresion that an exception is expected for DerbyNetClient:

try {
if (indexOrName == 1) //test by passing column position
	rs.updateObject(sqlType, null);
else //test by passing column name
	rs.updateObject(ColumnNames[sqlType-1], null);
} catch (Throwable e) {
if (TestUtil.isNetFramework()) {
	System.out.println("   Got expected exception:" + e.getMessage());
	continue;
} else {
	System.out.println("   Got UNexpected exception:" + e.getMessage());
	return;
}
}

I think it would be better if "Got UNexpected exception: ..." was being printed out when the framework is DerbyNetClient.

2. I run the following test:

rs = updatableStatement.executeQuery("select * from tmpResultSet where id < 100");
rs.next()
rs.updateObject(1, null);
System.out.println("Value of column 1 after updateObject(1, null): " + rs.getInt(1));
System.out.println("Was null: " + rs.wasNull());
rs.updateNull(1);
System.out.println("Value of column 1 after updateNull(1): " + rs.getInt(1));
System.out.println("Was null: " + rs.wasNull());
rs.updateInt(1, rs.getInt(1) + 100);
System.out.println("Value of column 1 after updateInt(1): " + rs.getInt(1));
System.out.println("Was null: " + rs.wasNull());

and I got the following result:

Value of column 1 after updateObject(1, null): 1
Was null: false
Value of column 1 after updateNull(1): 1
Was null: false
Value of column 1 after updateInt(1): 101
Was null: false

when I expected to get:

Value of column 1 after updateObject(1, null): 0
Was null: true
Value of column 1 after updateNull(1): 0
Was null: true
Value of column 1 after updateInt(1): 100
Was null: false

I can see that updateNull also has an incorrect behaviour, but I think that if you are going to change the behaviour of updateObject so that it will allow to update the column to null, you should make make sure that subsequent calls to getter and wasNull method will return the correct values.

If you can fix the behaviour of updateNull at the same time, it would be nice :). One less difference in behaviour between Embedded and Client drivers.


> updateObject with null as argument causes network driver to fail with NullPointerException
> ------------------------------------------------------------------------------------------
>
>          Key: DERBY-1177
>          URL: http://issues.apache.org/jira/browse/DERBY-1177
>      Project: Derby
>         Type: Bug

>   Components: Network Client
>     Versions: 10.2.0.0
>     Reporter: Andreas Korneliussen
>     Assignee: Andreas Korneliussen
>     Priority: Minor
>  Attachments: DERBY-1177.diff, DERBY-1177.stat, UpdateXXXTest.java, derbyall_report.txt
>
> Calling ResultSet.updateObject(column, object) causes the network driver to give NullPointerException if the object parameter is null.
> Stack trace from test:
> Test output:
> ........E.
> Time: 7.597
> There was 1 error:
> 1) testUpdateObjectWithNull(org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest)java.lang.NullPointerException
>         at org.apache.derby.client.am.CrossConverters.setObject(CrossConverters.java:845)
>         at org.apache.derby.client.am.ResultSet.updateObject(ResultSet.java:3073)
>         at org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest.testUpdateObjectWithNull(UpdateXXXTest.java:215)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> Will attach the test.
> To run:
> java -Dframework=DerbyNetClient org.apache.derbyTesting.functionTests.harness.RunTest jdbcapi/UpdateXXXTest.junit
> The test does not fail with the embedded framework.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Oppdatert: (DERBY-1177) updateObject with null as argument causes network driver to fail with NullPointerException

Posted by "Andreas Korneliussen (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1177?page=all ]

Andreas Korneliussen updated DERBY-1177:
----------------------------------------

    Derby Info: [Patch Available, Regression, Release Note Needed]  (was: [Patch Available, Regression])

Release Note:

The following changes have been made to the Derby client driver:
Derby no longer throws an exception if ResultSet.updateObject(..) is called with a null as parameter. Instead it will update the column with a SQL NULL value.

After calling ResultSet.updateObject(..) with null as parameter, or after calling ResultSet.updateNull(..), ResultSet.wasNull() will return true, and ResultSet.getObject() will return null. Previously Derby would incorrectly return the old value for the column.

The Derby embedded jdbc driver behaves the same way w.r.t this behavior.

> updateObject with null as argument causes network driver to fail with NullPointerException
> ------------------------------------------------------------------------------------------
>
>          Key: DERBY-1177
>          URL: http://issues.apache.org/jira/browse/DERBY-1177
>      Project: Derby
>         Type: Bug

>   Components: Network Client
>     Versions: 10.2.0.0
>     Reporter: Andreas Korneliussen
>     Assignee: Andreas Korneliussen
>     Priority: Minor
>      Fix For: 10.2.0.0
>  Attachments: DERBY-1177.diff, DERBY-1177.stat, DERBY-1177v2.diff, DERBY-1177v2.stat, DERBY-1177v3.diff, UpdateXXXTest.java, derbyall_report.txt, derbyall_report.txt
>
> Calling ResultSet.updateObject(column, object) causes the network driver to give NullPointerException if the object parameter is null.
> Stack trace from test:
> Test output:
> ........E.
> Time: 7.597
> There was 1 error:
> 1) testUpdateObjectWithNull(org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest)java.lang.NullPointerException
>         at org.apache.derby.client.am.CrossConverters.setObject(CrossConverters.java:845)
>         at org.apache.derby.client.am.ResultSet.updateObject(ResultSet.java:3073)
>         at org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest.testUpdateObjectWithNull(UpdateXXXTest.java:215)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> Will attach the test.
> To run:
> java -Dframework=DerbyNetClient org.apache.derbyTesting.functionTests.harness.RunTest jdbcapi/UpdateXXXTest.junit
> The test does not fail with the embedded framework.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-1177) updateObject with null as argument causes network driver to fail with NullPointerException

Posted by "Andreas Korneliussen (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1177?page=all ]

Andreas Korneliussen updated DERBY-1177:
----------------------------------------

    Attachment: DERBY-1177v2.diff
                DERBY-1177v2.stat

Updated the patch to address the comments.

1: Fixed updatableResultSet.java. It will now always print Got UNexpected exception if the bug reappears.
2: This bug is caused by the same logic: if the ResultSet is not of type TYPE_SCROLL_SENSITIVE, rs.getObject(..) and rs.wasNull(..) behaves
incorrect after updateNull() and updateObject(.., null). Fixed the bug, and updated the UpdateXXXTest to detect it.

I have run lang/updatableResultSet.java and jdbcapi/UpdateXXXTest.junit in both embedded and DerbyNetClient to confirm the fix, and I am now running derbyall.

> updateObject with null as argument causes network driver to fail with NullPointerException
> ------------------------------------------------------------------------------------------
>
>          Key: DERBY-1177
>          URL: http://issues.apache.org/jira/browse/DERBY-1177
>      Project: Derby
>         Type: Bug

>   Components: Network Client
>     Versions: 10.2.0.0
>     Reporter: Andreas Korneliussen
>     Assignee: Andreas Korneliussen
>     Priority: Minor
>  Attachments: DERBY-1177.diff, DERBY-1177.stat, DERBY-1177v2.diff, DERBY-1177v2.stat, UpdateXXXTest.java, derbyall_report.txt
>
> Calling ResultSet.updateObject(column, object) causes the network driver to give NullPointerException if the object parameter is null.
> Stack trace from test:
> Test output:
> ........E.
> Time: 7.597
> There was 1 error:
> 1) testUpdateObjectWithNull(org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest)java.lang.NullPointerException
>         at org.apache.derby.client.am.CrossConverters.setObject(CrossConverters.java:845)
>         at org.apache.derby.client.am.ResultSet.updateObject(ResultSet.java:3073)
>         at org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest.testUpdateObjectWithNull(UpdateXXXTest.java:215)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> Will attach the test.
> To run:
> java -Dframework=DerbyNetClient org.apache.derbyTesting.functionTests.harness.RunTest jdbcapi/UpdateXXXTest.junit
> The test does not fail with the embedded framework.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Lukket: (DERBY-1177) updateObject with null as argument causes network driver to fail with NullPointerException

Posted by "Andreas Korneliussen (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1177?page=all ]
     
Andreas Korneliussen closed DERBY-1177:
---------------------------------------


> updateObject with null as argument causes network driver to fail with NullPointerException
> ------------------------------------------------------------------------------------------
>
>          Key: DERBY-1177
>          URL: http://issues.apache.org/jira/browse/DERBY-1177
>      Project: Derby
>         Type: Bug

>   Components: Network Client
>     Versions: 10.2.0.0
>     Reporter: Andreas Korneliussen
>     Assignee: Andreas Korneliussen
>     Priority: Minor
>      Fix For: 10.2.0.0
>  Attachments: DERBY-1177.diff, DERBY-1177.stat, DERBY-1177v2.diff, DERBY-1177v2.stat, DERBY-1177v3.diff, UpdateXXXTest.java, derbyall_report.txt, derbyall_report.txt
>
> Calling ResultSet.updateObject(column, object) causes the network driver to give NullPointerException if the object parameter is null.
> Stack trace from test:
> Test output:
> ........E.
> Time: 7.597
> There was 1 error:
> 1) testUpdateObjectWithNull(org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest)java.lang.NullPointerException
>         at org.apache.derby.client.am.CrossConverters.setObject(CrossConverters.java:845)
>         at org.apache.derby.client.am.ResultSet.updateObject(ResultSet.java:3073)
>         at org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest.testUpdateObjectWithNull(UpdateXXXTest.java:215)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> Will attach the test.
> To run:
> java -Dframework=DerbyNetClient org.apache.derbyTesting.functionTests.harness.RunTest jdbcapi/UpdateXXXTest.junit
> The test does not fail with the embedded framework.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-1177) updateObject with null as argument causes network driver to fail with NullPointerException

Posted by "Andreas Korneliussen (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1177?page=all ]

Andreas Korneliussen updated DERBY-1177:
----------------------------------------

    Attachment: DERBY-1177.diff
                DERBY-1177.stat

Attaching the fix.

In addition, a new junit test is added which tests the semantics of updateXXX + updateRow on different SQL columns, and the master files are updated for updatableResultSet test.

I have run derbyall with the fix (without master file change), and it only failed in updatableResultSet. After fixing the master file, I have successfully run that test with embedded and DerbyNetClient framework. Starting derbyall again now, and will attach the report once completed tomorrow.

Note:updatableResultSet test fails with JDK 1.3 and JDK 1.6, with and without this patch, probably due to outdated master files.

> updateObject with null as argument causes network driver to fail with NullPointerException
> ------------------------------------------------------------------------------------------
>
>          Key: DERBY-1177
>          URL: http://issues.apache.org/jira/browse/DERBY-1177
>      Project: Derby
>         Type: Bug

>   Components: Network Client
>     Versions: 10.2.0.0
>     Reporter: Andreas Korneliussen
>     Assignee: Andreas Korneliussen
>     Priority: Minor
>  Attachments: DERBY-1177.diff, DERBY-1177.stat, UpdateXXXTest.java
>
> Calling ResultSet.updateObject(column, object) causes the network driver to give NullPointerException if the object parameter is null.
> Stack trace from test:
> Test output:
> ........E.
> Time: 7.597
> There was 1 error:
> 1) testUpdateObjectWithNull(org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest)java.lang.NullPointerException
>         at org.apache.derby.client.am.CrossConverters.setObject(CrossConverters.java:845)
>         at org.apache.derby.client.am.ResultSet.updateObject(ResultSet.java:3073)
>         at org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest.testUpdateObjectWithNull(UpdateXXXTest.java:215)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> Will attach the test.
> To run:
> java -Dframework=DerbyNetClient org.apache.derbyTesting.functionTests.harness.RunTest jdbcapi/UpdateXXXTest.junit
> The test does not fail with the embedded framework.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-1177) updateObject with null as argument causes network driver to fail with NullPointerException

Posted by "Fernanda Pizzorno (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1177?page=comments#action_12373601 ] 

Fernanda Pizzorno commented on DERBY-1177:
------------------------------------------

All of my comments have been addressed. The patch DERBY-1177v3.diff looks ok.

> updateObject with null as argument causes network driver to fail with NullPointerException
> ------------------------------------------------------------------------------------------
>
>          Key: DERBY-1177
>          URL: http://issues.apache.org/jira/browse/DERBY-1177
>      Project: Derby
>         Type: Bug

>   Components: Network Client
>     Versions: 10.2.0.0
>     Reporter: Andreas Korneliussen
>     Assignee: Andreas Korneliussen
>     Priority: Minor
>  Attachments: DERBY-1177.diff, DERBY-1177.stat, DERBY-1177v2.diff, DERBY-1177v2.stat, DERBY-1177v3.diff, UpdateXXXTest.java, derbyall_report.txt, derbyall_report.txt
>
> Calling ResultSet.updateObject(column, object) causes the network driver to give NullPointerException if the object parameter is null.
> Stack trace from test:
> Test output:
> ........E.
> Time: 7.597
> There was 1 error:
> 1) testUpdateObjectWithNull(org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest)java.lang.NullPointerException
>         at org.apache.derby.client.am.CrossConverters.setObject(CrossConverters.java:845)
>         at org.apache.derby.client.am.ResultSet.updateObject(ResultSet.java:3073)
>         at org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest.testUpdateObjectWithNull(UpdateXXXTest.java:215)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> Will attach the test.
> To run:
> java -Dframework=DerbyNetClient org.apache.derbyTesting.functionTests.harness.RunTest jdbcapi/UpdateXXXTest.junit
> The test does not fail with the embedded framework.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-1177) updateObject with null as argument causes network driver to fail with NullPointerException

Posted by "Andreas Korneliussen (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1177?page=comments#action_12435486 ] 
            
Andreas Korneliussen commented on DERBY-1177:
---------------------------------------------

REL NOTE:

Problem 1:
The derby client driver throws an exception when calling ResultSet.updateObject() with a null parameter. This is different from the embedded driver, which would update the column with a SQL NULL value.

Symptoms:
Applications which use ResultSet.updateObject(..) with null values, will get a SQLException from the client driver, however if using the embedded driver, the call will update the column to SQL NULL.

Cause:
Incorrect behaviour in client driver.

Solution:
Fixed client driver to behave as embedded driver. ResultSet.updateObject(..) with a null parameter, will set the column value to SQL NULL.

Workaround:
Instead of using ResultSet.updateObject(..) with null parameter, the client application can use ResultSet.updateNull(..).


Problem 2:
In the client jdbc driver: 
After calling ResultSet.updateNull(..), the method ResultSet.wasNull() and ResultSet.getXXX(..) returns the same values as before updateNull(..) was called. 

Symptoms:
In the client jdbc driver: 
After calling ResultSet.updateNull(..), the method ResultSet.wasNull() and ResultSet.getXXX(..) returns the same values as before updateNull(..) was called. 

Cause:
Incorrect behaviour in client driver.

Solution:
Fixed client driver to behave as embedded driver. After calling  ResultSet.updateNull(..), ResultSet.wasNull() will return true, and ResultSet.getXXX(..) will return values corresponding to what is expected when the column is SQL NULL. 

Workaround:
NA


> updateObject with null as argument causes network driver to fail with NullPointerException
> ------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1177
>                 URL: http://issues.apache.org/jira/browse/DERBY-1177
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.2.1.0
>            Reporter: Andreas Korneliussen
>         Assigned To: Andreas Korneliussen
>            Priority: Minor
>             Fix For: 10.2.1.0
>
>         Attachments: DERBY-1177.diff, DERBY-1177.stat, DERBY-1177v2.diff, DERBY-1177v2.stat, DERBY-1177v3.diff, derbyall_report.txt, derbyall_report.txt, UpdateXXXTest.java
>
>
> Calling ResultSet.updateObject(column, object) causes the network driver to give NullPointerException if the object parameter is null.
> Stack trace from test:
> Test output:
> ........E.
> Time: 7.597
> There was 1 error:
> 1) testUpdateObjectWithNull(org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest)java.lang.NullPointerException
>         at org.apache.derby.client.am.CrossConverters.setObject(CrossConverters.java:845)
>         at org.apache.derby.client.am.ResultSet.updateObject(ResultSet.java:3073)
>         at org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest.testUpdateObjectWithNull(UpdateXXXTest.java:215)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> Will attach the test.
> To run:
> java -Dframework=DerbyNetClient org.apache.derbyTesting.functionTests.harness.RunTest jdbcapi/UpdateXXXTest.junit
> The test does not fail with the embedded framework.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-1177) updateObject with null as argument causes network driver to fail with NullPointerException

Posted by "Andreas Korneliussen (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1177?page=comments#action_12373062 ] 

Andreas Korneliussen commented on DERBY-1177:
---------------------------------------------

This bug has recently been introduced as part of DERBY-842.
In CrossConverters.java
Index: java/client/org/apache/derby/client/am/CrossConverters.java
>
@@ -802,9 +842,9 @@
         } else if (source instanceof Byte) {
             return setObject(targetType, ((Byte) source).byteValue());
         } else {
-            throw new SqlException(agent_.logWriter_, "Invalid data conversion:" +
-                    " Parameter instance " + source +
-                    " is invalid for requested conversion.");
+            throw new SqlException(agent_.logWriter_,
+                new MessageId (SQLState.LANG_DATA_TYPE_SET_MISMATCH),
+                source.getClass().getName(), Types.getTypeString(targetType));

The new code here causes nullpointerexception when source is NULL.

In addition, when committing the patch for DERBY-842, the output file for updatableResultSet.out was changed to contain:
-   Got expected exception:Invalid data conversion: Parameter instance null is invalid for requested conversion.
+   Got expected exception:null

Which obvisously is wrong.

The bug was committed as rev. 390536.


> updateObject with null as argument causes network driver to fail with NullPointerException
> ------------------------------------------------------------------------------------------
>
>          Key: DERBY-1177
>          URL: http://issues.apache.org/jira/browse/DERBY-1177
>      Project: Derby
>         Type: Bug

>   Components: Network Client
>     Versions: 10.2.0.0
>     Reporter: Andreas Korneliussen
>     Priority: Minor
>  Attachments: UpdateXXXTest.java
>
> Calling ResultSet.updateObject(column, object) causes the network driver to give NullPointerException if the object parameter is null.
> Stack trace from test:
> Test output:
> ........E.
> Time: 7.597
> There was 1 error:
> 1) testUpdateObjectWithNull(org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest)java.lang.NullPointerException
>         at org.apache.derby.client.am.CrossConverters.setObject(CrossConverters.java:845)
>         at org.apache.derby.client.am.ResultSet.updateObject(ResultSet.java:3073)
>         at org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest.testUpdateObjectWithNull(UpdateXXXTest.java:215)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> Will attach the test.
> To run:
> java -Dframework=DerbyNetClient org.apache.derbyTesting.functionTests.harness.RunTest jdbcapi/UpdateXXXTest.junit
> The test does not fail with the embedded framework.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-1177) updateObject with null as argument causes network driver to fail with NullPointerException

Posted by "Andreas Korneliussen (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1177?page=all ]

Andreas Korneliussen updated DERBY-1177:
----------------------------------------

    Attachment: derbyall_report.txt

Test Run Started: 2006-04-04 17:02:29.0
Test Run Duration: 04:31:46

645 Tests Run
100% Pass (645 tests passed)
 0% Fail (0 tests failed)
2 Suites skipped

> updateObject with null as argument causes network driver to fail with NullPointerException
> ------------------------------------------------------------------------------------------
>
>          Key: DERBY-1177
>          URL: http://issues.apache.org/jira/browse/DERBY-1177
>      Project: Derby
>         Type: Bug

>   Components: Network Client
>     Versions: 10.2.0.0
>     Reporter: Andreas Korneliussen
>     Assignee: Andreas Korneliussen
>     Priority: Minor
>  Attachments: DERBY-1177.diff, DERBY-1177.stat, UpdateXXXTest.java, derbyall_report.txt
>
> Calling ResultSet.updateObject(column, object) causes the network driver to give NullPointerException if the object parameter is null.
> Stack trace from test:
> Test output:
> ........E.
> Time: 7.597
> There was 1 error:
> 1) testUpdateObjectWithNull(org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest)java.lang.NullPointerException
>         at org.apache.derby.client.am.CrossConverters.setObject(CrossConverters.java:845)
>         at org.apache.derby.client.am.ResultSet.updateObject(ResultSet.java:3073)
>         at org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest.testUpdateObjectWithNull(UpdateXXXTest.java:215)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> Will attach the test.
> To run:
> java -Dframework=DerbyNetClient org.apache.derbyTesting.functionTests.harness.RunTest jdbcapi/UpdateXXXTest.junit
> The test does not fail with the embedded framework.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (DERBY-1177) updateObject with null as argument causes network driver to fail with NullPointerException

Posted by "Andreas Korneliussen (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1177?page=all ]
     
Andreas Korneliussen closed DERBY-1177:
---------------------------------------


> updateObject with null as argument causes network driver to fail with NullPointerException
> ------------------------------------------------------------------------------------------
>
>          Key: DERBY-1177
>          URL: http://issues.apache.org/jira/browse/DERBY-1177
>      Project: Derby
>         Type: Bug

>   Components: Network Client
>     Versions: 10.2.0.0
>     Reporter: Andreas Korneliussen
>     Assignee: Andreas Korneliussen
>     Priority: Minor
>  Attachments: DERBY-1177.diff, DERBY-1177.stat, DERBY-1177v2.diff, DERBY-1177v2.stat, DERBY-1177v3.diff, UpdateXXXTest.java, derbyall_report.txt, derbyall_report.txt
>
> Calling ResultSet.updateObject(column, object) causes the network driver to give NullPointerException if the object parameter is null.
> Stack trace from test:
> Test output:
> ........E.
> Time: 7.597
> There was 1 error:
> 1) testUpdateObjectWithNull(org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest)java.lang.NullPointerException
>         at org.apache.derby.client.am.CrossConverters.setObject(CrossConverters.java:845)
>         at org.apache.derby.client.am.ResultSet.updateObject(ResultSet.java:3073)
>         at org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest.testUpdateObjectWithNull(UpdateXXXTest.java:215)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> Will attach the test.
> To run:
> java -Dframework=DerbyNetClient org.apache.derbyTesting.functionTests.harness.RunTest jdbcapi/UpdateXXXTest.junit
> The test does not fail with the embedded framework.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-1177) updateObject with null as argument causes network driver to fail with NullPointerException

Posted by "Andreas Korneliussen (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1177?page=all ]

Andreas Korneliussen updated DERBY-1177:
----------------------------------------

    Attachment: UpdateXXXTest.java

> updateObject with null as argument causes network driver to fail with NullPointerException
> ------------------------------------------------------------------------------------------
>
>          Key: DERBY-1177
>          URL: http://issues.apache.org/jira/browse/DERBY-1177
>      Project: Derby
>         Type: Bug

>   Components: Network Client
>     Versions: 10.2.0.0
>     Reporter: Andreas Korneliussen
>     Priority: Minor
>  Attachments: UpdateXXXTest.java
>
> Calling ResultSet.updateObject(column, object) causes the network driver to give NullPointerException if the object parameter is null.
> Stack trace from test:
> Test output:
> ........E.
> Time: 7.597
> There was 1 error:
> 1) testUpdateObjectWithNull(org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest)java.lang.NullPointerException
>         at org.apache.derby.client.am.CrossConverters.setObject(CrossConverters.java:845)
>         at org.apache.derby.client.am.ResultSet.updateObject(ResultSet.java:3073)
>         at org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest.testUpdateObjectWithNull(UpdateXXXTest.java:215)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> Will attach the test.
> To run:
> java -Dframework=DerbyNetClient org.apache.derbyTesting.functionTests.harness.RunTest jdbcapi/UpdateXXXTest.junit
> The test does not fail with the embedded framework.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira