Exception occurred while attempting to acquire a JDBC DataSource from JNDI : Tomcat 7 and Mysql
Joined: Jul 21, 2011
<Sorry fo rthe such a long post>
I have spent my almost 1 week by reading through all the post and still struglling to get my happyjuddi.jsp workig...I here in hope to get some pointer to find the correct issue .
Java=> Jdk 1.6
Now the Error which I get when click on validate button Below error from my Localhost log file and Juddi Log file:
I have user Juddi setup in mysql , Nothing in server.xml
but C:\Eclipse\apache-tomcat-7.0.16\webapps\juddi\META-INF is having context file :
as shown below :
2011-07-21 14:22:56,035 INFO [org.apache.juddi.registry.RegistryServlet] - Loading jUDDI configuration.
2011-07-21 14:22:56,035 INFO [org.apache.juddi.registry.RegistryServlet] - Resources loaded from: /WEB-INF/juddi.properties
2011-07-21 14:22:56,035 INFO [org.apache.juddi.registry.RegistryServlet] - Initializing jUDDI components.
2011-07-21 14:22:56,144 INFO [org.apache.juddi.util.jdbc.ConnectionManager] - Using JNDI to aquire a JDBCDataSource with name: java:comp/env/jdbc/juddiDB
2011-07-21 14:22:56,144 ERROR [org.apache.juddi.util.jdbc.ConnectionManager] - Exception occurred while attempting to acquire a JDBC DataSource from JNDI: Name jdbc is not bound in this Context
2011-07-21 14:22:56,144 ERROR [org.apache.juddi.registry.RegistryEngine] - Could not create jUDDI database null
java.lang.NullPointerException at org.apache.juddi.registry.RegistryEngine.initializeDatabase(RegistryEngine.java:253)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
2011-07-21 14:24:18,691 INFO [org.apache.juddi.registry.RegistryServlet] - jUDDI Stopping: Cleaning up existing resources.
Welcome to the JavaRanch, Rajwant. Sorry about the delay, but everything has its price, and in the case of "free" help, the price is that you don't get instant answers. We have people in pretty much every timezone in the world, but we all check in if/when it's convenient. In my case, it was about an hour before you posted your message.
You can make things a little easier if you use the "Code" button in your message editor to bracket code and XML samples. They'll display in a much more readable form.
I cannot see anything obviously wrong, but whenever you're defining a datasource in Tomcat, things can go wrong that aren't very obvious. Since the datasource named "jdbc/juddiDB" isn't being found in JNDI, that means that you should take a very close look at its definition in the WAR's context.xml file. Also, while Tomcat is not running, check the TOMCAT_HOME/conf/Catalina/localhost directory to see if an old, stale copy of that file was copied there, and if there's an exploded WAR in TOMCAT_HOME/webapps, delete it, because that copy will override any newer deployed WAR file.
Other than that, if there's a problem with the resource definition, it normally shows up in the catalina.out logfile.
Customer surveys are for companies who didn't pay proper attention to begin with.