IntelliJ Java IDE
The moose likes JDBC and the fly likes very perplexing connection problem Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JDBC
Reply Bookmark "very perplexing connection problem" Watch "very perplexing connection problem" New topic
Author

very perplexing connection problem

Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
I have a very strange problem with some code. The code is as follows:
<font size=+1>

</font>
The method that calls this has code that goes through the List and prints out what is in it. When the code runs, the only statement that appears inside the list is "before connection." If I put the return connection from the getConnection method in a finally block, then I get connection is null. That makes it appear that an exception is being thrown. Now here is the tricky part. The code that calls this method catches all exceptions and prints them out. It is not catching any exceptions. Does anyone have any ideas on this?


Matthew Phillips
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
It appears that I may have a rights issue with the database. I placed a try/catch block around connection = getConnection() and added the exception to my List. It appears that it is not recognizing the login password as valid. If I find anything else, I will post it here so that others may learn from my mistakes.
 
 
subject: very perplexing connection problem
 
Threads others viewed
Setting ResultSet into an ArryList
auto commit within JTS transaction
TableModel-unable to locate error
load: GetMenuGui.class is not public or has no public constructor.
Static Connection object in BaseDAO class - Bad?
Two Laptop Bag

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture