Announcement Announcement Module
Collapse
No announcement yet.
classNotFound exception when moving to M1 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • classNotFound exception when moving to M1

    hi all...

    i've been using A1 and A2 with no problems. Downloaded M1 and now ROO is not functioning. I can run roo.bat from the installation dir, but it fails trying to execute it when it's appended to my path.

    Code:
    Microsoft Windows [Version 6.0.6001]
    Copyright (c) 2006 Microsoft Corporation.  All rights reserved.
    
    C:\Users\juleslyons\workspace\wedding>roo
    Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/roo/bootstrap/Bootstrap
    Caused by: java.lang.ClassNotFoundException: org.springframework.roo.bootstrap.Bootstrap
            at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
            at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
            at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    Could not find the main class: org.springframework.roo.bootstrap.Bootstrap.  Program will exit.
    
    C:\Users\juleslyons\workspace\wedding>echo %PATH%
    C:\work\jdk1.6.0_13\bin;C:\work\oracle11g\product\11.1.0\client_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\9.0\DLLShared\;C:\Program
     Files (x86)\QuickTime\QTSystem\;C:\work\SlikSvn\bin\;D:\work\spring-roo-1.0.0.M1\bin
    
    C:\Users\juleslyons\workspace\wedding>

  • #2
    I changed the roo.bat file to hard code the ROO_HOME variable and now it works fine. Maybe a problem on my local workstation, but would be great if someone from spring can confirm/deny.

    from roo.bat (my changes):

    Code:
    cd %_REALPATH%
    cd ..
    set ROO_HOME="D:\work\spring-roo-1.0.0.M1"
    thanks

    Comment


    • #3
      Sorry you're having trouble! I like to look after our Roo users, especially from way back in the alpha 1 days! :-)

      Did you delete the old ROO_HOME variable from your system environment variables before trying the new Roo 1.0.0.M1? That could be the problem.

      Comment


      • #4
        hi Ben...here's a dos shell and output. if you see something obvious, let me know. i'm able to work after changing the bat file, so it's not major. it very well could be my env.

        Code:
        
        Microsoft Windows [Version 6.0.6001]
        Copyright (c) 2006 Microsoft Corporation.  All rights reserved.
        
        C:\Users\juleslyons>echo %ROO_HOME%
        %ROO_HOME%
        
        C:\Users\juleslyons>echo %PATH%
        C:\work\jdk1.6.0_13\bin;C:\work\oracle11g\product\11.1.0\client_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\Common File
        s\Roxio Shared\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\9.0\DLLShared\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\work\SlikSvn\bin\;D:\work\spring-roo-1.0.0.M
        1\bin;C:\Program Files (x86)\Mozilla Firefox
        
        C:\Users\juleslyons>set PATH=D:\work\spring-roo-1.0.0.M1\bin;%PATH%
        
        C:\Users\juleslyons>cd workspace
        
        C:\Users\juleslyons\workspace>cd wedding
        
        C:\Users\juleslyons\workspace\wedding>echo %PATH%
        D:\work\spring-roo-1.0.0.M1\bin;C:\work\jdk1.6.0_13\bin;C:\work\oracle11g\product\11.1.0\client_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)
        \Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\Common Files\RoxioShared\9.0\DLLShared\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\work\SlikSvn\bin\;D:\work\spring-roo-1.0.0.M1\bin;C:\Program Files (x86)\Mozilla Firefox
        
        C:\Users\juleslyons\workspace\wedding>roo
        Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/roo/bootstrap/Bootstrap
        Caused by: java.lang.ClassNotFoundException: org.springframework.roo.bootstrap.Bootstrap
                at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
                at java.security.AccessController.doPrivileged(Native Method)
                at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
                at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
                at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
        Could not find the main class: org.springframework.roo.bootstrap.Bootstrap.  Program will exit.
        
        C:\Users\juleslyons\workspace\wedding>

        Comment


        • #5
          i've found the problem...if ROO and your project are on different drives (on Windows), that's when this exception occurs..

          should a jira be opened for this?

          thanks

          Comment


          • #6
            I am also seeing this problem, but on linux

            I recently upgraded to Ubuntu 9.10 and so I had to reinstall STS and Roo and everything else.

            Now I can't run the roo shell in the terminal or in STS.

            In the terminal I see
            Code:
            Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/roo/bootstrap/Bootstrap
            Caused by: java.lang.ClassNotFoundException: org.springframework.roo.bootstrap.Bootstrap
            	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
            	at java.security.AccessController.doPrivileged(Native Method)
            	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
            	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
            	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
            	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
            	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
            Could not find the main class: org.springframework.roo.bootstrap.Bootstrap.  Program will exit.
            and in the STS roo shell I see
            Code:
            Please stand by until the Roo Shell is completely loaded.
            
            No valid Spring Roo installation configured. The Roo version must be at least 1.0.0.RC3
            but I have Roo 1 RC3 installed... Any hints?

            Comment


            • #7
              Oh, nevermind--
              Looks like I just had my symlink set wrong. I noticed that it worked when I went directly to roo's directory and ran sh roo.sh.
              Then I did this:

              sudo rm /usr/bin/roo
              sudo ln -s /opt/springsource/roo-1.0.0.RC3/bin/roo.sh /usr/bin/roo

              It is working now.

              Comment

              Working...
              X