Maven Build in Rational - NoClassDefFoundError: org.codehaus.classworlds.Launcher
![]()
Tommy Ng (21●2●3)
| asked Feb 18 '13, 9:02 a.m.
edited Feb 20 '13, 8:28 a.m. by Spencer Murata (2.3k●11●59●71) 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? |
5 answers
![]() 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
|
![]()
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. |
![]()
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 Caused by: java.lang.ClassNotFoundExcepti at java.net.URLClassLoader.findCl at java.lang.ClassLoader.loadClas at sun.misc.Launcher$AppClassLoad at java.lang.ClassLoader.loadClas Could not find the main class: org.codehaus.classworlds.Launc Build failed. Exit value was 1. It seems that the C:\Program Files\Apache Software Foundation\apache-maven-3.0.4\ <Reproduce steps> 1. Download Windows Maven v3.0.4 from http://maven.apache.org ![]() 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. 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? |
![]()
There is only one screen capture. Here it is.
![]() |
![]()
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
|
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.