[ 
http://issues.apache.org/jira/browse/DERBY-1610?page=comments#action_12440719 ] 
            
Tomohito Nakayama commented on DERBY-1610:
------------------------------------------

With the patch  DERBY-1610_7_regressionfix_2.patch , 
I executed derbyall and compatibility suite.

The result was that 
compatibility test was passed and 
jdbcapi/StmtCloseFunTest.java in DerbyNetClinet of derbyall was failed.

Next are exceptions found in StmtCloseFunTest.tmp :
Prepared Statement test begin
FAIL -- unexpected exception:java.lang.NullPointerException
java.lang.NullPointerException
        at 
org.apache.derby.client.am.PreparedStatement.setInt(PreparedStatement.java:562)
        at 
org.apache.derbyTesting.functionTests.tests.jdbcapi.StmtCloseFunTest.test2(StmtCloseFunTest.java:335)
        at 
org.apache.derbyTesting.functionTests.tests.jdbcapi.StmtCloseFunTest.main(StmtCloseFunTest.java:72)
Callable Statement test begin
The result is 3
FAIL -- unexpected exception:java.lang.NullPointerException
java.lang.NullPointerException
        at 
org.apache.derby.client.am.PreparedStatement.setString(PreparedStatement.java:925)
        at 
org.apache.derbyTesting.functionTests.tests.jdbcapi.StmtCloseFunTest.test3(StmtCloseFunTest.java:577)
        at 
org.apache.derbyTesting.functionTests.tests.jdbcapi.StmtCloseFunTest.main(StmtCloseFunTest.java:73)
Statement Close Fun Test finished

Where exception found was around next ....

org.apache.derbyTesting.functionTests.tests.jdbcapi.StmtCloseFunTest :
test2 method :
                        ps.setInt(1, 420);
                        ps.setFloat(2, (float)12.21);
                        ps.setDate(3, new Date(870505200000L));
                        ps.setString(4, "China");
                        ps.executeUpdate();
                        ps.close();
                                                
                        //now, we begin the test
                        try {
                                ps.setInt(1, 530);
                                System.out.println("Prepared Statement Test 
failed");
                        }
                        catch(SQLException e) { }

test3 method :
                                cs = conn.prepareCall("call takesString(?,?)");
                        
                                cs.registerOutParameter(1, Types.CHAR);
                                cs.setInt(2, Types.INTEGER);

                                cs.execute();
                                System.out.println("The result is " + 
cs.getString(1));

                                cs.close();

                                try {
                                        cs.setString(1, "ABC");
                                        System.out.println("Callable Statement 
Test failed");
                                }
                                catch(SQLException e) { }

It seems that program throw NullPointerExceptioon 
because method of instance variable ,parameterMetaData_ , was called 
after Statement was closed and substituted null for parameterMetaData_  .


> Resolve difference of type compatibility between Embedded and 
> NetworkServer/NetworkDriver
> -----------------------------------------------------------------------------------------
>
>                 Key: DERBY-1610
>                 URL: http://issues.apache.org/jira/browse/DERBY-1610
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server, Network Client
>            Reporter: Tomohito Nakayama
>         Assigned To: Tomohito Nakayama
>         Attachments: DERBY-1610.diff, DERBY-1610_2.diff, DERBY-1610_3.diff, 
> DERBY-1610_4.diff, DERBY-1610_5.diff, DERBY-1610_6.patch, DERBY-1610_7.patch, 
> DERBY-1610_7_regressionfix.patch, DERBY-1610_7_regressionfix_2.patch, 
> parameterMapping.diff, parameterMapping.diff, 
> parameterMapping.diff.betweenEmbedded_and_NetworkServerNetworkClient, 
> parameterMapping.out.7.diff, parameterMapping.out.diff, 
> parameterMapping_3.diff, TestNullChar.java, TestTypeCompatibility.java, 
> XCL12.diff
>
>
> There exists difference of type compatibility between  Embedded and 
> NetworkServer/NetworkClient.
> This issue tries to resolve it.

-- 
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

        

Reply via email to