[jboss-jira] [JBoss JIRA] (WFLY-3740) standalone.sh does not compute correct module path in Cygwin
David Del Vecchio (JIRA)
issues at jboss.org
Fri Aug 15 19:24:29 EDT 2014
[ https://issues.jboss.org/browse/WFLY-3740?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Del Vecchio updated WFLY-3740:
------------------------------------
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:
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: {{
...
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}}
was:
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:
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:
{{...
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}}
> 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
> Security Level: Public(Everyone can see)
> Affects Versions: 8.1.0.Final
> Environment: Windows with Cygwin
> Reporter: David Del Vecchio
> Assignee: Jason Greene
> 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:
> {{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:
> 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: {{
> ...
> 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}}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
More information about the jboss-jira
mailing list