This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes Database Connection Pooling java.lang.NullPointerException. Help please Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Database Connection Pooling java.lang.NullPointerException. Help please" Watch "Database Connection Pooling java.lang.NullPointerException. Help please" New topic
Author

Database Connection Pooling java.lang.NullPointerException. Help please

agustinus lumbantoruan
Ranch Hand

Joined: Jul 17, 2010
Posts: 56
Dear Pros and Noobs

I am stuck with the Database Connection Pooling problem.
I have created and tested a Database Pooling successfully.
But recently I have faced a problem saying


Could anyone help me to solve the problem please. Before I post this, I have tried to find the answer in the Internet and coderanch but the solution didn't work for mine.
www.coderanch.com/t/.../Connection-Pooling-null-pointer-exception
http://www.coderanch.com/t/474377/Tomcat/Tomcat-Connection-Pooling

Context.xml
I put the context.xml in the C:\Users\Bio\.netbeans\6.9\apache-tomcat-6.0.26_base\conf folder.


ProfileController.java
In ProfileController.java, I open and close the Database Connection once.
The first connection I use it to retrieve the profile information in line 83.
The second connection I use it to retrieve the user's profile comments in line 99


Thank you guys.

God Bless
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Database Connection Pooling java.lang.NullPointerException. Help please
 
It's not a secret anymore!