Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

Dear Sir

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

[Jazz build engine] Invoking build participant "com.ibm.team.build.maven"

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

Can anyone know it?

1 vote



5 answers

Permanent link

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

"C:\Users\ibmrat\workspace\my-app"

I am using the amy-app pplication generated from http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html which is a good sample application. I advise to use this application to test.

1 vote


Permanent link
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.

1 vote


Permanent link
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 "com.ibm.team.build.maven"
Exception in thread "main" java.lang.NoClassDefFoundError : org.codehaus.classworlds.Launc her
Caused by: java.lang.ClassNotFoundExcepti on: org.codehaus.classworlds.Launc her
    at java.net.URLClassLoader.findCl ass(URLClassLoader.java:434)
    at java.lang.ClassLoader.loadClas s(ClassLoader.java:660)
    at sun.misc.Launcher$AppClassLoad er.loadClass(Launcher.java:358)
    at java.lang.ClassLoader.loadClas s(ClassLoader.java:626)
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 http://maven.apache.org and add environment variables carefully as per instructions.
2. Create the sample using steps under http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html
3. Unzip the build feature RTC-BuildSystem-Toolkit-Win-4. 0.1.zip 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?

0 votes


Permanent link
There is only one screen capture. Here it is.

Build definition


0 votes


Permanent link
 It appears that this is a problem with mixing Maven 2 scripts with a Maven 3 engine.
http://cyntech.wordpress.com/2011/03/09/maven-2-error/

or a missing classworlds jar from the path:
http://www.permeance.com.au/web/terry.mueller/home/-/blogs/maven2-reports-java-lang-noclassdeffounderror:-org-codehaus-classworlds-launcher

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

~Spencer

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 562
× 45

Question asked: Feb 18 '13, 9:02 a.m.

Question was seen: 10,528 times

Last updated: Feb 20 '13, 11:37 p.m.

Confirmation Cancel Confirm