It's all about the answers!

Ask a question

Maven Build in Rational - NoClassDefFoundError: org.codehaus.classworlds.Launcher

Tommy Ng (2123) | asked Feb 18 '13, 9:02 a.m.
edited Feb 20 '13, 8:28 a.m. by Spencer Murata (2.3k115971)

Dear Sir

When I use the Maven Build in Rational, I got below error

[Jazz build engine] Invoking build participant ""

Ecveption in thread "main" java.langNoClassDefFoundError: org.codehaus.classworlds.Launcher

Can anyone know it?

5 answers

permanent link
Ian Wark (79713450) | answered Feb 19 '13, 10:51 p.m.
Hi Tommy,

I also get the same error. Here is what I get:

2013-02-19 14:58:14 [Jazz build engine] running on host: XXXXXXX
2013-02-19 14:58:14 [Jazz build engine] Should build occur?
2013-02-19 14:58:14 [Jazz build engine] Yes: Always build a user initiated request.
2013-02-19 14:58:14 [Jazz build engine] Invoking build participant ""
Exception in thread "main" java.lang.NoClassDefFoundError : org.codehaus.classworlds.Launc her
Caused by: java.lang.ClassNotFoundExcepti on: org.codehaus.classworlds.Launc her
    at ass(
    at java.lang.ClassLoader.loadClas s(
    at sun.misc.Launcher$AppClassLoad er.loadClass(
    at java.lang.ClassLoader.loadClas s(
Could not find the main class: org.codehaus.classworlds.Launc her.  Program will exit.
Build failed. Exit value was 1.

It seems that the C:\Program Files\Apache Software Foundation\apache-maven-3.0.4\ boot\plexus-classworlds-2.4.ja r is not in classpath, but building from Maven and not Eclipse client works fine. We tried adding -cp "C:\Program Files\Apache Software Foundation\apache-maven-3.0.4\ boot\plexus-classworlds-2.4.ja r" to the Java VM arguments section in build definition, but this did not seem to resolve issue.

<Reproduce steps>
1. Download Windows Maven v3.0.4 from and add environment variables carefully as per instructions.
2. Create the sample using steps under
3. Unzip the build feature RTC-BuildSystem-Toolkit-Win-4. and copy jdk from RTC 4.0.1 Eclipse client as per instructions
4. Create a build definition for Maven in RTC project area and configure as per screen captures.
5. Click "Create" button in Overview section to create a build engine.
6. Run jbe -vm {path_to_jdk}/bin/java -repository {repositoryURL} -userId {user} -pass {password} -engineId {engine}
7. Copy the sample maven project to your configured build workspace.
8. Invoke a build from the Builds view.

Can someone help?

permanent link
Ian Wark (79713450) | answered Feb 19 '13, 10:56 p.m.
There is only one screen capture. Here it is.

Build definition

permanent link
Spencer Murata (2.3k115971) | answered Feb 20 '13, 8:34 a.m.
 It appears that this is a problem with mixing Maven 2 scripts with a Maven 3 engine.

or a missing classworlds jar from the path:

Does the same Maven script run from the command line without problems?


permanent link
Ian Wark (79713450) | answered Feb 20 '13, 10:06 p.m.

OK. I succeeded in the build. The key was to remove the \bin from the end of the Maven home: variable in the build definition settings.

"C:\Program Files\Apache Software Foundation\apache-maven-3.0.4".

I also changed my Project location: to include \my-app a the end.. which makes


I am using the amy-app pplication generated from which is a good sample application. I advise to use this application to test.

permanent link
Joseph Mao (440189) | answered Feb 20 '13, 11:37 p.m.
In Maven build definition,
- "Maven home" need to set to [Maven_installed_folder], rather than [Maven_installed_folder]\bin, to allow maven library can be found
- "Project Location" need to be set to project path level, allow Maven to find pom.xml, rahter than workspace level.

Your answer

Register or to post your answer.