in Java, Java SE, JBoss, Linux, Ubuntu

This article focuses on the deployement of OpenACS which is a powerful open-source Automatic Configuration Server (ACS) implementing CPE configuration protocol CWMP as specified in TR-069.  At the time when I write this article I have deployed the latest version “0.4 beta” which can be directly downloaded from the link below.

download link: http://sourceforge.net/projects/openacs/files/openacs-binary/0.4/openacs-bin-0.4.zip/download

In the four sections below are different instructions on how to prepare the deployment environment, JBoss AS 5.1 GA configuration and OpenACS deployment.

Note: As OS I used RedHat Enterprise Linux 5 – theses instructions can be done otherwise in other Linux distributions or other platforms like Windows or Mac.

1. Installing JDK 1.6

To install JDK 1.6, Open the terminal, log in as root and hit this command:

[email protected] [~]# yum install java-1.6.0-sun-devel

 

2. Installing JBoss AS 5.1 GA

As it was described in the wiki page of OpenACS, the application can be only deployed on JBoss AS 4.2.x and as you know our goal is to run it under JBoss AS 5.1. Even you will use JBoss AS 5.1 next, you still need JBoss AS 4.3 in order to recover some jar files from it- So let’s download JBoss AS 4.2.3 using the link below .

download link :
   http://sourceforge.net/projects/jboss/files/JBoss/JBoss-4.2.3.GA

As a second step you have to download JBoss AS 5.1 GA on which will run OpenACS.

download link : http://sourceforge.net/projects/jboss/files/JBoss/JBoss-5.1.0.GA/jboss-5.1.0.GA-jdk6.zip/download

Installing JBoss is quite easy, after downloading the zip files you have only to decompress them using  a graphical mode or console zip utility. Follow the command as shown next, I used the unzip CLI utiliy included in the most of linux distributions.
Unzip  jboss-4.2.3.GA-jdk6.zip archive file:

[email protected] [~]# unzip jboss-4.2.3.GA-jdk6.zip

Do the same thing with jboss-5.1.0.GA-jdk6.zip archive file:

[email protected] [~]# unzip jboss-5.1.0.GA-jdk6.zip

 

Running JBoss 5.1 GA…
Now, let’s check that JBoss AS 5.1 runs with no problems, move to bin directory located in root folder of JBoss AS 5.1 and execute run.sh by following theses commands:

[email protected] [~]# cd jboss-5.1.0.GA/bin
[email protected] [~]# ./run.sh

JBoss startup can take a while, so be patient until a message like shown below will be printed in the screen. That’s fine !

10:57:18,603 INFO [ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221053)] Started in 1m:4s:686ms

 

3. Configuring JBoss AS 5.1 to support OpenACS

As a first step, copy commons-httpclient.jar from JBoss AS 4.2.3 default server lib directory to the same directory in JBoss AS 5.1.

[email protected] [~]# cp jboss-4.2.3.GA/server/default/lib/commons-httpclient.jar jboss-5.1.0.GA/server/default/lib

download JDBC driver for MySQL mysql-connector-java-5.1.0-bin.jar using this link and copy it under lib directory of JBoss AS 5.1 of the default server.

[email protected] [~]# cp /my-download-path/mysql-connector-java-5.1.0-bin.jar jboss-5.1.0.GA/server/default/lib

Edit the file deployers/ejb-deployer-jboss-beans.xml

[email protected] [~]# vi  jboss-5.1.0.GA/server/default/deployers/ejb-deployer-jboss-beans.xml

and change the property value strictVerifier from true to false like shown in this snippet:

<!-- Setting this to 'true' will cause all deployments
to fail when the Verifier detected a problem with the contained
Beans. If false, warnings/errors will be logged but the deployment
will not fail.
-->
<property name="strictVerifier"><strong>false</strong></property>
</bean>

The final step in JBoss configuration is to copy the content of JBoss AS 4.2.3 /lib/endorsed into the same of folder in JBoss AS 5.1.

[email protected] [~]# cp jboss-4.2.3.GA/lib/endorsed/*  jboss-5.1.0.GA/lib/endorsed

By default when running JBoss AS 5.1 the option -Djava.endorsed.dirs is passed in run script parameters, if not add the line shown next at the end of run.conf file found under jboss-5.1.0.GA/bin

JAVA_OPTS="$JAVA_OPTS -Djava.endorsed.dirs=<YOUR_JBOSS_HOME>/lib/endorsed"

Note: <YOUR_JBOSS_HOME> should be changed by the absolute path of JBoss installation directory.

4. Deploying OpenACS

In order to deploy OpenACS, go back to the previously downloaded archive of OpenACS binary file and unzip it.

[email protected] [~]# unzip openacs-bin-0.4.zip
[email protected] [~]# cd openacs

Copy acs.ear and openacs-ds.xml to your default deployment directory, typically to server/default/deploy under jboss AS 5.1 GA installation dir.

openacs-ds.xml should be edited to meet your DB environement. Setup MySQL database server and create database and user to match the ones you’ve configured in openacs-ds.xml
acs-service.xml goes to server/default/deploy.

Finally you can start JBoss AS 5.1.

Note: In terms of best practices, it’s highly recommended to configure JBoss to run as a service/daemon

Web interface is accessible on your installation host under url /openacs ( e.g. http://localhost:8080/openacs. device should be configured to access ACS on URL http://your_host:8080/openacs/acs.

That’s all, I hope you’ll find this helpful.
All you comments are welcomed!

Write a Comment

Comment