• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Please Help! I Do Not See the Problem. Tomcat Connection Configuration Problem!

 
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I am in trouble. Your help would be greatly appreciated.

I tried to retrieve some data from the Oracle to test if my connection pool configuration is done correctly. I got 'Null Pointer Exception' thrown on this statement:


The query string is defined; therefore, query is not null. Apparently, the 'conn' object is a null. I have been using a DBConnection.java class to get a 'conn' object from the connection pool for quite some time which using the MySQL. Therefore, my configuration for using the Oracle is most likely wrong.

I am using the Tomcat 5.0.27, Oracle 10i, j2sdk1.4.2, and Windows XP. Here is my configuration:

Step 1.

Jakarta-Commons DBCP 1.2.1
Jakarta-Commons Collections 2.1.1
Jakarta-Commons Pool 1.2

These jar files are installed in $CATALINA_HOME/common/lib directory

Step 2.

placed the classes12.jar in the $CATALINA_HOME/common/lib directory

Step 3. C:\jakarta-tomcat-5.0.27\conf\server.xml configuration

Note: I added the following code in the <Host> element just before the closing </Host> tag.


Step 4. web.xml Configuration (the one in MyApp/WEB-INF directory)

add these lines after the <taglib> element



and my DBConnection.java class looks like:

[ September 14, 2004: Message edited by: Mike Curwen ]
 
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I am using the Tomcat 5.0.27, Oracle 10i, j2sdk1.4.2, and Windows XP.



In tomcat 5.0.27 have Web Administrator Section,

you should be config in Administrator Section ...

It's easy and correctly.
 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Where is the Web Administrator Section? How do I use it? Please help me.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Documentation for the Web Administrator and Manager applications was installed as part of your normal Tomcat installation. If you can see the normal Tomcat startup page - look on the left side for Tomcat Documentation.
Bill
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic