Details
-
Bug
-
Resolution: Obsolete
-
Minor
-
8.1.0.Final
-
None
-
-
Low
Description
standalone.sh does not seem to compute the correct JBOSS_MODULEPATH on Cygwin as a result, starting up the server gives the following error:
org.jboss.modules.ModuleNotFoundException: org.jboss.as.standalone:main at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:240) at org.jboss.modules.Main.main(Main.java:385)}}
The problem seems to be somewhat related to this issue in that a mix of Windows and Unix style paths are being computed: WFLY-2523
Since JBOSS_MODULEPATH is not set until after all the paths (such as JBOSS_HOME) have been converted to Windows style, JBOSS_MODULEPATH ends up with a Unix style forward slash at the end of what is otherwise a Windows style path.
The fix for me was to move the code which sets the JBOSS_MODULEPATH to earlier in the script. I moved it to right after the export JBOSS_HOME line:
... export JBOSS_HOME if [ "x$JBOSS_MODULEPATH" = "x" ]; then JBOSS_MODULEPATH="$JBOSS_HOME/modules" fi ...
Probably the key thing is just that the JBOSS_MODULEPATH gets set before everything is switched to Windows paths in this section of the script:
# For Cygwin, switch paths to Windows format before running java if $cygwin; then JBOSS_HOME=`cygpath --path --windows "$JBOSS_HOME"` JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` JBOSS_MODULEPATH=`cygpath --path --windows "$JBOSS_MODULEPATH"` JBOSS_BASE_DIR=`cygpath --path --windows "$JBOSS_BASE_DIR"` JBOSS_LOG_DIR=`cygpath --path --windows "$JBOSS_LOG_DIR"` JBOSS_CONFIG_DIR=`cygpath --path --windows "$JBOSS_CONFIG_DIR"` fi