Announcement Announcement Module
Collapse
No announcement yet.
Apache Maven Eroor - finding classworlds class Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Apache Maven Eroor - finding classworlds class

    Running Win 2008 Server, Eclipse Indigo, Latest version of Spring Framerwork. Trying the following example:

    http://viralpatel.net/blogs/2011/01/...hibernate.html

    Unfortunately it fails at the first step, when I try to execute any Maven command (ie: 'mvn -version'), I get the following error:

    C:\Users\SampleUser>mvn which
    Exception in thread "main" java.lang.NoClassDefFoundError: org/codehaus/plexus/c
    lassworlds/launcher/Launcher
    Caused by: java.lang.ClassNotFoundException: org.codehaus.plexus.classworlds.lau
    ncher.Launcher
    at java.net.URLClassLoader$1.run(URLClassLoader.java: 202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.j ava:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:3 07)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:2 48)
    Could not find the main class: org.codehaus.plexus.classworlds.launcher.Launcher
    . Program will exit.

    I've tried setting MV2_HOME, deleted that, tried MV3_HOME, deleted that, tried MAVEN_HOME, deleted that. Checked my jdk, using:

    'java -version' ALL OK
    HOWEVER,

    'javac -version' returns the following error:

    C:\Users\SampleUse>javac -version
    'javac' is not recognized as an internal or external command,
    operable program or batch file.

    I wonder if that has anything to do with why Maven is not working? any suggestions on how to set up and use Maven correctly would be greatly appreciated. I checked a number of web resources most of which talk about the conflict in using more than one MVN home (ie: MV3_HOME when you already have MV2_HOME installed). This is not my case since I"m manually setting the homes from the command window and not through the Windows variables. Only my jdk is set from Windows. Any advice or suggestion is GREATLY appreciated. Many thanks, J

  • #2
    Hey!

    I thought the environment variable is called M2_HOME, but I am just guessing here that this might be related to your problem...

    -Martin

    Comment


    • #3
      Hi Martin,

      I solved the problem. The environment var is called M2_HOME but that wasnt the problem. I basically downloaded and installed a 'stable' version and it works fine.

      Thanks anyway!

      Comment


      • #4
        Hey!

        Thanks for letting us know and happy to hear that you got it working!!!

        -Martin

        Comment

        Working...
        X