File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes tomcat and jndi resource 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 » Products » Tomcat
Bookmark "tomcat and jndi resource" Watch "tomcat and jndi resource" New topic
Author

tomcat and jndi resource

shankar vembu
Ranch Hand

Joined: May 10, 2001
Posts: 309
everything was fine until i moved my jndi resource settings from my appl. context to the global jndi naming resources as I have more than one appl. to share this resoruce. Now i get the exception that the jdbc driver could not be loaded 'null'. Whats the problem now. I had a tough time long back when I was trying to set up this jndi stuff and now stuck again
i am using tomcat 5 and mysql database.
regards.
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Did you move your jdbc driver jar file up to CATALINA_HOME/common/lib ?
shankar vembu
Ranch Hand

Joined: May 10, 2001
Posts: 309
Originally posted by Mike Curwen:
Did you move your jdbc driver jar file up to CATALINA_HOME/common/lib ?

yes, it's in that location.
The problem occured when I moved my JNDI resource setting in server.xml from the web app context to global jndi naming resources tag. The lookup is fine cos I get a valid datasource after the jndi lookup in my code. But when I try to get the connection, it throws the exception. So the code where I getConnection() is unable to locate the driver..... But i dont find any reason why it isn't... This is strange. A dirty workaround is to have all the web app contexts have this resource entry. This works but lot of redundancy.....
Regards.
shankar vembu
Ranch Hand

Joined: May 10, 2001
Posts: 309
same kinda problem
The follow ups say "More specifically, in 4.1.27 you can't define your JDBC resources in either
the DefaultContext or the GlobalResources. You need to explicitly define a
Context for your webapp, and insert the resources into that context."
Well, I use tomcat 5.....
regards
[ November 28, 2003: Message edited by: shankar vembu ]
shankar vembu
Ranch Hand

Joined: May 10, 2001
Posts: 309
any pointers??
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: tomcat and jndi resource
 
Similar Threads
Configuring connetion pooling with tomcat 5.5
Issue for the time to lock
resource not found display message
Automatically Reloading Servlets in tomcat
Global Resources