Stanley Wong wrote: > I have other application installed that do the direct JDBC connection. > > To simplify it, I have two applications in the Tomcat. > App1: Use the direct JDBC connection. > App2: Use the JNDI. > > Therefore App1 has the postgreSQL in its lib folder. > > Is it the issue that App2 fails to get the JNDI-JDBC connection from > Tomcat? > > Stanley > > You are lucky you haven't had a problem yet with that setup so far. It typically causes a conflict and weird errors to have any jar file in both tomcat's lib folder and a webapp's lib folder. Remove the postgresql driver jar in App1 and it will still work because it'll start using the one in tomcat's lib folder.
The error you are getting *typically* is the result of a mismatch of jndi names between all the different places it's entered, but not always. It's also frequently caused by <Context ... ></Context> xml fragments in server.xml or tomcat's conf/[Engine name]/[Host name] (typically conf/Catalina/localhost) overriding the one in your webapp's META-INF/context.xml file. One last thought while I'm typing here ... take a look at your logs around the time tomcat starts to see if there's anything in there that might be related. --David --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org