Spring Roo
  1. Spring Roo
  2. ROO-420

Roo fails to start on windows with an installed addon

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.0.RC3
    • Fix Version/s: None
    • Component/s: @ CORE
    • Labels:
      None
    • Environment:
      Windows (XP to be specific)

      Description

      After a plugin is deployed Roo-Dev fails to start with the following error:

      java.lang.NoClassDefFoundError: org/springframework/roo/shell/CommandMarker

      This is a problem with a classpath which is caused by the use of "-Djava.ext.dirs" system property in the roo-dev.bat to load addons.

      A way to fix this issue is to load addons on the classpath using Java 6 classpath wildwards:

      rem Append addons and jre\lib\ext to the classpath, (Java 6+ is required)
      set EXT_DIRS=%USERPROFILE%\roo-dev\work*;%JAVA_HOME%\jre\lib\ext*
      set ROO_CP=%ROO_CP%;%EXT_DIRS%

      Then just remove the use of "-Djava.ext.dirs"
      java -Djline.nobell=true -DdevelopmentMode=true %ROO_OPTS% -Droo.home="%USERPROFILE%\roo-dev" -cp %ROO_CP% org.springframework.roo.bootstrap.Bootstrap "classpath:/roo-bootstrap.xml" %*

      The only downside to this solution is Java 6+ dependency as it utilizes classpath wildcards.

        Issue Links

          Activity

          Hide
          Dima May added a comment -

          roo-dev.bat with the proposed solution

          Show
          Dima May added a comment - roo-dev.bat with the proposed solution
          Hide
          Joris Kuipers added a comment -

          I'll edit the roo-dev.bat along the suggested lines: I'll first see if I can do this in the bat file itself so we can avoid the Java 6 dependency. ROO-357 also depends on a change in both roo.bat and roo-dev.bat, so I think it's a good idea to tackle these two issues together.

          Show
          Joris Kuipers added a comment - I'll edit the roo-dev.bat along the suggested lines: I'll first see if I can do this in the bat file itself so we can avoid the Java 6 dependency. ROO-357 also depends on a change in both roo.bat and roo-dev.bat, so I think it's a good idea to tackle these two issues together.
          Hide
          Joris Kuipers added a comment -

          Fixed in SVN Rev 455; used delayed variable expansion instead of relying on Java 6 CP wildcards for Java 5 compatibility.
          Please test using the updated file: it also includes a fix for ROO-357, but is backwards compatible with Roo RC3. You can download the bat file here: https://anonsvn.springframework.org/svn/spring-roo/trunk/bootstrap/roo-dev.bat

          Show
          Joris Kuipers added a comment - Fixed in SVN Rev 455; used delayed variable expansion instead of relying on Java 6 CP wildcards for Java 5 compatibility. Please test using the updated file: it also includes a fix for ROO-357 , but is backwards compatible with Roo RC3. You can download the bat file here: https://anonsvn.springframework.org/svn/spring-roo/trunk/bootstrap/roo-dev.bat
          Hide
          Dima May added a comment -

          I updated my svn checkout with the latest, tested the new solution and it worked well for me! Variable expansion fix to avoid Java 6 dependency is definitely a superior solution. Thanks for the prompt attention!

          Show
          Dima May added a comment - I updated my svn checkout with the latest, tested the new solution and it worked well for me! Variable expansion fix to avoid Java 6 dependency is definitely a superior solution. Thanks for the prompt attention!

            People

            • Assignee:
              Joris Kuipers
              Reporter:
              Dima May
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: