db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Myrna van Lunteren (JIRA)" <j...@apache.org>
Subject [jira] Closed: (DERBY-1604) NPE in ij while attempting to execute a query after a failed named connection creation
Date Thu, 31 May 2007 03:08:17 GMT

     [ https://issues.apache.org/jira/browse/DERBY-1604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Myrna van Lunteren closed DERBY-1604.
-------------------------------------

    Resolution: Cannot Reproduce

I tried these steps, (except different db name) but could not see the problem.
Although this was on windows XP, not 2000. Also tried with 10.0.2.1; same results.

ij version 10.3
ij> connect 'jdbc:derby:brdb;create=true' user 'raj' as raj;
ij> disconnect;
ij> exit;
$ >java org.apache.derby.tools.ij
ij version 10.3
ij> connect 'jdbc:derby:brdb;create=true' user 'raj' as raj;
WARNING 01J01: Database 'brdb' not created, connection made to existing database
 instead.
ij> show connections;
RAJ* -  jdbc:derby:brdb
* = current connection
ij> connect 'jdbc:derby:brdb;create=true' user 'raj2' as raj2;
WARNING 01J01: Database 'brdb' not created, connection made to existing database
 instead.
ij(RAJ2)> show connections;
RAJ -   jdbc:derby:brdb
RAJ2* -         jdbc:derby:brdb
* = current connection
ij(RAJ2)> disconnect;
ij> show connections;
RAJ -   jdbc:derby:brdb
No current connection
ij> connect 'jdbc:derby:brdb;create=true' user 'raj' as raj;
IJ ERROR: Already have a connection named RAJ
ij> show connections;
RAJ -   jdbc:derby:brdb
No current connection

> NPE  in ij while attempting to execute a query after a failed named connection creation
> ---------------------------------------------------------------------------------------
>
>                 Key: DERBY-1604
>                 URL: https://issues.apache.org/jira/browse/DERBY-1604
>             Project: Derby
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 10.0.2.0, 10.0.2.1, 10.0.2.2, 10.1.1.0, 10.1.2.1, 10.1.3.1
>         Environment: Windows 2000, jdk 1.5
>            Reporter: Rajesh Kartha
>            Priority: Minor
>
>  I came across this by chance. While attempting to execute a statement after a failed
named connection, ij throws a NPE. Following are ij steps
> that reproduces this error:
> ij version 10.2
> ij> connect 'jdbc:derby:grntrvkdb;create=true' user 'raj' as raj;
> WARNING 01J01: Database 'grntrvkdb' not created, connection made to existing database
instead.
> ij> show connections;
> RAJ* -  jdbc:derby:grntrvkdb
> * = current connection
> ij> connect 'jdbc:derby:grntrvkdb;create=true' user 'raj2' as raj2;
> WARNING 01J01: Database 'grntrvkdb' not created, connection made to existing database
instead.
> ij(RAJ2)> show connections;
> RAJ -   jdbc:derby:grntrvkdb
> RAJ2* -         jdbc:derby:grntrvkdb
> * = current connection
> ij(RAJ2)> disconnect;
> ij> show connections;
> RAJ -   jdbc:derby:grntrvkdb
> No current connection
> ij> connect 'jdbc:derby:grntrvkdb;create=true' user 'raj' as raj;
> IJ ERROR: Already have a connection named RAJ
> org.apache.derby.impl.tools.ij.ijException: Already have a connection named RAJ
>         at org.apache.derby.impl.tools.ij.ijException.alreadyHaveConnectionNamed
> (ijException.java:78)
>         at org.apache.derby.impl.tools.ij.ij.addSession(ij.java:418)
>         at org.apache.derby.impl.tools.ij.ij.dynamicConnection(ij.java:875)
>         at org.apache.derby.impl.tools.ij.ij.ConnectStatement(ij.java:723)
>         at org.apache.derby.impl.tools.ij.ij.ijStatement(ij.java:553)
>         at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:289)
>         at org.apache.derby.impl.tools.ij.Main.go(Main.java:207)
>         at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:173)
>         at org.apache.derby.impl.tools.ij.Main14.main(Main14.java:55)
>         at org.apache.derby.tools.ij.main(ij.java:60)
> ij> show connections;
> RAJ -   jdbc:derby:grntrvkdb
> No current connection
> ij> select * from sys.systables;
> JAVA ERROR: java.lang.NullPointerException
> java.lang.NullPointerException
>         at org.apache.derby.impl.tools.ij.ij.executeImmediate(ij.java:289)
>         at org.apache.derby.impl.tools.ij.utilMain.doCatch(utilMain.java:433)
>         at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:312)
>         at org.apache.derby.impl.tools.ij.Main.go(Main.java:207)
>         at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:173)
>         at org.apache.derby.impl.tools.ij.Main14.main(Main14.java:55)
>         at org.apache.derby.tools.ij.main(ij.java:60)
> ij>
> I expected an error like "IJ ERROR: Unable to establish connection"  since there does
not exist any connection
> to execute this statement.

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


Mime
View raw message