Installing Hudson on WebLogic Server

Introduction

Today I needed to set up a Hudson server and so I decided to put it on WebLogic Server.  Turns out there is a little trick to get it working.  Thanks to Steve Button for sharing the trick with me. :-)

Main Article

I installed Hudson 1.396 on WebLogic Server 10.3.4 running on Oracle Linux 5.5 (64-bit).

First you need to download the hudson.war file from the Hudson site.  We need to add a WebLogic deployment descriptor to it so that it wont have any classpath/library  problems.

In the directory where you saved hudson.war create a new directory called WEB-INF and inside that a file called weblogic.xml.  Here is the contents for the file:

<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app
  xmlns="http://www.bea.com/ns/weblogic/weblogic-web-app">
  <container-descriptor>
    <prefer-application-packages>
      <package-name>org.apache.*</package-name>
      <package-name>org.dom4j.*</package-name>
    </prefer-application-packages>
  </container-descriptor>
</weblogic-web-app>

Now you need to add this file into the hudson.war using the following command:

# jar uvf hudson.war WEB-INF/weblogic.xml

Now we are ready to install Hudson!

Log in to the WebLogic Server adminstration console at http://yourserver:7001/console and start a new edit session (click on Lock and Edit).  Note that you wont have to do this if you are running your server in development mode.

Now click on Deployments in the navigation tree on the left and then click on the Install button.

slide11174fd

Click on the link to upload your file(s) and point it to your updated hudson.war.  After it is uploaded, check it is selected and click on Next.

slide24

Click Next on the next screen.

slide34

Select a managed server to deploy Hudson on.  I used my soa_server1.  Then click on Next.

slide41

Click Next on the next screen.

slide51

Click on Finish.  After a few moments your application will be installed.

slide61

If you are running your server in production mode, you will need to click on the Activate Changes button.  Then return to the Deployments screen, find your newly installed application (hudson), tick the box next to it and click on the Start button and then Servicing all requests.  This will start Hudson on your WebLogic Server.

Now you can open up a browser and visit the Hudson home page at http://yourserver:8001/hudson.  Note that you will have to change the port to match your environment.

slide71

More about Hudson later… but for now, enjoy!

Add Your Comment