JMeter on Ubuntu 6.06

Step-by-Step descriptions of how to do things.
Post Reply
User avatar
^rooker
Site Admin
Posts: 1481
Joined: Fri Aug 29, 2003 8:39 pm

JMeter on Ubuntu 6.06

Post by ^rooker »

Here's how to get Jakarta JMeter up and running on a fresh Ubuntu 6.06 Server (Dapper Drake) install:

I went for J2SDK, because I'll do some java development on that machine as well, but that shouldn't make any difference regarding this howto.

Option #1 - Using Blackdown Java 1.4.2:

Code: Select all

# install the SDK package:
apt-get install j2sdk1.4
# get some necessary prerequisites:
apt-get install build-essentials libxp6 libxt6 libxext6 libxtst6 libc6

# Download JMeter:
wget http://mirror.deri.at/apache/jakarta/jmeter/binaries/jakarta-jmeter-2.2.tgz
# ....and unpack it:
tar -xzf jakarta-jmeter-2.2.tgz
Basically this would be it. Just rename the directory to whatever you like and you're set. It's not beautiful (I'll add info about how to "package" JMeter properly), but it works.

------- AddOns ---------
Add extensions - BeanShell, MailerVisualizer:
- Download JavaMail API here.
- Download JavaBeans Activation Framework here.
- Download BeanShell interpreter:
wget http://www.beanshell.org/bsh-2.0b4.jar

Unpack them and put "mail.jar", "activation.jar" and "bsh*.jar" into JMeter's /lib/ directory.

Add automation support: Ant & JMeter
If you want to automagically execute JMeter testplans, you might want to install "Jakarta Ant", too:

Code: Select all

apt-get install ant ant-optional
(see my "error posts" below to see why you'll need ant-optional)


Option #2 - Using Sun's Java / binary installer:
In order to install Sun's java cleanly, we'll make a .deb package out of the .bin downloadbable from sun.
(Instructions for installing Sun's Java like that were taken from this forum entry by Adamal)

Code: Select all

# 1) Start by downloading the binary installer from sun 
#    (e.g. "jdk-1_5_0_09-linux-i586.bin")

# 2) Get some prerequisites:
sudo apt-get install build-essential fakeroot java-package java-common
#   FakeRoot is needed for creating the package - Info: http://linux.about.com/cs/linux101/g/fakeroot.htm

# 3) Make a Debian package:
fakeroot make-jpkg jdk-1_5_0_09-linux-i586.bin

# 4) Install the package:
sudo dpkg -i sun-j2sdk1.5_1.5.0+update09_i386.deb

# 5) Set the default java interpreter to be Sun's:
sudo update-alternatives --config java
Last edited by ^rooker on Wed Nov 29, 2006 2:01 pm, edited 3 times in total.
User avatar
^rooker
Site Admin
Posts: 1481
Joined: Fri Aug 29, 2003 8:39 pm

ClassNotFoundException: org.apache.tools.ant...

Post by ^rooker »

[PROBLEM]
Running a .jmx file using ant, I ran into this error message:
java.lang.ClassNotFoundException: org.apache.tools.ant.taskdefs.optional.TraXLiaison
[SOLUTION]
Thanks to this blog entry, I found out I had made the same error:
Running Ubuntu, I've installed the package "ant", but not "ant-optional".

Here's the commandline:

Code: Select all

apt-get install ant ant-optional
User avatar
^rooker
Site Admin
Posts: 1481
Joined: Fri Aug 29, 2003 8:39 pm

Missing X libraries

Post by ^rooker »

[PROBLEM]
Running my .jmf file using "ant -Dtest=mytest" on "Ubuntu 6.06 Server" without X installed, I ran into this error:
[jmeter] Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/lib/j2se/1.4/jre/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory
[SOLUTION]
Obviously a lot of X libraries are (of course) missing on the Server edition of Ubuntu, so install these packages to fix this issue:

Code: Select all

apt-get install libxp6 libxt6 libxext6 libxtst6 libc6
This will install:
libXp, libXt, libXext, libXtst and libc
User avatar
^rooker
Site Admin
Posts: 1481
Joined: Fri Aug 29, 2003 8:39 pm

JMeter: Error in TestPlan - see log file

Post by ^rooker »

[PROBLEM]
I loaded a testplan, which was known to run fine on another computer (.jmx) in JMeter and got this error:
Error in TestPlan - see log file
[SOLUTION]
Since jmeter's logfile is very likely to contain more errors than that one (leftovers from previous runs), I quit jmeter and whiped its log:

Code: Select all

echo "" > bin/jmeter.log
Then I restarted jmeter, tried to open my testplan again and THEN went back to its log.

In my case the problem was caused by a missing extension:
jmeter.gui.util.MenuFactory: Missing jar? Could not create org.apache.jmeter.visualizers.MailerVisualizer.
java.lang.NoClassDefFoundError: javax/mail/MessagingException
You need "mail.jar" (JavaMail) and "activation.jar" (JavaBeans Activation Framework) in jmeter's /lib directory. They're available from sun:
http://java.sun.com/products/javamail/
http://java.sun.com/products/javabeans/glasgow/jaf.html
Post Reply