File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes JDBC Connection problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC Connection problem" Watch "JDBC Connection problem" New topic
Author

JDBC Connection problem

himanshu patel
Ranch Hand

Joined: Feb 03, 2003
Posts: 205
Hello Everybody,
I am getting one problem in J2EE application.
I am using Oracle OC4j.
I have hundreds of method which opens Connection (JDBC) object and explicitly closes at the end of method inside finally {} block. It works fine for almost all methods. But for some method I am getting following errors messages.
……
DriverManagerConnection PoolConnection not closed, check your code!
(Use -Djdbc.connection.debug=true to find out where the leaked connection was created)
……..
Despite of this error, the method works as expected. I do not understand why this happens when
I am releasing connection object at the end of every method inside finally {} block. And to my surprise I am getting this error only for 1-2 methods. I have used same Connection Handling mechanism for all methods.
Could anyone help me to sort out this problem.
Any suggestion is highly appreciated.
Thanks
Himanshu


If you want to become a rich, do not work for others but make others to work for you.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JDBC Connection problem
 
Similar Threads
Problem with "Try" blocks and variables - JDBC 2a
DriverManagerConnection PoolConnection Error
ejb Stateless SessionBean send JMS msg's
Please help clarify this!
Class.forName error