]
Tomaz Cerar commented on WFLY-3740:
-----------------------------------
any chance you can try with latest wildfly-core?
standalone.sh does not compute correct module path in Cygwin
------------------------------------------------------------
Key: WFLY-3740
URL:
https://issues.jboss.org/browse/WFLY-3740
Project: WildFly
Issue Type: Bug
Components: Scripts
Affects Versions: 8.1.0.Final
Environment: Windows with Cygwin
Reporter: David Del Vecchio
Assignee: Tomaz Cerar
Priority: Minor
standalone.sh does not seem to compute the correct JBOSS_MODULEPATH on Cygwin as a
result, starting up the server gives the following error:
{noformat}
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)}}
{noformat}
The problem seems to be somewhat related to this issue in that a mix of Windows and Unix
style paths are being computed:
https://issues.jboss.org/browse/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:
{code:title=standalone.sh|borderStyle=solid}
...
export JBOSS_HOME
if [ "x$JBOSS_MODULEPATH" = "x" ]; then
JBOSS_MODULEPATH="$JBOSS_HOME/modules"
fi
...
{code}
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:
{code:title=standalone.sh|borderStyle=solid}
# 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
{code}