SOCKET

Thursday Apr 27, 2006

jUDDI Installation

jUUDI Installation

The installation of jUDDI is fairly straight forward, however, there are some quirks...as with all things.

The quirks lie with installing jUUDI on Tomcat 5.5.x as opposed to 5.0.x and below. I'll shall come to this in a bit.

Firstly, download the jUDDI package into your home directory from:-

http://ws.apache.org/juddi/releases.html

Get the latest and greatest.

tar zxvf juddi.tar.gz

Then copy the .war file that resides within the jUDDI directory into your webapps directory

cp juddi/juddi.war /path/to/tomcat/webapps

MySQL - Database creation and population

You need to run 2 x .sql scripts that come with the jUDDI package. These are:-

/path/to/juddipackage/sql/mysql/create_database.sql
/path/to/juddipackage/sql/mysql/insert_publishers.sql

You can run these by doing the following:-

# mysql -u root -p < /path/to/juddipackage/sql/mysql/create_database.sql
password:

# mysql -u root -p juddi < /path/to/juddipackage/sql/mysql/insert_publishers.sql
password:

You now need to populate the database with a user. Do this by logging into the MySQL console and running the following sql.

# mysql -u root -p
password:

mysql> use juddi;
INSERT INTO PUBLISHER (PUBLISHER_ID,PUBLISHER_NAME,IS_ADMIN,IS_ENABLED)
VALUES ('jdoe','John Doe','false','true');

Final tweaks

Finally, create a file called juddi.xml in /path/to/tomcat/server/Catalina/localhost and enter the following:-

<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"/>
<!-- the Resource element will probably work better for
you on Tomcat 5+ if you simply use a Resource only tag
with xml attributes as opposed to the nested ResourceParams and
parameter elements -->
<Resource name="jdbc/juddiDB" auth="Container"
type="javax.sql.DataSource" maxActive="100" maxIdle="30" maxWait="10000"
username="juddi" password="******"
driverClassName="org.gjt.mm.mysql.Driver"
url="jdbc:mysql://localhost:3306/juddi?autoReconnect=true" />
</Context>

***this is code required for tomcat 5.5.x and is not stated in the official jUDDI docs. It is different for 5.0.x and below***

Amend as necessary to match your MySQL details, e.g. change the username and password.

To enable log4j, you need to create a file at juddi/WEB-INF/classes/log4j.properties. In that file enter:-

#
# set the log file to ${HOME}/juddi.log and not the ${PWD}/juddi.log
#
log4j.appender.LOGFILE.File=/opt/tomcat/logs/juddi.log

and amend the file juddi.properties at:-

/juddi/WEB-INF/judi.properties to suit e.g:-

# The UDDI Operator Name
juddi.operatorName =socket1.leeds.ac.uk

Then simply restart tomcat and browse to:-

http://localhost/juddi

click on 'validate' and see the output for any errors.

Comments:

Post a Comment:
Comments are closed for this entry.

Calendar

Feeds

Search

Links

Navigation

Referers