Doing Semantic Web Development on Mac? I was asked to install this bunch of software (Tomcat/Axis/Juddi) on my machine in preparation for a course on "Intelligent Internet Applications". I spent quite a time doing this on my G4 ibook and I must say: It's just plain old installation hell :-) This should be available as a package like XAMPP for LAMP/WAMP Systems. Quite the opposite is true: some of the tutorials are outdated or inconsistent. But this is Open Source, so anyone should step up and provide tutorials.
Thus, here is what I did in order to set this stuff up. Some of this I only accomplished by googling on different mailing lists, so I hope I am saving someone time by posting this.
Most of this tutorial might also work on other operating systems since it is all Java and hence cross-platform, but I didn't bother checking. Also, it might be outdated in a few month, one never knows, but now it's up to date (for instance, the Tomcat configuration chenged recently, which caused me trouble).
- download latest Tomcat from http://tomcat.apache.org
- unzip it
- rename the directory to "Tomcat" (this just makes it nicer to handle)
- move it to the /Library directory
- start Tomcat with /Library/Tomcat/bin/startup.sh (the shutdown script is called shutdown.sh)
- browse to http://localhost:8080 to see if its running
I will from now on refer to /Library/Tomcat as my $TOMCAT_HOME. By the way, I read (but can't confirm) that it helps in this process to have the system variable $JAVA_HOME set to the bin-directory containing your java/javac executables.
Axis
- download axis-bin-X_X.zip from http://people.apache.org/dist/axis/nightly/
- unzip it
- copy the axis-X_X/webapps/axis directory to $TOMCAT_HOME/webapps
- Restart Tomcat
- browse to http://localhost:8080/axis/ to see if it works
- browse to http://localhost:8080/axis/happyaxis.jsp to check if needed components are found. (I lacked the Java Beans Activation Framework from http://java.sun.com/products/javabeans/jaf/downloads/index.html. Unzip the archive and copy the activation.jar to $TOMCAT_HOME/lib. Restart Tomcat.)
MySQL
I will be rather short here. MySQL can easily be installed and/or there are a lot of tutorials to be found via Google. On OSX, I had previously used MacPorts to install it for me.
Juddi
- download juddi-0.9rc4.tar.gz (or latest) from http://ws.apache.org/juddi/releases.html
- unpack it
- copy juddi-0.9rc4/webapp/juddi/ to $TOMCAT_HOME/webapps
- in juddi-0.9rc4/sql/mysql/ you find scripts to set up the database (create_database.sql) and insert publishers (insert_publishers.sql). Execute the contents on your MySQL client. The latter one contains only commented template code for you to insert publishers you want (maybe only important for later).
- get the JDBC connector library here: http://dev.mysql.com/downloads/connector/j/5.0.html, unzip it and copy the jar-file you find in it to $TOMCAT_HOME/lib
- edit $TOMCAT_HOME/conf/server.xml, add to element "host":
<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="100" maxIdle="30" maxWait="10000"
username="root" password=""
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/juddi?autoReconnect=true" />
</Context>
Note that I used the MySQL root user here. You might want to use this in a productive environment and then, of course, you choose some other user/password combination! - restart Tomcat
- browse to http://localhost:8080/juddi/happyjuddi.jsp to see if juddi is happy
BIG THX!
Saved my lot of time!
This is a great, concise description of the installation steps I followed too... I wish I'd found this site earlier! It seems there area a few changes for the latest jUDDI release (rc6). First of all I didn't need to run the database creation script manually, but I needed to edit juddi.properties to point to the correct script (which I found by navigating the juddi jar file). I still needed ot insert a publisher manually. Also the axis installation didn't seem to help, I still had, according to the juddi happiness page, missing libraries for:
javax.xml.rpc.Service
org.apache.commons.discovery.Resource
and
org.apache.axis.transport.http.AxisServlet
I copied all files from teh axis/WEB-INF/lib folder into the juddi/WEB-INF/lib folder and juddi seems happy now.
Anyway, I hope this helps anyone else sturggling with this stuff... now if I could only get the juddi client code to work...
Hello, I usualy don't leave comments when I find info which I was looking for, but this little tutorial was very very useful. I wanna give author a big thanks for this tutorial. I was searching and trying various combinations instals/versions of tomcat/juddy/etc.. for 2 days. And this one tutorial made everything I needed in up to 10mins. (using Windows Visa Enterprise SP2)
Thank you again and good luck!
Martin
The article is great but you fucked it up at msql instalation!
Thanks!