« Return to Thread: jUDDI DataSource Validation problem

Re: jUDDI DataSource Validation problem

by avinh :: Rate this Message:

Reply to Author | View in Thread

It seems that the instructions for "configuring jUDDI for Tomcat" from the following link does not work well with Tomcat 5.5.17, i.e. the section for setting up the conf/server.xml file:

http://wiki.apache.org/ws/Deploy_jUDDI_on_Tomcat_and_MySQL

This is the final entry that I have for the Context in file conf/server.xml that works for me:

<!-- ***************************************************************** -->

        <Context path="/juddi" docBase="juddi" debug="5" reloadable="true"
          crossContext="true">
          <Logger className="org.apache.catalina.logger.FileLogger"
                       prefix="localhost_juddiDB_log" suffix=".txt"
                       timestamp="true"/>

          <Resource name="jdbc/juddiDB" auth="Container" type="javax.sql.DataSource"
             maxActive="0" maxIdle="50" maxWait="10000"
             username="juddi" password="juddi" driverClassName="com.mysql.jdbc.Driver"
             url="jdbc:mysql://seurat.cbt.nist.gov:3306/juddi?autoReconnect=true"/>

        </Context>

<!-- ***************************************************************** -->

Notice that I'm not using "localhost" for the url attribute but the actual domain name for my server (seurat.cbt.nist.gov), this is intended so that MySql can be running on another server instead of the localhost.

I had to run the following sql statement in order for MySql to allow user "juddi" to have access to my server (seurat.cbt.nist.gov):

GRANT ALL ON juddi.* TO juddi@"seurat.cbt.nist.gov" IDENTIFIED BY "juddi";

For some reason the default command that came with the file "create_database.sql", i.e. the following statement allowing the "juddi" user to access MySql from anywhere does not work, hence I had to specified the machine explicitly:

GRANT ALL ON juddi.* TO juddi@"%" IDENTIFIED BY "juddi";

Now the "happyjuddi.jsp" file is running with the following results:

jUDDI DataSource Validation
+ Got a JNDI Context!
+ Got a JDBC DataSource (dsname=java:comp/env/jdbc/juddiDB)
+ Got a JDBC Connection!
+ SELECT COUNT(*) FROM PUBLISHER = 2

 « Return to Thread: jUDDI DataSource Validation problem