• 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

tomcat and jndi resource

 
Ranch Hand
Posts: 309
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you move your jdbc driver jar file up to CATALINA_HOME/common/lib ?
 
shankar vembu
Ranch Hand
Posts: 309
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 309
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 309
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
any pointers??
reply
    Bookmark Topic Watch Topic
  • New Topic