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 "Prasenjit Sarkar (JIRA)" <de...@db.apache.org> on 2006/08/29 16:49:25 UTC

[jira] Created: (DERBY-1777) Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1

Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1
-----------------------------------------------------------------------------------

                 Key: DERBY-1777
                 URL: http://issues.apache.org/jira/browse/DERBY-1777
             Project: Derby
          Issue Type: Bug
         Environment: WinXP SP2 dualcore 2.8 GHz 2 GBmemory
            Reporter: Prasenjit Sarkar


However, here's a query that works in 10.1.2.1 but not in 10.2.1.1  -- database can be assumed to be the same in Derby - 1205

SELECT DISTINCT 
ZONE.ZONE_ID ZONE_ID, 
PORT.PORT_ID PORT_ID, 
ENTITY_TO_PORT.TYPE, 
ENTITY_TO_PORT.PREFIX_ID, 
ENTITY_TO_PORT.ENTITY_ID, 
ENTITY_TO_PORT.DISPLAY_NAME, 
ENTITY_TO_PORT.PORT_DISPLAY_NAME, 
PORT2ZONE.MEMBER_NAME, 
PORT2ZONE.ZONE_MEMBER_ID, 
PORT.PORT_NUMBER 
FROM 
T_RES_ZONE ZONE left outer join T_VIEW_PORT2ZONE PORT2ZONE on 
ZONE.ZONE_ID = PORT2ZONE.ZONE_ID left outer join T_RES_PORT PORT on 
PORT2ZONE.PORT_ID = PORT.PORT_ID left outer join T_VIEW_ENTITY_TO_PORT ENTITY_TO_PORT on 
PORT2ZONE.PORT_ID = ENTITY_TO_PORT.PORT_ID and 
PORT2ZONE.ZONE_ID = ENTITY_TO_PORT.ZONE_ID, T_RES_FABRIC FABRIC 
WHERE PORT2ZONE.ZONE_ID = ZONE.ZONE_ID and 
ZONE.FABRIC_WWN = FABRIC.FABRIC_WWN and 
FABRIC.FABRIC_ID = 1 

Same db as before. 

In 10.2.1.1 it gives the following error (should this be a new issue?) 


java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source) 
at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source) 
at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source) 
at org.eclipse.aperi.server.guireq.topology.views.ViewerSanL1.init(ViewerSanL1.java:1828) 
at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.init(ViewerInit.java:41) 
at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.main(ViewerInit.java:69) 
Caused by: org.apache.derby.client.am.SqlException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source) 
at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source) 
at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source) 
at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source) 
at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source) 
at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source) 
at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source) 
at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source) 
at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source) 
at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source) 
at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source) 
... 4 more 


-- 
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-1777) Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-1777?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden updated DERBY-1777:
----------------------------------

    Component/s: SQL

> Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1
> -----------------------------------------------------------------------------------
>
>                 Key: DERBY-1777
>                 URL: https://issues.apache.org/jira/browse/DERBY-1777
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>         Environment: WinXP SP2 dualcore 2.8 GHz 2 GBmemory
>            Reporter: Prasenjit Sarkar
>            Assignee: A B
>             Fix For: 10.1.3.2, 10.2.1.6, 10.3.1.4
>
>         Attachments: Aperi.zip, d1777_v1.patch, d1777_v2.patch, Derby1777.zip
>
>
> However, here's a query that works in 10.1.2.1 but not in 10.2.1.1  -- database can be assumed to be the same in Derby - 1205
> SELECT DISTINCT 
> ZONE.ZONE_ID ZONE_ID, 
> PORT.PORT_ID PORT_ID, 
> ENTITY_TO_PORT.TYPE, 
> ENTITY_TO_PORT.PREFIX_ID, 
> ENTITY_TO_PORT.ENTITY_ID, 
> ENTITY_TO_PORT.DISPLAY_NAME, 
> ENTITY_TO_PORT.PORT_DISPLAY_NAME, 
> PORT2ZONE.MEMBER_NAME, 
> PORT2ZONE.ZONE_MEMBER_ID, 
> PORT.PORT_NUMBER 
> FROM 
> T_RES_ZONE ZONE left outer join T_VIEW_PORT2ZONE PORT2ZONE on 
> ZONE.ZONE_ID = PORT2ZONE.ZONE_ID left outer join T_RES_PORT PORT on 
> PORT2ZONE.PORT_ID = PORT.PORT_ID left outer join T_VIEW_ENTITY_TO_PORT ENTITY_TO_PORT on 
> PORT2ZONE.PORT_ID = ENTITY_TO_PORT.PORT_ID and 
> PORT2ZONE.ZONE_ID = ENTITY_TO_PORT.ZONE_ID, T_RES_FABRIC FABRIC 
> WHERE PORT2ZONE.ZONE_ID = ZONE.ZONE_ID and 
> ZONE.FABRIC_WWN = FABRIC.FABRIC_WWN and 
> FABRIC.FABRIC_ID = 1 
> Same db as before. 
> In 10.2.1.1 it gives the following error (should this be a new issue?) 
> java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerSanL1.init(ViewerSanL1.java:1828) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.init(ViewerInit.java:41) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.main(ViewerInit.java:69) 
> Caused by: org.apache.derby.client.am.SqlException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source) 
> at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source) 
> ... 4 more 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-1777) Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1

Posted by "Bryan Pendleton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-1777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12838895#action_12838895 ] 

Bryan Pendleton commented on DERBY-1777:
----------------------------------------

Can you post the query that you run, and the CREATE TABLE statements that go with it,
which is resulting in the error?

> Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1
> -----------------------------------------------------------------------------------
>
>                 Key: DERBY-1777
>                 URL: https://issues.apache.org/jira/browse/DERBY-1777
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>         Environment: WinXP SP2 dualcore 2.8 GHz 2 GBmemory
>            Reporter: Prasenjit Sarkar
>            Assignee: A B
>             Fix For: 10.1.3.2, 10.2.1.6, 10.3.1.4
>
>         Attachments: Aperi.zip, d1777_v1.patch, d1777_v2.patch, Derby1777.zip
>
>
> However, here's a query that works in 10.1.2.1 but not in 10.2.1.1  -- database can be assumed to be the same in Derby - 1205
> SELECT DISTINCT 
> ZONE.ZONE_ID ZONE_ID, 
> PORT.PORT_ID PORT_ID, 
> ENTITY_TO_PORT.TYPE, 
> ENTITY_TO_PORT.PREFIX_ID, 
> ENTITY_TO_PORT.ENTITY_ID, 
> ENTITY_TO_PORT.DISPLAY_NAME, 
> ENTITY_TO_PORT.PORT_DISPLAY_NAME, 
> PORT2ZONE.MEMBER_NAME, 
> PORT2ZONE.ZONE_MEMBER_ID, 
> PORT.PORT_NUMBER 
> FROM 
> T_RES_ZONE ZONE left outer join T_VIEW_PORT2ZONE PORT2ZONE on 
> ZONE.ZONE_ID = PORT2ZONE.ZONE_ID left outer join T_RES_PORT PORT on 
> PORT2ZONE.PORT_ID = PORT.PORT_ID left outer join T_VIEW_ENTITY_TO_PORT ENTITY_TO_PORT on 
> PORT2ZONE.PORT_ID = ENTITY_TO_PORT.PORT_ID and 
> PORT2ZONE.ZONE_ID = ENTITY_TO_PORT.ZONE_ID, T_RES_FABRIC FABRIC 
> WHERE PORT2ZONE.ZONE_ID = ZONE.ZONE_ID and 
> ZONE.FABRIC_WWN = FABRIC.FABRIC_WWN and 
> FABRIC.FABRIC_ID = 1 
> Same db as before. 
> In 10.2.1.1 it gives the following error (should this be a new issue?) 
> java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerSanL1.init(ViewerSanL1.java:1828) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.init(ViewerInit.java:41) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.main(ViewerInit.java:69) 
> Caused by: org.apache.derby.client.am.SqlException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source) 
> at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source) 
> ... 4 more 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-1777) Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1

Posted by "Prasenjit Sarkar (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1777?page=comments#action_12433251 ] 
            
Prasenjit Sarkar commented on DERBY-1777:
-----------------------------------------

I am attaching a project called Derby1777 that consistently recreates this issue - the derby.properties and the derby.jar files used (10.1.2.1) are part of the zip file.

The zip files also contain the java files necessary for recreation. To recreate run ViewerInit.main().

I think if you can run the entire ViewerInit.main() without problems, our project would have crossed a major hurdle.

> Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1
> -----------------------------------------------------------------------------------
>
>                 Key: DERBY-1777
>                 URL: http://issues.apache.org/jira/browse/DERBY-1777
>             Project: Derby
>          Issue Type: Bug
>         Environment: WinXP SP2 dualcore 2.8 GHz 2 GBmemory
>            Reporter: Prasenjit Sarkar
>             Fix For: 10.2.1.0
>
>         Attachments: Derby1777.zip
>
>
> However, here's a query that works in 10.1.2.1 but not in 10.2.1.1  -- database can be assumed to be the same in Derby - 1205
> SELECT DISTINCT 
> ZONE.ZONE_ID ZONE_ID, 
> PORT.PORT_ID PORT_ID, 
> ENTITY_TO_PORT.TYPE, 
> ENTITY_TO_PORT.PREFIX_ID, 
> ENTITY_TO_PORT.ENTITY_ID, 
> ENTITY_TO_PORT.DISPLAY_NAME, 
> ENTITY_TO_PORT.PORT_DISPLAY_NAME, 
> PORT2ZONE.MEMBER_NAME, 
> PORT2ZONE.ZONE_MEMBER_ID, 
> PORT.PORT_NUMBER 
> FROM 
> T_RES_ZONE ZONE left outer join T_VIEW_PORT2ZONE PORT2ZONE on 
> ZONE.ZONE_ID = PORT2ZONE.ZONE_ID left outer join T_RES_PORT PORT on 
> PORT2ZONE.PORT_ID = PORT.PORT_ID left outer join T_VIEW_ENTITY_TO_PORT ENTITY_TO_PORT on 
> PORT2ZONE.PORT_ID = ENTITY_TO_PORT.PORT_ID and 
> PORT2ZONE.ZONE_ID = ENTITY_TO_PORT.ZONE_ID, T_RES_FABRIC FABRIC 
> WHERE PORT2ZONE.ZONE_ID = ZONE.ZONE_ID and 
> ZONE.FABRIC_WWN = FABRIC.FABRIC_WWN and 
> FABRIC.FABRIC_ID = 1 
> Same db as before. 
> In 10.2.1.1 it gives the following error (should this be a new issue?) 
> java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerSanL1.init(ViewerSanL1.java:1828) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.init(ViewerInit.java:41) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.main(ViewerInit.java:69) 
> Caused by: org.apache.derby.client.am.SqlException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source) 
> at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source) 
> ... 4 more 

-- 
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-1777) Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1

Posted by "A B (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1777?page=comments#action_12436058 ] 
            
A B commented on DERBY-1777:
----------------------------

> I did the merge but haven't run derbyall on the 10.1 codeline; will do so shortly...

I ran derbyall on Red Hat with ibm142 using sane jars against a 10.1 built after the merge command, and there were no new failures.  So this should be a straightforward merge to 10.1 using the svn merge command shown above.

> Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1
> -----------------------------------------------------------------------------------
>
>                 Key: DERBY-1777
>                 URL: http://issues.apache.org/jira/browse/DERBY-1777
>             Project: Derby
>          Issue Type: Bug
>         Environment: WinXP SP2 dualcore 2.8 GHz 2 GBmemory
>            Reporter: Prasenjit Sarkar
>         Assigned To: A B
>             Fix For: 10.2.1.0
>
>         Attachments: Aperi.zip, d1777_v1.patch, d1777_v2.patch, Derby1777.zip
>
>
> However, here's a query that works in 10.1.2.1 but not in 10.2.1.1  -- database can be assumed to be the same in Derby - 1205
> SELECT DISTINCT 
> ZONE.ZONE_ID ZONE_ID, 
> PORT.PORT_ID PORT_ID, 
> ENTITY_TO_PORT.TYPE, 
> ENTITY_TO_PORT.PREFIX_ID, 
> ENTITY_TO_PORT.ENTITY_ID, 
> ENTITY_TO_PORT.DISPLAY_NAME, 
> ENTITY_TO_PORT.PORT_DISPLAY_NAME, 
> PORT2ZONE.MEMBER_NAME, 
> PORT2ZONE.ZONE_MEMBER_ID, 
> PORT.PORT_NUMBER 
> FROM 
> T_RES_ZONE ZONE left outer join T_VIEW_PORT2ZONE PORT2ZONE on 
> ZONE.ZONE_ID = PORT2ZONE.ZONE_ID left outer join T_RES_PORT PORT on 
> PORT2ZONE.PORT_ID = PORT.PORT_ID left outer join T_VIEW_ENTITY_TO_PORT ENTITY_TO_PORT on 
> PORT2ZONE.PORT_ID = ENTITY_TO_PORT.PORT_ID and 
> PORT2ZONE.ZONE_ID = ENTITY_TO_PORT.ZONE_ID, T_RES_FABRIC FABRIC 
> WHERE PORT2ZONE.ZONE_ID = ZONE.ZONE_ID and 
> ZONE.FABRIC_WWN = FABRIC.FABRIC_WWN and 
> FABRIC.FABRIC_ID = 1 
> Same db as before. 
> In 10.2.1.1 it gives the following error (should this be a new issue?) 
> java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerSanL1.init(ViewerSanL1.java:1828) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.init(ViewerInit.java:41) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.main(ViewerInit.java:69) 
> Caused by: org.apache.derby.client.am.SqlException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source) 
> at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source) 
> ... 4 more 

-- 
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-1777) Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1

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

A B reassigned DERBY-1777:
--------------------------

    Assignee: A B

> Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1
> -----------------------------------------------------------------------------------
>
>                 Key: DERBY-1777
>                 URL: http://issues.apache.org/jira/browse/DERBY-1777
>             Project: Derby
>          Issue Type: Bug
>         Environment: WinXP SP2 dualcore 2.8 GHz 2 GBmemory
>            Reporter: Prasenjit Sarkar
>         Assigned To: A B
>             Fix For: 10.2.1.0
>
>         Attachments: Aperi.zip, Derby1777.zip
>
>
> However, here's a query that works in 10.1.2.1 but not in 10.2.1.1  -- database can be assumed to be the same in Derby - 1205
> SELECT DISTINCT 
> ZONE.ZONE_ID ZONE_ID, 
> PORT.PORT_ID PORT_ID, 
> ENTITY_TO_PORT.TYPE, 
> ENTITY_TO_PORT.PREFIX_ID, 
> ENTITY_TO_PORT.ENTITY_ID, 
> ENTITY_TO_PORT.DISPLAY_NAME, 
> ENTITY_TO_PORT.PORT_DISPLAY_NAME, 
> PORT2ZONE.MEMBER_NAME, 
> PORT2ZONE.ZONE_MEMBER_ID, 
> PORT.PORT_NUMBER 
> FROM 
> T_RES_ZONE ZONE left outer join T_VIEW_PORT2ZONE PORT2ZONE on 
> ZONE.ZONE_ID = PORT2ZONE.ZONE_ID left outer join T_RES_PORT PORT on 
> PORT2ZONE.PORT_ID = PORT.PORT_ID left outer join T_VIEW_ENTITY_TO_PORT ENTITY_TO_PORT on 
> PORT2ZONE.PORT_ID = ENTITY_TO_PORT.PORT_ID and 
> PORT2ZONE.ZONE_ID = ENTITY_TO_PORT.ZONE_ID, T_RES_FABRIC FABRIC 
> WHERE PORT2ZONE.ZONE_ID = ZONE.ZONE_ID and 
> ZONE.FABRIC_WWN = FABRIC.FABRIC_WWN and 
> FABRIC.FABRIC_ID = 1 
> Same db as before. 
> In 10.2.1.1 it gives the following error (should this be a new issue?) 
> java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerSanL1.init(ViewerSanL1.java:1828) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.init(ViewerInit.java:41) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.main(ViewerInit.java:69) 
> Caused by: org.apache.derby.client.am.SqlException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source) 
> at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source) 
> ... 4 more 

-- 
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-1777) Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1

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


    Attachment: Aperi.zip

> Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1
> -----------------------------------------------------------------------------------
>
>                 Key: DERBY-1777
>                 URL: http://issues.apache.org/jira/browse/DERBY-1777
>             Project: Derby
>          Issue Type: Bug
>         Environment: WinXP SP2 dualcore 2.8 GHz 2 GBmemory
>            Reporter: Prasenjit Sarkar
>             Fix For: 10.2.1.0
>
>         Attachments: Aperi.zip, Derby1777.zip
>
>
> However, here's a query that works in 10.1.2.1 but not in 10.2.1.1  -- database can be assumed to be the same in Derby - 1205
> SELECT DISTINCT 
> ZONE.ZONE_ID ZONE_ID, 
> PORT.PORT_ID PORT_ID, 
> ENTITY_TO_PORT.TYPE, 
> ENTITY_TO_PORT.PREFIX_ID, 
> ENTITY_TO_PORT.ENTITY_ID, 
> ENTITY_TO_PORT.DISPLAY_NAME, 
> ENTITY_TO_PORT.PORT_DISPLAY_NAME, 
> PORT2ZONE.MEMBER_NAME, 
> PORT2ZONE.ZONE_MEMBER_ID, 
> PORT.PORT_NUMBER 
> FROM 
> T_RES_ZONE ZONE left outer join T_VIEW_PORT2ZONE PORT2ZONE on 
> ZONE.ZONE_ID = PORT2ZONE.ZONE_ID left outer join T_RES_PORT PORT on 
> PORT2ZONE.PORT_ID = PORT.PORT_ID left outer join T_VIEW_ENTITY_TO_PORT ENTITY_TO_PORT on 
> PORT2ZONE.PORT_ID = ENTITY_TO_PORT.PORT_ID and 
> PORT2ZONE.ZONE_ID = ENTITY_TO_PORT.ZONE_ID, T_RES_FABRIC FABRIC 
> WHERE PORT2ZONE.ZONE_ID = ZONE.ZONE_ID and 
> ZONE.FABRIC_WWN = FABRIC.FABRIC_WWN and 
> FABRIC.FABRIC_ID = 1 
> Same db as before. 
> In 10.2.1.1 it gives the following error (should this be a new issue?) 
> java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerSanL1.init(ViewerSanL1.java:1828) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.init(ViewerInit.java:41) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.main(ViewerInit.java:69) 
> Caused by: org.apache.derby.client.am.SqlException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source) 
> at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source) 
> ... 4 more 

-- 
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-1777) Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1

Posted by "A B (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1777?page=comments#action_12435964 ] 
            
A B commented on DERBY-1777:
----------------------------

Filed a separate Jira, DERBY-1866, to track the ASSERT failure mentioned in previous comments.  So when this patch is ported back to 10.2 and 10.1, I think this particular issue can be closed.

That said, Rick has indicated that the patch will be mega-merged to 10.2 later.  As for 10.1, the merge command to port this back to 10.1 is straightforward:

  svn merge -r 446923:446924 https://svn.apache.org/repos/asf/db/derby/code/trunk

I did the merge but haven't run derbyall on the 10.1 codeline; will do so shortly...

> Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1
> -----------------------------------------------------------------------------------
>
>                 Key: DERBY-1777
>                 URL: http://issues.apache.org/jira/browse/DERBY-1777
>             Project: Derby
>          Issue Type: Bug
>         Environment: WinXP SP2 dualcore 2.8 GHz 2 GBmemory
>            Reporter: Prasenjit Sarkar
>         Assigned To: A B
>             Fix For: 10.2.1.0
>
>         Attachments: Aperi.zip, d1777_v1.patch, d1777_v2.patch, Derby1777.zip
>
>
> However, here's a query that works in 10.1.2.1 but not in 10.2.1.1  -- database can be assumed to be the same in Derby - 1205
> SELECT DISTINCT 
> ZONE.ZONE_ID ZONE_ID, 
> PORT.PORT_ID PORT_ID, 
> ENTITY_TO_PORT.TYPE, 
> ENTITY_TO_PORT.PREFIX_ID, 
> ENTITY_TO_PORT.ENTITY_ID, 
> ENTITY_TO_PORT.DISPLAY_NAME, 
> ENTITY_TO_PORT.PORT_DISPLAY_NAME, 
> PORT2ZONE.MEMBER_NAME, 
> PORT2ZONE.ZONE_MEMBER_ID, 
> PORT.PORT_NUMBER 
> FROM 
> T_RES_ZONE ZONE left outer join T_VIEW_PORT2ZONE PORT2ZONE on 
> ZONE.ZONE_ID = PORT2ZONE.ZONE_ID left outer join T_RES_PORT PORT on 
> PORT2ZONE.PORT_ID = PORT.PORT_ID left outer join T_VIEW_ENTITY_TO_PORT ENTITY_TO_PORT on 
> PORT2ZONE.PORT_ID = ENTITY_TO_PORT.PORT_ID and 
> PORT2ZONE.ZONE_ID = ENTITY_TO_PORT.ZONE_ID, T_RES_FABRIC FABRIC 
> WHERE PORT2ZONE.ZONE_ID = ZONE.ZONE_ID and 
> ZONE.FABRIC_WWN = FABRIC.FABRIC_WWN and 
> FABRIC.FABRIC_ID = 1 
> Same db as before. 
> In 10.2.1.1 it gives the following error (should this be a new issue?) 
> java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerSanL1.init(ViewerSanL1.java:1828) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.init(ViewerInit.java:41) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.main(ViewerInit.java:69) 
> Caused by: org.apache.derby.client.am.SqlException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source) 
> at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source) 
> ... 4 more 

-- 
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-1777) Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1

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

Prasenjit Sarkar updated DERBY-1777:
------------------------------------

    Attachment: Derby1777.zip

Here is the file referred to by the above comment

> Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1
> -----------------------------------------------------------------------------------
>
>                 Key: DERBY-1777
>                 URL: http://issues.apache.org/jira/browse/DERBY-1777
>             Project: Derby
>          Issue Type: Bug
>         Environment: WinXP SP2 dualcore 2.8 GHz 2 GBmemory
>            Reporter: Prasenjit Sarkar
>             Fix For: 10.2.1.0
>
>         Attachments: Derby1777.zip
>
>
> However, here's a query that works in 10.1.2.1 but not in 10.2.1.1  -- database can be assumed to be the same in Derby - 1205
> SELECT DISTINCT 
> ZONE.ZONE_ID ZONE_ID, 
> PORT.PORT_ID PORT_ID, 
> ENTITY_TO_PORT.TYPE, 
> ENTITY_TO_PORT.PREFIX_ID, 
> ENTITY_TO_PORT.ENTITY_ID, 
> ENTITY_TO_PORT.DISPLAY_NAME, 
> ENTITY_TO_PORT.PORT_DISPLAY_NAME, 
> PORT2ZONE.MEMBER_NAME, 
> PORT2ZONE.ZONE_MEMBER_ID, 
> PORT.PORT_NUMBER 
> FROM 
> T_RES_ZONE ZONE left outer join T_VIEW_PORT2ZONE PORT2ZONE on 
> ZONE.ZONE_ID = PORT2ZONE.ZONE_ID left outer join T_RES_PORT PORT on 
> PORT2ZONE.PORT_ID = PORT.PORT_ID left outer join T_VIEW_ENTITY_TO_PORT ENTITY_TO_PORT on 
> PORT2ZONE.PORT_ID = ENTITY_TO_PORT.PORT_ID and 
> PORT2ZONE.ZONE_ID = ENTITY_TO_PORT.ZONE_ID, T_RES_FABRIC FABRIC 
> WHERE PORT2ZONE.ZONE_ID = ZONE.ZONE_ID and 
> ZONE.FABRIC_WWN = FABRIC.FABRIC_WWN and 
> FABRIC.FABRIC_ID = 1 
> Same db as before. 
> In 10.2.1.1 it gives the following error (should this be a new issue?) 
> java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerSanL1.init(ViewerSanL1.java:1828) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.init(ViewerInit.java:41) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.main(ViewerInit.java:69) 
> Caused by: org.apache.derby.client.am.SqlException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source) 
> at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source) 
> ... 4 more 

-- 
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-1777) Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1

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

A B updated DERBY-1777:
-----------------------

    Attachment: d1777_v2.patch

Attaching a second version of the patch, d1777_v2.patch, that includes a test case for catching regressions of the first NPE described above.  As mentioned in previous comments, I don't think it's going to be possible to add a test case for the second NPE because it's intermittent and time-sensitive (and does not reproduce with "noTimeout=true").

Aside from the new test case in lang/predicatePushdown.sql, the _v2 patch is identical to the _v1 patch.  The patch is actually quite small--only about 10 lines of actual code changes.  The rest is comments and test case/master updates.

Any review comments and/or commit would be greatly appreciated.

> Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1
> -----------------------------------------------------------------------------------
>
>                 Key: DERBY-1777
>                 URL: http://issues.apache.org/jira/browse/DERBY-1777
>             Project: Derby
>          Issue Type: Bug
>         Environment: WinXP SP2 dualcore 2.8 GHz 2 GBmemory
>            Reporter: Prasenjit Sarkar
>         Assigned To: A B
>             Fix For: 10.2.1.0
>
>         Attachments: Aperi.zip, d1777_v1.patch, d1777_v2.patch, Derby1777.zip
>
>
> However, here's a query that works in 10.1.2.1 but not in 10.2.1.1  -- database can be assumed to be the same in Derby - 1205
> SELECT DISTINCT 
> ZONE.ZONE_ID ZONE_ID, 
> PORT.PORT_ID PORT_ID, 
> ENTITY_TO_PORT.TYPE, 
> ENTITY_TO_PORT.PREFIX_ID, 
> ENTITY_TO_PORT.ENTITY_ID, 
> ENTITY_TO_PORT.DISPLAY_NAME, 
> ENTITY_TO_PORT.PORT_DISPLAY_NAME, 
> PORT2ZONE.MEMBER_NAME, 
> PORT2ZONE.ZONE_MEMBER_ID, 
> PORT.PORT_NUMBER 
> FROM 
> T_RES_ZONE ZONE left outer join T_VIEW_PORT2ZONE PORT2ZONE on 
> ZONE.ZONE_ID = PORT2ZONE.ZONE_ID left outer join T_RES_PORT PORT on 
> PORT2ZONE.PORT_ID = PORT.PORT_ID left outer join T_VIEW_ENTITY_TO_PORT ENTITY_TO_PORT on 
> PORT2ZONE.PORT_ID = ENTITY_TO_PORT.PORT_ID and 
> PORT2ZONE.ZONE_ID = ENTITY_TO_PORT.ZONE_ID, T_RES_FABRIC FABRIC 
> WHERE PORT2ZONE.ZONE_ID = ZONE.ZONE_ID and 
> ZONE.FABRIC_WWN = FABRIC.FABRIC_WWN and 
> FABRIC.FABRIC_ID = 1 
> Same db as before. 
> In 10.2.1.1 it gives the following error (should this be a new issue?) 
> java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerSanL1.init(ViewerSanL1.java:1828) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.init(ViewerInit.java:41) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.main(ViewerInit.java:69) 
> Caused by: org.apache.derby.client.am.SqlException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source) 
> at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source) 
> ... 4 more 

-- 
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-1777) Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1

Posted by "Prasenjit Sarkar (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1777?page=comments#action_12431425 ] 
            
Prasenjit Sarkar commented on DERBY-1777:
-----------------------------------------

There are 15 other queries that fail. Here's one more:
1.
	    SELECT  
			OTHER2PORT2PORT.PORT_ID PORT_ID,  
			OTHER2PORT2PORT.DETECTABLE DETECTABLE, 
			OTHER2PORT2PORT.PORT_ID2 PORT_ID2, 
	    	 CASE  
	    		WHEN T_RES_PORT.DISPLAY_NAME IS NOT NULL THEN T_RES_PORT.DISPLAY_NAME 
	    		ELSE T_RES_PORT.NAME  
	    	END PORT2_NAME,  
	    	T_RES_PORT.PORT_NUMBER PORT_NUMBER, 
			OTHER2PORT2PORT.PORT2PORT_ID PORT2PORT_ID, 
			ENTITY2PORT.PREFIX_ID, 
			ENTITY2PORT.ENTITY_ID  
	    FROM  
		   T_RES_PORT, 
	    (SELECT   
			PORT2PORT.PORT_ID2 PORT_ID, 
			OTHER2PORT.OTHER_ID OTHER_ID,  
			OTHER2PORT.PREFIX_ID PREFIX_ID,  
			OTHER2PORT.PORT_ID PORT_ID2, 
			PORT2PORT.DETECTABLE DETECTABLE, 
		   PORT2PORT.PORT2PORT_ID PORT2PORT_ID 
	    FROM   
	    T_VIEW_PORT2PORT PORT2PORT, 
	    T_VIEW_VOTHER2PORT OTHER2PORT 
		WHERE 
		    PORT2PORT.PORT_ID1 = OTHER2PORT.PORT_ID) OTHER2PORT2PORT, T_VIEW_ENTITY2PORT ENTITY2PORT  
		WHERE  
		    ENTITY2PORT.PORT_ID = T_RES_PORT.PORT_ID and  
			 T_RES_PORT.PORT_ID = OTHER2PORT2PORT.PORT_ID and  
		    OTHER2PORT2PORT.OTHER_ID = 1 and  
			 OTHER2PORT2PORT.PREFIX_ID = 'x'




> Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1
> -----------------------------------------------------------------------------------
>
>                 Key: DERBY-1777
>                 URL: http://issues.apache.org/jira/browse/DERBY-1777
>             Project: Derby
>          Issue Type: Bug
>         Environment: WinXP SP2 dualcore 2.8 GHz 2 GBmemory
>            Reporter: Prasenjit Sarkar
>             Fix For: 10.2.1.0
>
>
> However, here's a query that works in 10.1.2.1 but not in 10.2.1.1  -- database can be assumed to be the same in Derby - 1205
> SELECT DISTINCT 
> ZONE.ZONE_ID ZONE_ID, 
> PORT.PORT_ID PORT_ID, 
> ENTITY_TO_PORT.TYPE, 
> ENTITY_TO_PORT.PREFIX_ID, 
> ENTITY_TO_PORT.ENTITY_ID, 
> ENTITY_TO_PORT.DISPLAY_NAME, 
> ENTITY_TO_PORT.PORT_DISPLAY_NAME, 
> PORT2ZONE.MEMBER_NAME, 
> PORT2ZONE.ZONE_MEMBER_ID, 
> PORT.PORT_NUMBER 
> FROM 
> T_RES_ZONE ZONE left outer join T_VIEW_PORT2ZONE PORT2ZONE on 
> ZONE.ZONE_ID = PORT2ZONE.ZONE_ID left outer join T_RES_PORT PORT on 
> PORT2ZONE.PORT_ID = PORT.PORT_ID left outer join T_VIEW_ENTITY_TO_PORT ENTITY_TO_PORT on 
> PORT2ZONE.PORT_ID = ENTITY_TO_PORT.PORT_ID and 
> PORT2ZONE.ZONE_ID = ENTITY_TO_PORT.ZONE_ID, T_RES_FABRIC FABRIC 
> WHERE PORT2ZONE.ZONE_ID = ZONE.ZONE_ID and 
> ZONE.FABRIC_WWN = FABRIC.FABRIC_WWN and 
> FABRIC.FABRIC_ID = 1 
> Same db as before. 
> In 10.2.1.1 it gives the following error (should this be a new issue?) 
> java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerSanL1.init(ViewerSanL1.java:1828) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.init(ViewerInit.java:41) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.main(ViewerInit.java:69) 
> Caused by: org.apache.derby.client.am.SqlException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source) 
> at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source) 
> ... 4 more 

-- 
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-1777) Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1

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

Rick Hillegas updated DERBY-1777:
---------------------------------

    Fix Version/s: 10.2.1.0

Assign this regression to 10.2.

> Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1
> -----------------------------------------------------------------------------------
>
>                 Key: DERBY-1777
>                 URL: http://issues.apache.org/jira/browse/DERBY-1777
>             Project: Derby
>          Issue Type: Bug
>         Environment: WinXP SP2 dualcore 2.8 GHz 2 GBmemory
>            Reporter: Prasenjit Sarkar
>             Fix For: 10.2.1.0
>
>
> However, here's a query that works in 10.1.2.1 but not in 10.2.1.1  -- database can be assumed to be the same in Derby - 1205
> SELECT DISTINCT 
> ZONE.ZONE_ID ZONE_ID, 
> PORT.PORT_ID PORT_ID, 
> ENTITY_TO_PORT.TYPE, 
> ENTITY_TO_PORT.PREFIX_ID, 
> ENTITY_TO_PORT.ENTITY_ID, 
> ENTITY_TO_PORT.DISPLAY_NAME, 
> ENTITY_TO_PORT.PORT_DISPLAY_NAME, 
> PORT2ZONE.MEMBER_NAME, 
> PORT2ZONE.ZONE_MEMBER_ID, 
> PORT.PORT_NUMBER 
> FROM 
> T_RES_ZONE ZONE left outer join T_VIEW_PORT2ZONE PORT2ZONE on 
> ZONE.ZONE_ID = PORT2ZONE.ZONE_ID left outer join T_RES_PORT PORT on 
> PORT2ZONE.PORT_ID = PORT.PORT_ID left outer join T_VIEW_ENTITY_TO_PORT ENTITY_TO_PORT on 
> PORT2ZONE.PORT_ID = ENTITY_TO_PORT.PORT_ID and 
> PORT2ZONE.ZONE_ID = ENTITY_TO_PORT.ZONE_ID, T_RES_FABRIC FABRIC 
> WHERE PORT2ZONE.ZONE_ID = ZONE.ZONE_ID and 
> ZONE.FABRIC_WWN = FABRIC.FABRIC_WWN and 
> FABRIC.FABRIC_ID = 1 
> Same db as before. 
> In 10.2.1.1 it gives the following error (should this be a new issue?) 
> java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerSanL1.init(ViewerSanL1.java:1828) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.init(ViewerInit.java:41) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.main(ViewerInit.java:69) 
> Caused by: org.apache.derby.client.am.SqlException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source) 
> at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source) 
> ... 4 more 

-- 
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-1777) Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1

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

Mike Matrigali updated DERBY-1777:
----------------------------------

    Fix Version/s: 10.1.3.2

committed the merge of the change from trunk to 10.1 branch:

m101_142:186>svn commit

Sending        java\engine\org\apache\derby\impl\sql\compile\ColumnReference.jav
a
Sending        java\engine\org\apache\derby\impl\sql\compile\OptimizerImpl.java
Sending        java\testing\org\apache\derbyTesting\functionTests\master\predica
tePushdown.out
Sending        java\testing\org\apache\derbyTesting\functionTests\tests\lang\pre
dicatePushdown.sql
Transmitting file data ....
Committed revision 448018.

> Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1
> -----------------------------------------------------------------------------------
>
>                 Key: DERBY-1777
>                 URL: http://issues.apache.org/jira/browse/DERBY-1777
>             Project: Derby
>          Issue Type: Bug
>         Environment: WinXP SP2 dualcore 2.8 GHz 2 GBmemory
>            Reporter: Prasenjit Sarkar
>         Assigned To: A B
>             Fix For: 10.2.1.0, 10.1.3.2
>
>         Attachments: Aperi.zip, d1777_v1.patch, d1777_v2.patch, Derby1777.zip
>
>
> However, here's a query that works in 10.1.2.1 but not in 10.2.1.1  -- database can be assumed to be the same in Derby - 1205
> SELECT DISTINCT 
> ZONE.ZONE_ID ZONE_ID, 
> PORT.PORT_ID PORT_ID, 
> ENTITY_TO_PORT.TYPE, 
> ENTITY_TO_PORT.PREFIX_ID, 
> ENTITY_TO_PORT.ENTITY_ID, 
> ENTITY_TO_PORT.DISPLAY_NAME, 
> ENTITY_TO_PORT.PORT_DISPLAY_NAME, 
> PORT2ZONE.MEMBER_NAME, 
> PORT2ZONE.ZONE_MEMBER_ID, 
> PORT.PORT_NUMBER 
> FROM 
> T_RES_ZONE ZONE left outer join T_VIEW_PORT2ZONE PORT2ZONE on 
> ZONE.ZONE_ID = PORT2ZONE.ZONE_ID left outer join T_RES_PORT PORT on 
> PORT2ZONE.PORT_ID = PORT.PORT_ID left outer join T_VIEW_ENTITY_TO_PORT ENTITY_TO_PORT on 
> PORT2ZONE.PORT_ID = ENTITY_TO_PORT.PORT_ID and 
> PORT2ZONE.ZONE_ID = ENTITY_TO_PORT.ZONE_ID, T_RES_FABRIC FABRIC 
> WHERE PORT2ZONE.ZONE_ID = ZONE.ZONE_ID and 
> ZONE.FABRIC_WWN = FABRIC.FABRIC_WWN and 
> FABRIC.FABRIC_ID = 1 
> Same db as before. 
> In 10.2.1.1 it gives the following error (should this be a new issue?) 
> java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerSanL1.init(ViewerSanL1.java:1828) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.init(ViewerInit.java:41) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.main(ViewerInit.java:69) 
> Caused by: org.apache.derby.client.am.SqlException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source) 
> at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source) 
> ... 4 more 

-- 
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-1777) Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1

Posted by "Rick Hillegas (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1777?page=comments#action_12435138 ] 
            
Rick Hillegas commented on DERBY-1777:
--------------------------------------

Thanks for the patch Army. The changes are small and focussed and look like an incremental improvement. I will run regression tests tonight.

> Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1
> -----------------------------------------------------------------------------------
>
>                 Key: DERBY-1777
>                 URL: http://issues.apache.org/jira/browse/DERBY-1777
>             Project: Derby
>          Issue Type: Bug
>         Environment: WinXP SP2 dualcore 2.8 GHz 2 GBmemory
>            Reporter: Prasenjit Sarkar
>         Assigned To: A B
>             Fix For: 10.2.1.0
>
>         Attachments: Aperi.zip, d1777_v1.patch, d1777_v2.patch, Derby1777.zip
>
>
> However, here's a query that works in 10.1.2.1 but not in 10.2.1.1  -- database can be assumed to be the same in Derby - 1205
> SELECT DISTINCT 
> ZONE.ZONE_ID ZONE_ID, 
> PORT.PORT_ID PORT_ID, 
> ENTITY_TO_PORT.TYPE, 
> ENTITY_TO_PORT.PREFIX_ID, 
> ENTITY_TO_PORT.ENTITY_ID, 
> ENTITY_TO_PORT.DISPLAY_NAME, 
> ENTITY_TO_PORT.PORT_DISPLAY_NAME, 
> PORT2ZONE.MEMBER_NAME, 
> PORT2ZONE.ZONE_MEMBER_ID, 
> PORT.PORT_NUMBER 
> FROM 
> T_RES_ZONE ZONE left outer join T_VIEW_PORT2ZONE PORT2ZONE on 
> ZONE.ZONE_ID = PORT2ZONE.ZONE_ID left outer join T_RES_PORT PORT on 
> PORT2ZONE.PORT_ID = PORT.PORT_ID left outer join T_VIEW_ENTITY_TO_PORT ENTITY_TO_PORT on 
> PORT2ZONE.PORT_ID = ENTITY_TO_PORT.PORT_ID and 
> PORT2ZONE.ZONE_ID = ENTITY_TO_PORT.ZONE_ID, T_RES_FABRIC FABRIC 
> WHERE PORT2ZONE.ZONE_ID = ZONE.ZONE_ID and 
> ZONE.FABRIC_WWN = FABRIC.FABRIC_WWN and 
> FABRIC.FABRIC_ID = 1 
> Same db as before. 
> In 10.2.1.1 it gives the following error (should this be a new issue?) 
> java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerSanL1.init(ViewerSanL1.java:1828) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.init(ViewerInit.java:41) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.main(ViewerInit.java:69) 
> Caused by: org.apache.derby.client.am.SqlException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source) 
> at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source) 
> ... 4 more 

-- 
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-1777) Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1

Posted by "Rick Hillegas (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1777?page=comments#action_12435265 ] 
            
Rick Hillegas commented on DERBY-1777:
--------------------------------------

Derbyall ran cleanly on linux except for message encoding diffs in urlLocale, messageLocale, and iepnegativetests_ES. Committed at subversion revision 446924.

> Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1
> -----------------------------------------------------------------------------------
>
>                 Key: DERBY-1777
>                 URL: http://issues.apache.org/jira/browse/DERBY-1777
>             Project: Derby
>          Issue Type: Bug
>         Environment: WinXP SP2 dualcore 2.8 GHz 2 GBmemory
>            Reporter: Prasenjit Sarkar
>         Assigned To: A B
>             Fix For: 10.2.1.0
>
>         Attachments: Aperi.zip, d1777_v1.patch, d1777_v2.patch, Derby1777.zip
>
>
> However, here's a query that works in 10.1.2.1 but not in 10.2.1.1  -- database can be assumed to be the same in Derby - 1205
> SELECT DISTINCT 
> ZONE.ZONE_ID ZONE_ID, 
> PORT.PORT_ID PORT_ID, 
> ENTITY_TO_PORT.TYPE, 
> ENTITY_TO_PORT.PREFIX_ID, 
> ENTITY_TO_PORT.ENTITY_ID, 
> ENTITY_TO_PORT.DISPLAY_NAME, 
> ENTITY_TO_PORT.PORT_DISPLAY_NAME, 
> PORT2ZONE.MEMBER_NAME, 
> PORT2ZONE.ZONE_MEMBER_ID, 
> PORT.PORT_NUMBER 
> FROM 
> T_RES_ZONE ZONE left outer join T_VIEW_PORT2ZONE PORT2ZONE on 
> ZONE.ZONE_ID = PORT2ZONE.ZONE_ID left outer join T_RES_PORT PORT on 
> PORT2ZONE.PORT_ID = PORT.PORT_ID left outer join T_VIEW_ENTITY_TO_PORT ENTITY_TO_PORT on 
> PORT2ZONE.PORT_ID = ENTITY_TO_PORT.PORT_ID and 
> PORT2ZONE.ZONE_ID = ENTITY_TO_PORT.ZONE_ID, T_RES_FABRIC FABRIC 
> WHERE PORT2ZONE.ZONE_ID = ZONE.ZONE_ID and 
> ZONE.FABRIC_WWN = FABRIC.FABRIC_WWN and 
> FABRIC.FABRIC_ID = 1 
> Same db as before. 
> In 10.2.1.1 it gives the following error (should this be a new issue?) 
> java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerSanL1.init(ViewerSanL1.java:1828) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.init(ViewerInit.java:41) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.main(ViewerInit.java:69) 
> Caused by: org.apache.derby.client.am.SqlException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source) 
> at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source) 
> ... 4 more 

-- 
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-1777) Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1

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

A B updated DERBY-1777:
-----------------------

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

> Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1
> -----------------------------------------------------------------------------------
>
>                 Key: DERBY-1777
>                 URL: http://issues.apache.org/jira/browse/DERBY-1777
>             Project: Derby
>          Issue Type: Bug
>         Environment: WinXP SP2 dualcore 2.8 GHz 2 GBmemory
>            Reporter: Prasenjit Sarkar
>         Assigned To: A B
>             Fix For: 10.2.1.0
>
>         Attachments: Aperi.zip, d1777_v1.patch, Derby1777.zip
>
>
> However, here's a query that works in 10.1.2.1 but not in 10.2.1.1  -- database can be assumed to be the same in Derby - 1205
> SELECT DISTINCT 
> ZONE.ZONE_ID ZONE_ID, 
> PORT.PORT_ID PORT_ID, 
> ENTITY_TO_PORT.TYPE, 
> ENTITY_TO_PORT.PREFIX_ID, 
> ENTITY_TO_PORT.ENTITY_ID, 
> ENTITY_TO_PORT.DISPLAY_NAME, 
> ENTITY_TO_PORT.PORT_DISPLAY_NAME, 
> PORT2ZONE.MEMBER_NAME, 
> PORT2ZONE.ZONE_MEMBER_ID, 
> PORT.PORT_NUMBER 
> FROM 
> T_RES_ZONE ZONE left outer join T_VIEW_PORT2ZONE PORT2ZONE on 
> ZONE.ZONE_ID = PORT2ZONE.ZONE_ID left outer join T_RES_PORT PORT on 
> PORT2ZONE.PORT_ID = PORT.PORT_ID left outer join T_VIEW_ENTITY_TO_PORT ENTITY_TO_PORT on 
> PORT2ZONE.PORT_ID = ENTITY_TO_PORT.PORT_ID and 
> PORT2ZONE.ZONE_ID = ENTITY_TO_PORT.ZONE_ID, T_RES_FABRIC FABRIC 
> WHERE PORT2ZONE.ZONE_ID = ZONE.ZONE_ID and 
> ZONE.FABRIC_WWN = FABRIC.FABRIC_WWN and 
> FABRIC.FABRIC_ID = 1 
> Same db as before. 
> In 10.2.1.1 it gives the following error (should this be a new issue?) 
> java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerSanL1.init(ViewerSanL1.java:1828) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.init(ViewerInit.java:41) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.main(ViewerInit.java:69) 
> Caused by: org.apache.derby.client.am.SqlException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source) 
> at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source) 
> ... 4 more 

-- 
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-1777) Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1

Posted by "Prasenjit Sarkar (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1777?page=comments#action_12431623 ] 
            
Prasenjit Sarkar commented on DERBY-1777:
-----------------------------------------

All of them fail with the same stack trace. All failures are repeatable and affect only certain queries and not others. Here is the derby.log for one failure that indicates an optimizer problem rather than a connection problem

2006-08-30 00:57:44.062 GMT Thread[DRDAConnThread_3,5,main] (XID = 47607), (SESSIONID = 0), (DATABASE = Aperi), (DRDAID = NF000001.H18F-520727550015307819{2}), Failed Statement is: SELECT DISTINCT 
		 	FABRIC.FABRIC_ID 
		FROM 
		T_VIEW_VOTHER2PORT OTHER2PORT, 
		T_VIEW_PORT2ZSET PORT2ZSET,
		    T_RES_ZSET, T_RES_FABRIC FABRIC 
		WHERE 
	    	 OTHER2PORT.PREFIX_ID = 'x' and  
	        OTHER2PORT.OTHER_ID = 1 and  
	    	 OTHER2PORT.PORT_ID = PORT2ZSET.PORT_ID and 
		    PORT2ZSET.ZSET_ID = T_RES_ZSET.ZSET_ID and  
			 T_RES_ZSET.FABRIC_WWN = FABRIC.FABRIC_WWN
java.lang.NullPointerException
	at org.apache.derby.impl.sql.compile.FromBaseTable.uniqueJoin(Unknown Source)
	at org.apache.derby.impl.sql.compile.ProjectRestrictNode.uniqueJoin(Unknown Source)
	at org.apache.derby.impl.sql.compile.OptimizerImpl.uniqueJoinWithOuterTable(Unknown Source)
	at org.apache.derby.impl.sql.compile.FromBaseTable.estimateCost(Unknown Source)
	at org.apache.derby.impl.sql.compile.OptimizerImpl.estimateTotalCost(Unknown Source)
	at org.apache.derby.impl.sql.compile.OptimizerImpl.costBasedCostOptimizable(Unknown Source)
	at org.apache.derby.impl.sql.compile.OptimizerImpl.costOptimizable(Unknown Source)
	at org.apache.derby.impl.sql.compile.FromBaseTable.optimizeIt(Unknown Source)
	at org.apache.derby.impl.sql.compile.ProjectRestrictNode.optimizeIt(Unknown Source)
	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown Source)
	at org.apache.derby.impl.sql.compile.SelectNode.optimize(Unknown Source)
	at org.apache.derby.impl.sql.compile.ProjectRestrictNode.optimizeIt(Unknown Source)
	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown Source)
	at org.apache.derby.impl.sql.compile.SelectNode.optimize(Unknown Source)
	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(Unknown Source)
	at org.apache.derby.impl.sql.compile.UnionNode.optimizeIt(Unknown Source)
	at org.apache.derby.impl.sql.compile.ProjectRestrictNode.optimizeIt(Unknown Source)
	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown Source)
	at org.apache.derby.impl.sql.compile.SelectNode.optimize(Unknown Source)
	at org.apache.derby.impl.sql.compile.ProjectRestrictNode.optimizeIt(Unknown Source)
	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown Source)
	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(Unknown Source)
	at org.apache.derby.impl.sql.compile.JoinNode.optimizeIt(Unknown Source)
	at org.apache.derby.impl.sql.compile.ProjectRestrictNode.optimizeIt(Unknown Source)
	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown Source)
	at org.apache.derby.impl.sql.compile.SelectNode.optimize(Unknown Source)
	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(Unknown Source)
	at org.apache.derby.impl.sql.compile.UnionNode.optimizeIt(Unknown Source)
	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown Source)
	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(Unknown Source)
	at org.apache.derby.impl.sql.compile.UnionNode.optimizeIt(Unknown Source)
	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown Source)
	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(Unknown Source)
	at org.apache.derby.impl.sql.compile.UnionNode.optimizeIt(Unknown Source)
	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown Source)
	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(Unknown Source)
	at org.apache.derby.impl.sql.compile.UnionNode.optimizeIt(Unknown Source)
	at org.apache.derby.impl.sql.compile.ProjectRestrictNode.optimizeIt(Unknown Source)
	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown Source)
	at org.apache.derby.impl.sql.compile.SelectNode.optimize(Unknown Source)
	at org.apache.derby.impl.sql.compile.ProjectRestrictNode.optimizeIt(Unknown Source)
	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown Source)
	at org.apache.derby.impl.sql.compile.SelectNode.optimize(Unknown Source)
	at org.apache.derby.impl.sql.compile.DMLStatementNode.optimize(Unknown Source)
	at org.apache.derby.impl.sql.compile.CursorNode.optimize(Unknown Source)
	at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
	at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
	at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown Source)
	at org.apache.derby.jdbc.Driver30.newEmbedPreparedStatement(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
	at org.apache.derby.impl.drda.DRDAStatement.prepareStatementJDBC3(Unknown Source)
	at org.apache.derby.impl.drda.DRDAStatement.prepare(Unknown Source)
	at org.apache.derby.impl.drda.DRDAStatement.explicitPrepare(Unknown Source)
	at org.apache.derby.impl.drda.DRDAConnThread.parsePRPSQLSTT(Unknown Source)
	at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown Source)
	at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)

I will try increase the severity log and report the results




> Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1
> -----------------------------------------------------------------------------------
>
>                 Key: DERBY-1777
>                 URL: http://issues.apache.org/jira/browse/DERBY-1777
>             Project: Derby
>          Issue Type: Bug
>         Environment: WinXP SP2 dualcore 2.8 GHz 2 GBmemory
>            Reporter: Prasenjit Sarkar
>             Fix For: 10.2.1.0
>
>
> However, here's a query that works in 10.1.2.1 but not in 10.2.1.1  -- database can be assumed to be the same in Derby - 1205
> SELECT DISTINCT 
> ZONE.ZONE_ID ZONE_ID, 
> PORT.PORT_ID PORT_ID, 
> ENTITY_TO_PORT.TYPE, 
> ENTITY_TO_PORT.PREFIX_ID, 
> ENTITY_TO_PORT.ENTITY_ID, 
> ENTITY_TO_PORT.DISPLAY_NAME, 
> ENTITY_TO_PORT.PORT_DISPLAY_NAME, 
> PORT2ZONE.MEMBER_NAME, 
> PORT2ZONE.ZONE_MEMBER_ID, 
> PORT.PORT_NUMBER 
> FROM 
> T_RES_ZONE ZONE left outer join T_VIEW_PORT2ZONE PORT2ZONE on 
> ZONE.ZONE_ID = PORT2ZONE.ZONE_ID left outer join T_RES_PORT PORT on 
> PORT2ZONE.PORT_ID = PORT.PORT_ID left outer join T_VIEW_ENTITY_TO_PORT ENTITY_TO_PORT on 
> PORT2ZONE.PORT_ID = ENTITY_TO_PORT.PORT_ID and 
> PORT2ZONE.ZONE_ID = ENTITY_TO_PORT.ZONE_ID, T_RES_FABRIC FABRIC 
> WHERE PORT2ZONE.ZONE_ID = ZONE.ZONE_ID and 
> ZONE.FABRIC_WWN = FABRIC.FABRIC_WWN and 
> FABRIC.FABRIC_ID = 1 
> Same db as before. 
> In 10.2.1.1 it gives the following error (should this be a new issue?) 
> java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerSanL1.init(ViewerSanL1.java:1828) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.init(ViewerInit.java:41) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.main(ViewerInit.java:69) 
> Caused by: org.apache.derby.client.am.SqlException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source) 
> at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source) 
> ... 4 more 

-- 
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-1777) Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1

Posted by "A B (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1777?page=comments#action_12431609 ] 
            
A B commented on DERBY-1777:
----------------------------

>  There are 15 other queries that fail. 

Do all of them fail with the same error and same stack trace?  Or are the failures different?  When the queries fail, is there anything in the derby.log file that might indicate a problem?

Also, for the most recent query that you posted, what are the expected results?

I ran the most recently-posted query in client/server mode against 10.1.2 (before any optimizer changes went in), 10.2 beta (the latest), and 10.3 (with some early changes that I have for DERBY-1315).   In all cases the query compiles and executes without error.

I think this means that the problem isn't so much the specific query as it is the state of the client/server communication at the time these queries are executed.  That in turn suggests that the series of events preceding the failed statements are somehow related to the failures, or else perhaps that some other error occured in the Derby engine and that error causes problems in the client/server communication.

To help track the latter, add the property:

  derby.stream.error.logSeverityLevel=0

and then check derby.log to see if there are any errors recorded when the failure occurs.

To help track the former (client/server communication) it would be great if you could enable client and server tracing and then post the traces to this issue (NOTE: these traces can be somewhat large).  For info on how to enable client/server tracing, see:

  http://wiki.apache.org/db-derby/ProtocolDebuggingTips

I don't know how much of that is possible in your environment, but the more info you can provide about Derby status at the time of the failure, the better.  Hopefully these initial steps can provide some insight....

> Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1
> -----------------------------------------------------------------------------------
>
>                 Key: DERBY-1777
>                 URL: http://issues.apache.org/jira/browse/DERBY-1777
>             Project: Derby
>          Issue Type: Bug
>         Environment: WinXP SP2 dualcore 2.8 GHz 2 GBmemory
>            Reporter: Prasenjit Sarkar
>             Fix For: 10.2.1.0
>
>
> However, here's a query that works in 10.1.2.1 but not in 10.2.1.1  -- database can be assumed to be the same in Derby - 1205
> SELECT DISTINCT 
> ZONE.ZONE_ID ZONE_ID, 
> PORT.PORT_ID PORT_ID, 
> ENTITY_TO_PORT.TYPE, 
> ENTITY_TO_PORT.PREFIX_ID, 
> ENTITY_TO_PORT.ENTITY_ID, 
> ENTITY_TO_PORT.DISPLAY_NAME, 
> ENTITY_TO_PORT.PORT_DISPLAY_NAME, 
> PORT2ZONE.MEMBER_NAME, 
> PORT2ZONE.ZONE_MEMBER_ID, 
> PORT.PORT_NUMBER 
> FROM 
> T_RES_ZONE ZONE left outer join T_VIEW_PORT2ZONE PORT2ZONE on 
> ZONE.ZONE_ID = PORT2ZONE.ZONE_ID left outer join T_RES_PORT PORT on 
> PORT2ZONE.PORT_ID = PORT.PORT_ID left outer join T_VIEW_ENTITY_TO_PORT ENTITY_TO_PORT on 
> PORT2ZONE.PORT_ID = ENTITY_TO_PORT.PORT_ID and 
> PORT2ZONE.ZONE_ID = ENTITY_TO_PORT.ZONE_ID, T_RES_FABRIC FABRIC 
> WHERE PORT2ZONE.ZONE_ID = ZONE.ZONE_ID and 
> ZONE.FABRIC_WWN = FABRIC.FABRIC_WWN and 
> FABRIC.FABRIC_ID = 1 
> Same db as before. 
> In 10.2.1.1 it gives the following error (should this be a new issue?) 
> java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerSanL1.init(ViewerSanL1.java:1828) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.init(ViewerInit.java:41) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.main(ViewerInit.java:69) 
> Caused by: org.apache.derby.client.am.SqlException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source) 
> at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source) 
> ... 4 more 

-- 
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-1777) Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1

Posted by "Mihirkumar Paulatsya (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-1777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12838880#action_12838880 ] 

Mihirkumar Paulatsya commented on DERBY-1777:
---------------------------------------------

The status of this issue says that it has been closed.

The history also says that it was working in 10.2.4.


->But Right now I am using derby 10.4 and facing the issue.


Is there any help availabe for this??? or should I think of any workaround???

> Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1
> -----------------------------------------------------------------------------------
>
>                 Key: DERBY-1777
>                 URL: https://issues.apache.org/jira/browse/DERBY-1777
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>         Environment: WinXP SP2 dualcore 2.8 GHz 2 GBmemory
>            Reporter: Prasenjit Sarkar
>            Assignee: A B
>             Fix For: 10.1.3.2, 10.2.1.6, 10.3.1.4
>
>         Attachments: Aperi.zip, d1777_v1.patch, d1777_v2.patch, Derby1777.zip
>
>
> However, here's a query that works in 10.1.2.1 but not in 10.2.1.1  -- database can be assumed to be the same in Derby - 1205
> SELECT DISTINCT 
> ZONE.ZONE_ID ZONE_ID, 
> PORT.PORT_ID PORT_ID, 
> ENTITY_TO_PORT.TYPE, 
> ENTITY_TO_PORT.PREFIX_ID, 
> ENTITY_TO_PORT.ENTITY_ID, 
> ENTITY_TO_PORT.DISPLAY_NAME, 
> ENTITY_TO_PORT.PORT_DISPLAY_NAME, 
> PORT2ZONE.MEMBER_NAME, 
> PORT2ZONE.ZONE_MEMBER_ID, 
> PORT.PORT_NUMBER 
> FROM 
> T_RES_ZONE ZONE left outer join T_VIEW_PORT2ZONE PORT2ZONE on 
> ZONE.ZONE_ID = PORT2ZONE.ZONE_ID left outer join T_RES_PORT PORT on 
> PORT2ZONE.PORT_ID = PORT.PORT_ID left outer join T_VIEW_ENTITY_TO_PORT ENTITY_TO_PORT on 
> PORT2ZONE.PORT_ID = ENTITY_TO_PORT.PORT_ID and 
> PORT2ZONE.ZONE_ID = ENTITY_TO_PORT.ZONE_ID, T_RES_FABRIC FABRIC 
> WHERE PORT2ZONE.ZONE_ID = ZONE.ZONE_ID and 
> ZONE.FABRIC_WWN = FABRIC.FABRIC_WWN and 
> FABRIC.FABRIC_ID = 1 
> Same db as before. 
> In 10.2.1.1 it gives the following error (should this be a new issue?) 
> java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerSanL1.init(ViewerSanL1.java:1828) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.init(ViewerInit.java:41) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.main(ViewerInit.java:69) 
> Caused by: org.apache.derby.client.am.SqlException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source) 
> at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source) 
> ... 4 more 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-1777) Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1

Posted by "Rick Hillegas (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1777?page=comments#action_12435806 ] 
            
Rick Hillegas commented on DERBY-1777:
--------------------------------------

Hi Army,

Yes, this bugfix will be swept up in the next mega-merge to 10.2. Cheers-Rick

> Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1
> -----------------------------------------------------------------------------------
>
>                 Key: DERBY-1777
>                 URL: http://issues.apache.org/jira/browse/DERBY-1777
>             Project: Derby
>          Issue Type: Bug
>         Environment: WinXP SP2 dualcore 2.8 GHz 2 GBmemory
>            Reporter: Prasenjit Sarkar
>         Assigned To: A B
>             Fix For: 10.2.1.0
>
>         Attachments: Aperi.zip, d1777_v1.patch, d1777_v2.patch, Derby1777.zip
>
>
> However, here's a query that works in 10.1.2.1 but not in 10.2.1.1  -- database can be assumed to be the same in Derby - 1205
> SELECT DISTINCT 
> ZONE.ZONE_ID ZONE_ID, 
> PORT.PORT_ID PORT_ID, 
> ENTITY_TO_PORT.TYPE, 
> ENTITY_TO_PORT.PREFIX_ID, 
> ENTITY_TO_PORT.ENTITY_ID, 
> ENTITY_TO_PORT.DISPLAY_NAME, 
> ENTITY_TO_PORT.PORT_DISPLAY_NAME, 
> PORT2ZONE.MEMBER_NAME, 
> PORT2ZONE.ZONE_MEMBER_ID, 
> PORT.PORT_NUMBER 
> FROM 
> T_RES_ZONE ZONE left outer join T_VIEW_PORT2ZONE PORT2ZONE on 
> ZONE.ZONE_ID = PORT2ZONE.ZONE_ID left outer join T_RES_PORT PORT on 
> PORT2ZONE.PORT_ID = PORT.PORT_ID left outer join T_VIEW_ENTITY_TO_PORT ENTITY_TO_PORT on 
> PORT2ZONE.PORT_ID = ENTITY_TO_PORT.PORT_ID and 
> PORT2ZONE.ZONE_ID = ENTITY_TO_PORT.ZONE_ID, T_RES_FABRIC FABRIC 
> WHERE PORT2ZONE.ZONE_ID = ZONE.ZONE_ID and 
> ZONE.FABRIC_WWN = FABRIC.FABRIC_WWN and 
> FABRIC.FABRIC_ID = 1 
> Same db as before. 
> In 10.2.1.1 it gives the following error (should this be a new issue?) 
> java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerSanL1.init(ViewerSanL1.java:1828) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.init(ViewerInit.java:41) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.main(ViewerInit.java:69) 
> Caused by: org.apache.derby.client.am.SqlException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source) 
> at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source) 
> ... 4 more 

-- 
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-1777) Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1

Posted by "A B (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1777?page=comments#action_12435501 ] 
            
A B commented on DERBY-1777:
----------------------------

Thank you for the review and commit, Rick.

I know you recently sent an email about the imminent 10.2 release candidate--are you planning to do another mega-merge before the candidate?  If not, would you be willing to commit this to 10.2, as well?

Thanks for your time!

> Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1
> -----------------------------------------------------------------------------------
>
>                 Key: DERBY-1777
>                 URL: http://issues.apache.org/jira/browse/DERBY-1777
>             Project: Derby
>          Issue Type: Bug
>         Environment: WinXP SP2 dualcore 2.8 GHz 2 GBmemory
>            Reporter: Prasenjit Sarkar
>         Assigned To: A B
>             Fix For: 10.2.1.0
>
>         Attachments: Aperi.zip, d1777_v1.patch, d1777_v2.patch, Derby1777.zip
>
>
> However, here's a query that works in 10.1.2.1 but not in 10.2.1.1  -- database can be assumed to be the same in Derby - 1205
> SELECT DISTINCT 
> ZONE.ZONE_ID ZONE_ID, 
> PORT.PORT_ID PORT_ID, 
> ENTITY_TO_PORT.TYPE, 
> ENTITY_TO_PORT.PREFIX_ID, 
> ENTITY_TO_PORT.ENTITY_ID, 
> ENTITY_TO_PORT.DISPLAY_NAME, 
> ENTITY_TO_PORT.PORT_DISPLAY_NAME, 
> PORT2ZONE.MEMBER_NAME, 
> PORT2ZONE.ZONE_MEMBER_ID, 
> PORT.PORT_NUMBER 
> FROM 
> T_RES_ZONE ZONE left outer join T_VIEW_PORT2ZONE PORT2ZONE on 
> ZONE.ZONE_ID = PORT2ZONE.ZONE_ID left outer join T_RES_PORT PORT on 
> PORT2ZONE.PORT_ID = PORT.PORT_ID left outer join T_VIEW_ENTITY_TO_PORT ENTITY_TO_PORT on 
> PORT2ZONE.PORT_ID = ENTITY_TO_PORT.PORT_ID and 
> PORT2ZONE.ZONE_ID = ENTITY_TO_PORT.ZONE_ID, T_RES_FABRIC FABRIC 
> WHERE PORT2ZONE.ZONE_ID = ZONE.ZONE_ID and 
> ZONE.FABRIC_WWN = FABRIC.FABRIC_WWN and 
> FABRIC.FABRIC_ID = 1 
> Same db as before. 
> In 10.2.1.1 it gives the following error (should this be a new issue?) 
> java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerSanL1.init(ViewerSanL1.java:1828) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.init(ViewerInit.java:41) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.main(ViewerInit.java:69) 
> Caused by: org.apache.derby.client.am.SqlException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source) 
> at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source) 
> ... 4 more 

-- 
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-1777) Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1

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

A B closed DERBY-1777.
----------------------


Fix is in 10.3, 10.2, and 10.1, and I haven't heard any follow-up feedback, so marking it as closed.

> Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1
> -----------------------------------------------------------------------------------
>
>                 Key: DERBY-1777
>                 URL: http://issues.apache.org/jira/browse/DERBY-1777
>             Project: Derby
>          Issue Type: Bug
>         Environment: WinXP SP2 dualcore 2.8 GHz 2 GBmemory
>            Reporter: Prasenjit Sarkar
>         Assigned To: A B
>             Fix For: 10.2.1.6, 10.3.0.0, 10.1.3.2
>
>         Attachments: Aperi.zip, d1777_v1.patch, d1777_v2.patch, Derby1777.zip
>
>
> However, here's a query that works in 10.1.2.1 but not in 10.2.1.1  -- database can be assumed to be the same in Derby - 1205
> SELECT DISTINCT 
> ZONE.ZONE_ID ZONE_ID, 
> PORT.PORT_ID PORT_ID, 
> ENTITY_TO_PORT.TYPE, 
> ENTITY_TO_PORT.PREFIX_ID, 
> ENTITY_TO_PORT.ENTITY_ID, 
> ENTITY_TO_PORT.DISPLAY_NAME, 
> ENTITY_TO_PORT.PORT_DISPLAY_NAME, 
> PORT2ZONE.MEMBER_NAME, 
> PORT2ZONE.ZONE_MEMBER_ID, 
> PORT.PORT_NUMBER 
> FROM 
> T_RES_ZONE ZONE left outer join T_VIEW_PORT2ZONE PORT2ZONE on 
> ZONE.ZONE_ID = PORT2ZONE.ZONE_ID left outer join T_RES_PORT PORT on 
> PORT2ZONE.PORT_ID = PORT.PORT_ID left outer join T_VIEW_ENTITY_TO_PORT ENTITY_TO_PORT on 
> PORT2ZONE.PORT_ID = ENTITY_TO_PORT.PORT_ID and 
> PORT2ZONE.ZONE_ID = ENTITY_TO_PORT.ZONE_ID, T_RES_FABRIC FABRIC 
> WHERE PORT2ZONE.ZONE_ID = ZONE.ZONE_ID and 
> ZONE.FABRIC_WWN = FABRIC.FABRIC_WWN and 
> FABRIC.FABRIC_ID = 1 
> Same db as before. 
> In 10.2.1.1 it gives the following error (should this be a new issue?) 
> java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerSanL1.init(ViewerSanL1.java:1828) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.init(ViewerInit.java:41) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.main(ViewerInit.java:69) 
> Caused by: org.apache.derby.client.am.SqlException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source) 
> at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source) 
> ... 4 more 

-- 
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-1777) Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1

Posted by "A B (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1777?page=comments#action_12434795 ] 
            
A B commented on DERBY-1777:
----------------------------

> Not much of a review, know, but I did want to let you know that I did at least this much of a review. 

Thanks Bryan!  Every little bit helps :)

> Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1
> -----------------------------------------------------------------------------------
>
>                 Key: DERBY-1777
>                 URL: http://issues.apache.org/jira/browse/DERBY-1777
>             Project: Derby
>          Issue Type: Bug
>         Environment: WinXP SP2 dualcore 2.8 GHz 2 GBmemory
>            Reporter: Prasenjit Sarkar
>         Assigned To: A B
>             Fix For: 10.2.1.0
>
>         Attachments: Aperi.zip, d1777_v1.patch, d1777_v2.patch, Derby1777.zip
>
>
> However, here's a query that works in 10.1.2.1 but not in 10.2.1.1  -- database can be assumed to be the same in Derby - 1205
> SELECT DISTINCT 
> ZONE.ZONE_ID ZONE_ID, 
> PORT.PORT_ID PORT_ID, 
> ENTITY_TO_PORT.TYPE, 
> ENTITY_TO_PORT.PREFIX_ID, 
> ENTITY_TO_PORT.ENTITY_ID, 
> ENTITY_TO_PORT.DISPLAY_NAME, 
> ENTITY_TO_PORT.PORT_DISPLAY_NAME, 
> PORT2ZONE.MEMBER_NAME, 
> PORT2ZONE.ZONE_MEMBER_ID, 
> PORT.PORT_NUMBER 
> FROM 
> T_RES_ZONE ZONE left outer join T_VIEW_PORT2ZONE PORT2ZONE on 
> ZONE.ZONE_ID = PORT2ZONE.ZONE_ID left outer join T_RES_PORT PORT on 
> PORT2ZONE.PORT_ID = PORT.PORT_ID left outer join T_VIEW_ENTITY_TO_PORT ENTITY_TO_PORT on 
> PORT2ZONE.PORT_ID = ENTITY_TO_PORT.PORT_ID and 
> PORT2ZONE.ZONE_ID = ENTITY_TO_PORT.ZONE_ID, T_RES_FABRIC FABRIC 
> WHERE PORT2ZONE.ZONE_ID = ZONE.ZONE_ID and 
> ZONE.FABRIC_WWN = FABRIC.FABRIC_WWN and 
> FABRIC.FABRIC_ID = 1 
> Same db as before. 
> In 10.2.1.1 it gives the following error (should this be a new issue?) 
> java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerSanL1.init(ViewerSanL1.java:1828) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.init(ViewerInit.java:41) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.main(ViewerInit.java:69) 
> Caused by: org.apache.derby.client.am.SqlException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source) 
> at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source) 
> ... 4 more 

-- 
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-1777) Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1

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

Rick Hillegas updated DERBY-1777:
---------------------------------

    Urgency: Urgent  (was: Blocker)

> Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1
> -----------------------------------------------------------------------------------
>
>                 Key: DERBY-1777
>                 URL: http://issues.apache.org/jira/browse/DERBY-1777
>             Project: Derby
>          Issue Type: Bug
>         Environment: WinXP SP2 dualcore 2.8 GHz 2 GBmemory
>            Reporter: Prasenjit Sarkar
>             Fix For: 10.2.1.0
>
>
> However, here's a query that works in 10.1.2.1 but not in 10.2.1.1  -- database can be assumed to be the same in Derby - 1205
> SELECT DISTINCT 
> ZONE.ZONE_ID ZONE_ID, 
> PORT.PORT_ID PORT_ID, 
> ENTITY_TO_PORT.TYPE, 
> ENTITY_TO_PORT.PREFIX_ID, 
> ENTITY_TO_PORT.ENTITY_ID, 
> ENTITY_TO_PORT.DISPLAY_NAME, 
> ENTITY_TO_PORT.PORT_DISPLAY_NAME, 
> PORT2ZONE.MEMBER_NAME, 
> PORT2ZONE.ZONE_MEMBER_ID, 
> PORT.PORT_NUMBER 
> FROM 
> T_RES_ZONE ZONE left outer join T_VIEW_PORT2ZONE PORT2ZONE on 
> ZONE.ZONE_ID = PORT2ZONE.ZONE_ID left outer join T_RES_PORT PORT on 
> PORT2ZONE.PORT_ID = PORT.PORT_ID left outer join T_VIEW_ENTITY_TO_PORT ENTITY_TO_PORT on 
> PORT2ZONE.PORT_ID = ENTITY_TO_PORT.PORT_ID and 
> PORT2ZONE.ZONE_ID = ENTITY_TO_PORT.ZONE_ID, T_RES_FABRIC FABRIC 
> WHERE PORT2ZONE.ZONE_ID = ZONE.ZONE_ID and 
> ZONE.FABRIC_WWN = FABRIC.FABRIC_WWN and 
> FABRIC.FABRIC_ID = 1 
> Same db as before. 
> In 10.2.1.1 it gives the following error (should this be a new issue?) 
> java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerSanL1.init(ViewerSanL1.java:1828) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.init(ViewerInit.java:41) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.main(ViewerInit.java:69) 
> Caused by: org.apache.derby.client.am.SqlException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source) 
> at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source) 
> ... 4 more 

-- 
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-1777) Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1

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

A B resolved DERBY-1777.
------------------------

    Fix Version/s: 10.3.0.0
       Resolution: Fixed
       Derby Info: [Regression]  (was: [Patch Available, Regression])

Patch committed to trunk and 10.1 and mega-merged to 10.2, so updating Fixin, unchecking "Patch Available", and resolving the issue.

> Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1
> -----------------------------------------------------------------------------------
>
>                 Key: DERBY-1777
>                 URL: http://issues.apache.org/jira/browse/DERBY-1777
>             Project: Derby
>          Issue Type: Bug
>         Environment: WinXP SP2 dualcore 2.8 GHz 2 GBmemory
>            Reporter: Prasenjit Sarkar
>         Assigned To: A B
>             Fix For: 10.1.3.2, 10.2.1.0, 10.3.0.0
>
>         Attachments: Aperi.zip, d1777_v1.patch, d1777_v2.patch, Derby1777.zip
>
>
> However, here's a query that works in 10.1.2.1 but not in 10.2.1.1  -- database can be assumed to be the same in Derby - 1205
> SELECT DISTINCT 
> ZONE.ZONE_ID ZONE_ID, 
> PORT.PORT_ID PORT_ID, 
> ENTITY_TO_PORT.TYPE, 
> ENTITY_TO_PORT.PREFIX_ID, 
> ENTITY_TO_PORT.ENTITY_ID, 
> ENTITY_TO_PORT.DISPLAY_NAME, 
> ENTITY_TO_PORT.PORT_DISPLAY_NAME, 
> PORT2ZONE.MEMBER_NAME, 
> PORT2ZONE.ZONE_MEMBER_ID, 
> PORT.PORT_NUMBER 
> FROM 
> T_RES_ZONE ZONE left outer join T_VIEW_PORT2ZONE PORT2ZONE on 
> ZONE.ZONE_ID = PORT2ZONE.ZONE_ID left outer join T_RES_PORT PORT on 
> PORT2ZONE.PORT_ID = PORT.PORT_ID left outer join T_VIEW_ENTITY_TO_PORT ENTITY_TO_PORT on 
> PORT2ZONE.PORT_ID = ENTITY_TO_PORT.PORT_ID and 
> PORT2ZONE.ZONE_ID = ENTITY_TO_PORT.ZONE_ID, T_RES_FABRIC FABRIC 
> WHERE PORT2ZONE.ZONE_ID = ZONE.ZONE_ID and 
> ZONE.FABRIC_WWN = FABRIC.FABRIC_WWN and 
> FABRIC.FABRIC_ID = 1 
> Same db as before. 
> In 10.2.1.1 it gives the following error (should this be a new issue?) 
> java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerSanL1.init(ViewerSanL1.java:1828) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.init(ViewerInit.java:41) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.main(ViewerInit.java:69) 
> Caused by: org.apache.derby.client.am.SqlException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source) 
> at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source) 
> ... 4 more 

-- 
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-1777) Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1

Posted by "Prasenjit Sarkar (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1777?page=comments#action_12433276 ] 
            
Prasenjit Sarkar commented on DERBY-1777:
-----------------------------------------

I have attached the Aperi database.

Alternatively, you could have also renamed Aperi to TPCDB in order to use the db attached to Derby-1205, but at this point, it might be better to use the Aperi db..


> Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1
> -----------------------------------------------------------------------------------
>
>                 Key: DERBY-1777
>                 URL: http://issues.apache.org/jira/browse/DERBY-1777
>             Project: Derby
>          Issue Type: Bug
>         Environment: WinXP SP2 dualcore 2.8 GHz 2 GBmemory
>            Reporter: Prasenjit Sarkar
>             Fix For: 10.2.1.0
>
>         Attachments: Aperi.zip, Derby1777.zip
>
>
> However, here's a query that works in 10.1.2.1 but not in 10.2.1.1  -- database can be assumed to be the same in Derby - 1205
> SELECT DISTINCT 
> ZONE.ZONE_ID ZONE_ID, 
> PORT.PORT_ID PORT_ID, 
> ENTITY_TO_PORT.TYPE, 
> ENTITY_TO_PORT.PREFIX_ID, 
> ENTITY_TO_PORT.ENTITY_ID, 
> ENTITY_TO_PORT.DISPLAY_NAME, 
> ENTITY_TO_PORT.PORT_DISPLAY_NAME, 
> PORT2ZONE.MEMBER_NAME, 
> PORT2ZONE.ZONE_MEMBER_ID, 
> PORT.PORT_NUMBER 
> FROM 
> T_RES_ZONE ZONE left outer join T_VIEW_PORT2ZONE PORT2ZONE on 
> ZONE.ZONE_ID = PORT2ZONE.ZONE_ID left outer join T_RES_PORT PORT on 
> PORT2ZONE.PORT_ID = PORT.PORT_ID left outer join T_VIEW_ENTITY_TO_PORT ENTITY_TO_PORT on 
> PORT2ZONE.PORT_ID = ENTITY_TO_PORT.PORT_ID and 
> PORT2ZONE.ZONE_ID = ENTITY_TO_PORT.ZONE_ID, T_RES_FABRIC FABRIC 
> WHERE PORT2ZONE.ZONE_ID = ZONE.ZONE_ID and 
> ZONE.FABRIC_WWN = FABRIC.FABRIC_WWN and 
> FABRIC.FABRIC_ID = 1 
> Same db as before. 
> In 10.2.1.1 it gives the following error (should this be a new issue?) 
> java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerSanL1.init(ViewerSanL1.java:1828) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.init(ViewerInit.java:41) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.main(ViewerInit.java:69) 
> Caused by: org.apache.derby.client.am.SqlException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source) 
> at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source) 
> ... 4 more 

-- 
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-1777) Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1

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

A B updated DERBY-1777:
-----------------------

    Attachment: d1777_v1.patch

I ran the ViewerInit program attached to this issue and I hit two different NPE's.  For more details, see "Details" section below.

The short story is that I was able to determine the cause of the NPEs and have a patch, d1777_v1.patch, to resolve them.  There is, however, another issue that prevents the ViewerInit program from running to completion (more on that below).  Nonetheless, d1777_v1.patch is at least a step in the right direction as it corrects the two compile-time NPEs described below.

I ran derbyall on Red Hat Linux with ibm142 and sane jars, and I saw the following failure in jdbcapi/secureUsers1.sql:

33a34,37
> do_ypcall: clnt_call: RPC: Unable to receive; errno = Connection refused
> YPBINDPROC_DOMAIN: Domain not bound
> do_ypcall: clnt_call: RPC: Unable to receive; errno = Connection refused
> YPBINDPROC_DOMAIN: Domain not bound
Test Failed.

When I ran the test standalone it passes against all frameworks, so I'm not sure what happened.  But in any event this does not appear to be related to my changes.

So I'm posting d1777_v1.patch for review.  Despite my efforts I haven't been able to come up with a test case that can go into derbyall, but I'm still trying.  In the meantime, any comments/feedback would be appreciated.

--------
Details
--------

The first NPE came from BinaryRelationalOperatorNode.getScopedOperand() and was caused by the fact that, when scoping a predicate for pushing, Derby couldn't find the target result column to which the scoped predicate was supposed to point.  I confirmed this by running in SANE mode, where instead of an NPE I saw the following ASSERT FAILURE:

ERROR XJ001: Java exception: 'ASSERT FAILED Failed to locate scope target result column when trying to scope operand 'ENTITY_TO_PORT.PORT_ID'.: org.apache.derby.shared.common.sanity.AssertFailure'.

An example query that leads to this NPE/assertion failure is as follows:

  SELECT DISTINCT

     ZONE.ZONE_ID ZONE_ID,
     PORT.PORT_ID PORT_ID,
     ENTITY_TO_PORT.TYPE,
     ENTITY_TO_PORT.PREFIX_ID,
     ENTITY_TO_PORT.ENTITY_ID,
     ENTITY_TO_PORT.DISPLAY_NAME,
     ENTITY_TO_PORT.PORT_DISPLAY_NAME,
     PORT2ZONE.MEMBER_NAME,
     PORT2ZONE.ZONE_MEMBER_ID,
     PORT.PORT_NUMBER

  FROM

     T_RES_ZONE ZONE
       left outer join
           T_VIEW_PORT2ZONE PORT2ZONE
       on
           ZONE.ZONE_ID = PORT2ZONE.ZONE_ID
     left outer join
           T_RES_PORT PORT
       on
           PORT2ZONE.PORT_ID = PORT.PORT_ID
     left outer join
           T_VIEW_ENTITY_TO_PORT ENTITY_TO_PORT
       on
           PORT2ZONE.PORT_ID = ENTITY_TO_PORT.PORT_ID
           and PORT2ZONE.ZONE_ID = ENTITY_TO_PORT.ZONE_ID,
     T_RES_FABRIC FABRIC

  WHERE

     PORT2ZONE.ZONE_ID = ZONE.ZONE_ID
     and ZONE.FABRIC_WWN = FABRIC.FABRIC_WWN
     and FABRIC.FABRIC_ID = ?

When scoping predicates for this query, we run into a situation where the target result column corresponds to a subquery that has been flattened.  Since the process of flattening a query leads to the creation of "redundant" result columns, we have to correctly handle the redundant result columns in order to find the scope target column.  That said, the logic for redundant result columns is in ColumnReference.getSourceResultSet(int[]):

        rcExpr = rc.getExpression();
        colNum[0] = getColumnNumber();

        while ((rcExpr != null) && (rcExpr instanceof ColumnReference))
        {
            colNum[0] = ((ColumnReference)rcExpr).getColumnNumber();
            rc = ((ColumnReference)rcExpr).getSource();

            /* If "rc" is redundant then that means ...
            ...
        }

The thing to note here is that the logic for handling redundant rc's is inside the "while" loop.  This leads to an edge case that the above code won't catch: namely, if the original "rc" as it exists BEFORE we enter the "while" loop is redundant, we'll only execute the redundancy logic IF rcExpr is an instance of ColumnReference.  But there's no guarantee that rcExpr will actually be a ColumnReference--and if it's not, we'll incorrectly skip the logic for handling the redundant rc.  That in turn means we'll be unable to find the actual source result set, and thus the method will return null, leading to the above-mentioned assertion failure/NPE.

To fix this, I made a small change to ensure that the redundancy logic always get executed if rc is redundant:

-        while ((rcExpr != null) && (rcExpr instanceof ColumnReference))
+        /* We have to make sure we enter this loop if rc is redundant,
+         * so that we can navigate down to the actual source result
+         * set (DERBY-1777). If rc *is* redundant, then rcExpr is not
+         * guaranteed to be a ColumnReference, so we have to check
+         * for that case inside the loop.
+         */
+        while ((rcExpr != null) &&
+            (rc.isRedundant() || (rcExpr instanceof ColumnReference)))
         {
-            colNum[0] = ((ColumnReference)rcExpr).getColumnNumber();
-            rc = ((ColumnReference)rcExpr).getSource();
+            if (rcExpr instanceof ColumnReference)
+            {
+                colNum[0] = ((ColumnReference)rcExpr).getColumnNumber();
+                rc = ((ColumnReference)rcExpr).getSource();
+            }

             /* If "rc" is redundant then that means ...
             ...
         }
 
Once this change was made, the first NPE went away and the ViewerInit program ran a little longer, then failed with a second NPE.  As it turns out, the second NPE is intermittent and very time-sensitive.  When it happens, the failure occurs because the "outerCost" field that is passed to a query subtree from OptimizerImpl.costPermutation() is null:

        /*
        ** Get the cost of the outer plan so far.  This gives us the current
        ** estimated rows, ordering, etc.
        */
        CostEstimate outerCost;
        if (joinPosition == 0)
        {
            outerCost = outermostCostEstimate;
        }
        else
        {
            /*
            ** NOTE: This is somewhat problematic.  We assume here that the
            ** outer cost from the best access path for the outer table
            ** is OK to use even when costing the sort avoidance path for
            ** the inner table.  This is probably OK, since all we use
            ** from the outer cost is the row count.
            */
            outerCost =
                optimizableList.getOptimizable(
                    proposedJoinOrder[joinPosition - 1]).
                        getBestAccessPath().getCostEstimate();
        }

At this point we expect outerCost to be non-null, but it turns out that there's a bug elsewhere in the code that leads to a null outerCost here, which is then passed down the tree:

        /* Cost the optimizable at the current join position */
        optimizable.optimizeIt(this,
                               predicateList,
                               outerCost,
                               currentRowOrdering);

Any attempts to access outerCost further down the tree will then result in an NPE.

An example of a query that (intermittently) shows this NPE (against the "Aperi" database):

  SELECT DISTINCT

     ''server:'' || CAST(HOST2PORT.HOST_ID as CHAR) ENTITY_KEY,
     PORT2ZONE.ZONE_ID ZONE_ID

  FROM

     T_VIEW_VHOST2PORT HOST2PORT,
     T_VIEW_PORT2ZONE PORT2ZONE

  WHERE

     HOST2PORT.HOST_ID = ?
     and HOST2PORT.PORT_ID = PORT2ZONE.PORT_ID


The actual bug is in the getNextPermutation() method of the same class (OptimizerImpl):

    // If we were in the middle of a join order when this
    // happened, then reset the join order before jumping.
    // The call to rewindJoinOrder() here will put joinPosition
    // back to 0.  But that said, we'll then end up incrementing 
    // joinPosition before we start looking for the next join
    // order (see below), which means we need to set it to -1
    // here so that it gets incremented to "0" and then
    // processing can continue as normal from there.  Note:
    // we don't need to set reloadBestPlan to true here
    // because we only get here if we have *not* found a
    // best plan yet.
    if (joinPosition > 0)
    {
        rewindJoinOrder();
        joinPosition = -1;
    }

The problem with this code is that it only rewinds the join order if joinPosition is GREATER than 0--but a joinPosition that is EQUAL to zero indicates that we're "in the middle of a join order", as well, and thus we need to rewind in that case, too.  If we don't rewind, we can end up with an invalid join order and that indirectly leads to the NPE mentioned above.

As a brief example, assume we have an optimizable list with two Optimizables in it, O1 and O2.  Let's also assume that we've just finished optimizing the first one.  So the current join order will be [O1, -].

Then timeout occurs so we enter the block of code in which the above "if" statement sits.  At that point joinPosition will be "0" because we just found the best cost for the first optimizable and we haven't incremented joinPosition yet.  We'll then "jump" to what we think is going to be the best join order, which we call "firstLookOrder" (see the code for more details).  Let's assume firstLookOrder is [O2,O1].  Now, because joinPosition is 0 we won't enter the above the "if" block and thus we will NOT rewind the join order.  So we'll then increment joinPosition to "1" and we'll choose the optimizable at firstLookOrder[joinPosition] as the next one in the current join order.  firstLookOrder[1] returns optimizable "O1", which means that, since we didn't "rewind" the join order, our new current join order becomes [O1, O1]--which is not a valid join order.

The reason this leads to an NPE is that whenever an optimizable is placed, the best cost estimate for that optimizable is set to null.  Thus when we place O1 at position "1" we set it's best access path's cost estimate to null.  Then later, when we get to the costPermutation() code shown above, we take the best cost of the optimizable at position "0" and use that as the "outerCost" for the optimizable at position "1".  But in this  those two optimizables are the SAME--namley, O1.  So we effectively nulled out O1's best cost, then we used that very same (null) cost as the "outerCost" for optimizing O1.  When that outerCost is eventually referenced later, we end up with the NPE.

All of that said, note the above "if" statement is only executed in situations where we have an optimizer timeout at a very particular point during optimization.  This is why the NPE is intermittent, and it also explains why it\ won't reproduce if optimizer timeout is disabled.

The fix for this NPE is a one-line change (plus relevant comment updates):

-    if (joinPosition > 0)
+    /* If we already assigned at least one position in the
+     * join order when this happened (i.e. if joinPosition
+     * is greater than *or equal* to zero; DERBY-1777), then 
+     * reset the join order before jumping.  The call to
+     * rewindJoinOrder() here will put joinPosition back
+     * to 0.  But that said, we'll then end up incrementing
+     * joinPosition before we start looking for the next
+     * join order (see below), which means we need to set
+     * it to -1 here so that it gets incremented to "0" and
+     * then processing can continue as normal from there.  
+     * Note: we don't need to set reloadBestPlan to true
+     * here because we only get here if we have *not* found
+     * a best plan yet.
+     */
+    if (joinPosition >= 0)

I'm attaching a patch, d1777_v1.patch, that makes these two changes to resolve the NPE's discussed here.  Note, though, that I still need to add an appropriate test case to derbyall.  This test case will only be for the first NPE; the second NPE is timing-dependent and will not reproduce with "noTimeout" set to true, so I don't think we'll have a test case for that one.

Also note: with d1777_v1.patch applied, the repro program attached to this Jira still will not run without error (sigh).  The two NPE's disappear and the test program gets to the "L2" queries, but at that point the queries take a very (very) long time to compile and then fail with an ASSERT failure at execution time:

org.apache.derby.shared.common.sanity.AssertFailure: ASSERT FAILED 
sourceResultSetNumber expected to be >= 0 for SWITCH.SWITCH_ID

That is (of course) with SANE jars; I don't know what that translates into for INSANE jars because I haven't had the time to re-run the queries with sane jars.  It could end up being an execution-time (as opposed to a compile-time) NPE but I don't that for sure.  I'm still investigating.

> Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1
> -----------------------------------------------------------------------------------
>
>                 Key: DERBY-1777
>                 URL: http://issues.apache.org/jira/browse/DERBY-1777
>             Project: Derby
>          Issue Type: Bug
>         Environment: WinXP SP2 dualcore 2.8 GHz 2 GBmemory
>            Reporter: Prasenjit Sarkar
>         Assigned To: A B
>             Fix For: 10.2.1.0
>
>         Attachments: Aperi.zip, d1777_v1.patch, Derby1777.zip
>
>
> However, here's a query that works in 10.1.2.1 but not in 10.2.1.1  -- database can be assumed to be the same in Derby - 1205
> SELECT DISTINCT 
> ZONE.ZONE_ID ZONE_ID, 
> PORT.PORT_ID PORT_ID, 
> ENTITY_TO_PORT.TYPE, 
> ENTITY_TO_PORT.PREFIX_ID, 
> ENTITY_TO_PORT.ENTITY_ID, 
> ENTITY_TO_PORT.DISPLAY_NAME, 
> ENTITY_TO_PORT.PORT_DISPLAY_NAME, 
> PORT2ZONE.MEMBER_NAME, 
> PORT2ZONE.ZONE_MEMBER_ID, 
> PORT.PORT_NUMBER 
> FROM 
> T_RES_ZONE ZONE left outer join T_VIEW_PORT2ZONE PORT2ZONE on 
> ZONE.ZONE_ID = PORT2ZONE.ZONE_ID left outer join T_RES_PORT PORT on 
> PORT2ZONE.PORT_ID = PORT.PORT_ID left outer join T_VIEW_ENTITY_TO_PORT ENTITY_TO_PORT on 
> PORT2ZONE.PORT_ID = ENTITY_TO_PORT.PORT_ID and 
> PORT2ZONE.ZONE_ID = ENTITY_TO_PORT.ZONE_ID, T_RES_FABRIC FABRIC 
> WHERE PORT2ZONE.ZONE_ID = ZONE.ZONE_ID and 
> ZONE.FABRIC_WWN = FABRIC.FABRIC_WWN and 
> FABRIC.FABRIC_ID = 1 
> Same db as before. 
> In 10.2.1.1 it gives the following error (should this be a new issue?) 
> java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerSanL1.init(ViewerSanL1.java:1828) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.init(ViewerInit.java:41) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.main(ViewerInit.java:69) 
> Caused by: org.apache.derby.client.am.SqlException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source) 
> at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source) 
> ... 4 more 

-- 
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-1777) Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1

Posted by "Bryan Pendleton (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1777?page=comments#action_12434780 ] 
            
Bryan Pendleton commented on DERBY-1777:
----------------------------------------

Don't have much to offer, but I read the code and I read your writeup 
and I don't see any improvements to suggest to your change. Not much of a review,
I know, but I did want to let you know that I did at least this much of a review.


> Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1
> -----------------------------------------------------------------------------------
>
>                 Key: DERBY-1777
>                 URL: http://issues.apache.org/jira/browse/DERBY-1777
>             Project: Derby
>          Issue Type: Bug
>         Environment: WinXP SP2 dualcore 2.8 GHz 2 GBmemory
>            Reporter: Prasenjit Sarkar
>         Assigned To: A B
>             Fix For: 10.2.1.0
>
>         Attachments: Aperi.zip, d1777_v1.patch, d1777_v2.patch, Derby1777.zip
>
>
> However, here's a query that works in 10.1.2.1 but not in 10.2.1.1  -- database can be assumed to be the same in Derby - 1205
> SELECT DISTINCT 
> ZONE.ZONE_ID ZONE_ID, 
> PORT.PORT_ID PORT_ID, 
> ENTITY_TO_PORT.TYPE, 
> ENTITY_TO_PORT.PREFIX_ID, 
> ENTITY_TO_PORT.ENTITY_ID, 
> ENTITY_TO_PORT.DISPLAY_NAME, 
> ENTITY_TO_PORT.PORT_DISPLAY_NAME, 
> PORT2ZONE.MEMBER_NAME, 
> PORT2ZONE.ZONE_MEMBER_ID, 
> PORT.PORT_NUMBER 
> FROM 
> T_RES_ZONE ZONE left outer join T_VIEW_PORT2ZONE PORT2ZONE on 
> ZONE.ZONE_ID = PORT2ZONE.ZONE_ID left outer join T_RES_PORT PORT on 
> PORT2ZONE.PORT_ID = PORT.PORT_ID left outer join T_VIEW_ENTITY_TO_PORT ENTITY_TO_PORT on 
> PORT2ZONE.PORT_ID = ENTITY_TO_PORT.PORT_ID and 
> PORT2ZONE.ZONE_ID = ENTITY_TO_PORT.ZONE_ID, T_RES_FABRIC FABRIC 
> WHERE PORT2ZONE.ZONE_ID = ZONE.ZONE_ID and 
> ZONE.FABRIC_WWN = FABRIC.FABRIC_WWN and 
> FABRIC.FABRIC_ID = 1 
> Same db as before. 
> In 10.2.1.1 it gives the following error (should this be a new issue?) 
> java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerSanL1.init(ViewerSanL1.java:1828) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.init(ViewerInit.java:41) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.main(ViewerInit.java:69) 
> Caused by: org.apache.derby.client.am.SqlException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source) 
> at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source) 
> ... 4 more 

-- 
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-1777) Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1

Posted by "A B (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1777?page=comments#action_12433270 ] 
            
A B commented on DERBY-1777:
----------------------------

When I try to run the repro I get the following error:

java.sql.SQLException: The connection was refused because the database Aperi was not found.

I did a quick grep of the java files and there don't appear to be any occurrences of "create" in any of them.  Do you have the "Aperi" database somewhere?  Sorry if I just overlooked something...

> Regression: query works in 10.1.2.1 but fails with NullPointerException in 10.2.1.1
> -----------------------------------------------------------------------------------
>
>                 Key: DERBY-1777
>                 URL: http://issues.apache.org/jira/browse/DERBY-1777
>             Project: Derby
>          Issue Type: Bug
>         Environment: WinXP SP2 dualcore 2.8 GHz 2 GBmemory
>            Reporter: Prasenjit Sarkar
>             Fix For: 10.2.1.0
>
>         Attachments: Derby1777.zip
>
>
> However, here's a query that works in 10.1.2.1 but not in 10.2.1.1  -- database can be assumed to be the same in Derby - 1205
> SELECT DISTINCT 
> ZONE.ZONE_ID ZONE_ID, 
> PORT.PORT_ID PORT_ID, 
> ENTITY_TO_PORT.TYPE, 
> ENTITY_TO_PORT.PREFIX_ID, 
> ENTITY_TO_PORT.ENTITY_ID, 
> ENTITY_TO_PORT.DISPLAY_NAME, 
> ENTITY_TO_PORT.PORT_DISPLAY_NAME, 
> PORT2ZONE.MEMBER_NAME, 
> PORT2ZONE.ZONE_MEMBER_ID, 
> PORT.PORT_NUMBER 
> FROM 
> T_RES_ZONE ZONE left outer join T_VIEW_PORT2ZONE PORT2ZONE on 
> ZONE.ZONE_ID = PORT2ZONE.ZONE_ID left outer join T_RES_PORT PORT on 
> PORT2ZONE.PORT_ID = PORT.PORT_ID left outer join T_VIEW_ENTITY_TO_PORT ENTITY_TO_PORT on 
> PORT2ZONE.PORT_ID = ENTITY_TO_PORT.PORT_ID and 
> PORT2ZONE.ZONE_ID = ENTITY_TO_PORT.ZONE_ID, T_RES_FABRIC FABRIC 
> WHERE PORT2ZONE.ZONE_ID = ZONE.ZONE_ID and 
> ZONE.FABRIC_WWN = FABRIC.FABRIC_WWN and 
> FABRIC.FABRIC_ID = 1 
> Same db as before. 
> In 10.2.1.1 it gives the following error (should this be a new issue?) 
> java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerSanL1.init(ViewerSanL1.java:1828) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.init(ViewerInit.java:41) 
> at org.eclipse.aperi.server.guireq.topology.views.ViewerInit.main(ViewerInit.java:69) 
> Caused by: org.apache.derby.client.am.SqlException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerExceptionXJ001.U 
> at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source) 
> at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source) 
> at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source) 
> at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source) 
> at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source) 
> ... 4 more 

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