You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Denis Magda (JIRA)" <ji...@apache.org> on 2016/04/12 16:45:25 UTC

[jira] [Commented] (IGNITE-2891) Can't start ggvisorui.sh (ignite.sh etc) on CygWIN

    [ https://issues.apache.org/jira/browse/IGNITE-2891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15237305#comment-15237305 ] 

Denis Magda commented on IGNITE-2891:
-------------------------------------

Hi [~knivit], thanks for reporting. Do you have time to contribute and fix the issue in Ignite build scripts? 

GridGain scripts/builds are not a part of Ignite. However as you reported the issue is generic and located in Ignite so we would be able to validate the fix with Ignite. 

> Can't start ggvisorui.sh (ignite.sh etc) on CygWIN
> --------------------------------------------------
>
>                 Key: IGNITE-2891
>                 URL: https://issues.apache.org/jira/browse/IGNITE-2891
>             Project: Ignite
>          Issue Type: Bug
>    Affects Versions: 1.5.0.final
>            Reporter: knivit
>            Priority: Minor
>
> [ PROBLEM ]
> I've tried to start ggvisorui on CygWIN and got a fatal error:
> {code}
> $ uname && pwd
> CYGWIN_NT-10.0
> /home/user/gridgain-enterprise-fabric-7.5.8
> $ ./bin/ggvisorui.sh &
> [1] 10340
> Error: Could not find or load main class org.gridgain.visor.gui.VisorGuiLauncher
> {code}
> [ INVESTIGATION ]
> $IGNITE_HOME is set incorrectly in these scripts:
> {code}
> $ fgrep -ir -n -A 2 'cygwin' bin/
> bin/include/build-classpath.sh:38:    CYGWIN*)
> bin/include/build-classpath.sh-39-        SEP=";";
> bin/include/build-classpath.sh-40-        export IGNITE_HOME=`echo $IGNITE_HOME | sed -e 's/^\/\([a-zA-Z]\)/\1:/'`
> --
> bin/include/functions.sh:148:        CYGWIN*)
> bin/include/functions.sh-149-            SEP=";";
> bin/include/functions.sh-150-            export IGNITE_HOME=`echo $IGNITE_HOME | sed -e 's/^\/\([a-zA-Z]\)/\1:/'`
> --
> bin/include/setenv.sh:48:    CYGWIN*)
> bin/include/setenv.sh-49-        SEP=";";
> bin/include/setenv.sh-50-        export IGNITE_HOME=`echo $IGNITE_HOME | sed -e 's/^\/\([a-zA-Z]\)/\1:/'`
> {code}
> bin/include/functions.sh is sourced everywhere (ggvisurui.sh, ignite.sh etc) so they don't work.
> The cause is in using sed:
> {code}
> $ IGNITE_HOME=/home/user/gridgain-enterprise-fabric-7.5.8
> $ echo $IGNITE_HOME | sed -e 's/^\/\([a-zA-Z]\)/\1:/'
> h:ome/user/gridgain-enterprise-fabric-7.5.8
> {code}
> [ SOLUTION ]
> There is a standard utility to do the work properly:
> {code}
> $ IGNITE_HOME=/home/user/gridgain-enterprise-fabric-7.5.8
> $ cygpath --path --windows $IGNITE_HOME
> D:\cygwin64\home\user\gridgain-enterprise-fabric-7.5.8
> {code}
> BTW why the same code repeated three times ? 
> And check this:
> {code}
> getClassPathSeparator() {
>     SEP=":";
>     case "`uname`" in
>         MINGW*)
>             SEP=";";
>             export IGNITE_HOME=`echo $IGNITE_HOME | sed -e 's/^\/\([a-zA-Z]\)/\1:/'`
>             ;;
>         CYGWIN*)
>             SEP=";";
>             export IGNITE_HOME=`echo $IGNITE_HOME | sed -e 's/^\/\([a-zA-Z]\)/\1:/'`
>             ;;
>     esac
> }
> {code}
> A function with a name like "getClassPathSeparator" should NOT change anything (get... means a getter).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)