Search This Blog

Saturday, June 8, 2013

Download and Install Apache Geronimo 3.x on Linux

Apache Geronimo is an open source server runtime that integrates multiple open source projects to create Java/OSGi server runtimes. To install Apache Geronimo access the following site.

You will see a screen as follows:

Now access the link to download latest version of Apache Geronimo (Version 3.0.1) at the time of this writing.

Clicking on the latest release link provided me access to the following page, where I proceeded to download the Full Release version.

Clicking the “Certified Java EE 6 Full Profile Release” link above takes you to a page showing list of Apache Mirrors from where the software can be downloaded.

I downloaded the tar file for Linux on my local machine on a new folder I had created for this task. Later I unzipped the archive to extract the contents with the following commands.

$ cd Work/Servers/Geronimo/
$ gzip -dv geronimo-tomcat7-javaee6-3.0.1-bin.tar.gz

This converted the file to tar version. Next I extracted the tar

$ tar -xvf geronimo-tomcat7-javaee6-3.0.1-bin.tar

On execution, a folder is created containing the extracted files.

Changing the default HTTP port

By default, Apache Geronimo listens on port 8080 for the HTTP traffic. On my machine, I already had several Tomcat distributions installed as part of other distributions, so I needed to change the default port. To see which ports are already used on your machine, you can follow the steps listed in my previous post on the topic.

To change the default port on Geronimo to an unused port on my machine, I needed to do the following steps.

$ cd geronimo-tomcat7-javaee6-3.0.1
$ cd var/config

Geronimo configuration is contained in the config file, which we can view by doing the following:

$ gedit config.xml

This shows the file

As we can see, the above file actually references variables for accessing the values. Turns out, the actual values are stored in a different file in the same folder, called “”. I opened the file for editing and made following changes to the file

HTTPPort = 8086
HTTPSPort = 8447
AJPPort = 8113

After saving the changes, we come back to the bin folder to start geronimo.

$ cd ../../bin
$ ./geronimo start

To check the console, we can type the command.

$ tail -f var/log/geronimo.log

Accessing Apache Geronimo on a browser

Now launch a browser and enter the address http://localhost:8086/ (If you did not change the default port, you should be able to access http://localhost:8080/ instead). If you see a screen like below, Apache Geronimo is installed.

Access the url http://localhost:8086/console and enter user name /password as system/ manager to login.

Upon logging in you should see a screen as below.

That's it, Apache Geronimo is installed.

Monday, June 3, 2013

Download and Install latest maven version on Ubuntu

What is Maven?

Maven is a build tool that came out of the Apache development process. It streamlines management of dependencies and build components across different projects. It also avoids duplication of libraries where the same version is used across projects, or allows tracking of different versions of libraries, where different versions may indeed be needed.

Setting up Maven on your machine

First step in setting up Maven on your machine, is entering the command to search for maven in your cache.

$ apt-cache search maven

This produced the following results.

Next step is to install latest version of maven compatible with my OS. This can be done by entering the following command.

$ sudo apt-get install maven

Once the installation is completed, you should see something similar to the following.

We can verify the version that is installed.

$ mvn -version

That's it. Maven is installed!

Sunday, June 2, 2013

Fixing the admin user login issue with an opentaps installation

When I logged in for the first time into a fresh opentaps 1.5 installation, the login did not work. The screen showed the “User not found” message as shown below.

Fixing this error needs you to make sure of two steps.

  1. Make sure the mycompany module was uncommented (described in the installation post)
  2. Enable the admin user and update password (described in this post)
The issue still is that the password in the database does not match the password provided. So we need to start Postgresql command prompt and update the password.

Start postgresql by entering the following command on the command prompt.

$ psql -U opentaps -d opentaps

Enter the SQL command to update the password as well as enable the admin account.

Opentaps=> UPDATE user_login
SET current_password='{SHA}47ca69ebb4bdc9ae0adec130880165d2cc05db1a', enabled='Y'
WHERE user_login_id='admin';

Now that the password is updated, we can enter the username/password again and Login into the site. 

Download and Install opentaps 1.5 on Ubuntu

This post is about downloading and installing opentaps, a Java based Open Source ERP and CRM package built on top of Apache Ofbiz. My post deploys Opentaps against a Postgresql database.

Getting the 1.5 installer directly

To download the installer for version 1.5, you need to access the download site at If one follows the website navigation, one ends erroneously on the version 1.4 download page as of the time of writing this post. The links on the website take one through a registration process and take you to the version 1.4 download links. The link posted above will take you to 1.5 directly.

If you actually wanted version 1.4 instead of 1.5

If you wanted version 1.4, then access the download section of the opentaps website ( . This site presents a form that needs to be filled out with your details to get to the download page.

Filling out the form presents the version 1.4 download link.

Continuing with 1.5 installation

I will continue this post with Opentaps version 1.5 installation that is started by accessing the link Once the user accesses the site, the download starts on the page as shown on the screenshot below.

Once I downloaded the zip file on my browser's download folder, I copied it to a location on my machine where I wanted to extract the zip.

Then opening a terminal window, I unzipped the contents as shown below by entering the command.

$ cd Work/Servers/OpenTaps
$ unzip

The above command extracts the contents of the zip file.

Verify Sun JDK is the default Java version

The next important item is to check the java version installed on the machine by entering the following command.

$ java -version

Luckily for me the Sun JDK showed up as the configured version. If you get a different JDK installed as the version, then you can follow these steps to alter your configured version, and resume from here.

Setting up Postgresql environment

By default, Opentaps deploys with Derby database. I wanted to setup my deployment with Postgresql, so I followed the following steps. Assuming that you have Postgresql installed on your machine, open a terminal window and enter the following commands.

$ su postgres
$ createuser -W opentaps

System prompts you to enter the password, which I entered as opentaps. Next, answer the following questions.

Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) y
Shall the new role be allowed to create more new roles? (y/n) y

Next we create the opentaps database

$ createdb opentaps

Here is my screenshot after running the above commands.

Now exit as the postgres user and log into psql as an opentaps user. Enter the following command (Note: You should no longer be logged in as the postgres user but as the original user you started the installation process with.)

$ psql -U opentaps -d opentaps

There! Our database user and database is created correctly.
Next step is to configure opentaps to connect to our new database as the opentaps database user.

Changing the database connections within opentaps to Postgresql

Changing the default database connection to Postgresql involves the following steps. Open a new terminal window and cd into the folder where opentaps 1.5 was installed.

$ cd Work/Servers/OpenTaps/opentaps-1.5.0/
$ cd framework/entity/config
$ gedit entityengine.xml

This launches the file in a text editor. Make the following changes in your text file.

Under the default node, make changes to change default datasource name from localderby to localpostnew, as shown below.

Within the same node, make additional changes for supporting multi-tenant model. Change datasource name for localderbytenant to localpostnewtenant, as shown below.

Here is a screen shot of my gedit screen after the changes.

This ensures that Now, navigate to localpostnew entry in the file.

I set the username password for postgresql connection


Now, copy the just edited localpostnew connection, and paste it again in the file. Rename the datasourcename to be localpostnewtenant as shown below.

Now that we have switched the default database provider from derby to postgresql, we need to carry out an additional step. By default the startup script for opentaps, would look at a schema and if no database tables needed to run the software are found, the installation program creates those tables. However, the startup scripts do not create populate even the initial data such as creating a login account for the administrator or an organization. We need to ensure that the initialization scripts create these datasets. To do so, we need to make a minor configuration entry to load the sample data. This is explained in the following steps.

First, navigate to the opentaps sub-folder from the installation root, by entering the following command.

$ cd opentaps

Next, we need to open the component-load.xml file for editing. I entered the following command at the terminal prompt.

$ gedit component-load.xml

The file is loaded in the editor. This is what the file looked like initially before I made any changes.

I made the following changes.
  1. Uncommented the line to load pentaho BI component
  2. Uncommented the line to load mycompany data
The modified file looks as follows:

Close and save the file and run ant with run-install option. OpenTaps ships with its own version of ant and that is the recommended version to be used.

$ ./ant run-install

Running this process took a little while and in the end everything was compiled.

In my case, I also ended up changing the default port from 8080 to 8084. In case you need to do the same, you can follow the steps listed in my post on the topic and resume back from here, once you are done.

Save and closing the files and running ./ on the command prompt, starts the server in the background. To see the action of the scripts, one has to enter the following command on the terminal window

$ tail -f runtime/logs/console.log

Entering http://localhost:8084/opentaps produced the following screen on my machine.

The login details are:

Username: admin
Password: ofbiz

When I logged in for the first time, the login did not work. Here is my post on fixing this problem. If the login works, you should see the following screen.

By default, the admin user does not have access to the CRM module. To view the CRM modules, login with following credentials

Username: DemoSalesManager
password: crmsfa

This shows the following screen.

That's it, we have OpenTaps installed and working.

Changing the default port for opentaps 1.5 installation

During installation of opentaps 1.5 (described in this post), I needed to change the default port. By default, opentaps get deployed to listen on port 8080. I already had several Tomcat instances deployed with previous software installs. After testing which ports were already used (described in a previous post), I decided to configure the instance to listen on port 8084.

This requires port entries to be changed in two places. The configuration file for ofbiz-containers as well as the configuration file for jetty-containers.

First, I navigated to the folder where OpenTaps was unzipped in a terminal window. Then I edited the ofbiz-containers.xml folder as shown below.

$ gedit ./framework/base/config/ofbiz-containers.xml

Within the file, look for the port entry 8080. Change it to 8084.

Next in the same folder, edit another file called jetty-containers.xml. Again change the port entry from 8080 to 8084, as shown below.

With these two files changed and saved, I started the opentaps instance by entering the start command. The rest of the installation is described in my original post.