5 Replies Latest reply on Aug 18, 2011 6:09 AM by bosschaert

    Windows7/Cygwin: run.sh produces less output than expected

    cseg

      When I run run.sh, I don't get as much output as I expect.  Am I expecting too much, or is there something wrong?

       

      I downloaded jboss-osgi-installer-1.0.0.jar and ran the command java -jar jboss-osgi-installer-1.0.0.jar.

       

      java -version returns:

       

      $ java -version

      java version "1.6.0_26"

      Java(TM) SE Runtime Environment (build 1.6.0_26-b03)

      Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing)

       

      When I run ./run.sh, I get the following output:

       

      $ cd ~/jboss-osgi-1.0.0/runtime/bin

      $ ./run.sh

      =========================================================================

       

        JBossOSGi Bootstrap Environment

       

        OSGI_HOME: C:\Users

        JAVA: /c/Program Files/Java/jdk1.6.0_26/bin/java

       

        JAVA_OPTS: -Dprogram.name=run.sh -Dosgi.home=/c/Users/christopher.cobb/jboss-osgi-1.0.0/runtime -server -Xms128m -Xmx512m -XX:MaxPermSize=256m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.vfs.leakDebugging=true

       

      =========================================================================

       

      log4j:WARN No appenders could be found for logger (org.jboss.osgi.spi.internal.OSGiBootstrapBean).

      log4j:WARN Please initialize the log4j system properly.

       

      The output then stops.  From the documentation, I expected to see more that this.

       

      When I run with -x, the last part looks like this:

       

      + OSGI_PID=3568

      + /c/Program Files/Java/jdk1.6.0_26/bin/java -Dprogram.name=run.sh -Dosgi.home=/nes/jboss-osgi-1.0.0/runtime -server -Xms128m -Xmx512m -XX:MaxPermSize=256m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.vfs.leakDebugging=true -classpath C:\cygwin\nes\jboss-osgi-1.0.0\runtime\conf;C:\cygwin\nes\jboss-osgi-1.0.0\runtime\lib\args4j.jar;C:\cygwin\nes\jboss-osgi-1.0.0\runtime\lib\javax.inject.jar;C:\cygwin\nes\jboss-osgi-1.0.0\runtime\lib\jbosgi-deployment.jar;C:\cygwin\nes\jboss-osgi-1.0.0\runtime\lib\jbosgi-framework-core.jar;C:\cygwin\nes\jboss-osgi-1.0.0\runtime\lib\jbosgi-resolver-api.jar;C:\cygwin\nes\jboss-osgi-1.0.0\runtime\lib\jbosgi-resolver-felix.jar;C:\cygwin\nes\jboss-osgi-1.0.0\runtime\lib\jbosgi-resolver-metadata.jar;C:\cygwin\nes\jboss-osgi-1.0.0\runtime\lib\jbosgi-resolver-spi.jar;C:\cygwin\nes\jboss-osgi-1.0.0\runtime\lib\jbosgi-spi.jar;C:\cygwin\nes\jboss-osgi-1.0.0\runtime\lib\jbosgi-vfs.jar;C:\cygwin\nes\jboss-osgi-1.0.0\runtime\lib\jbosgi-vfs30.jar;C:\cygwin\nes\jboss-osgi-1.0.0\runtime\lib\jboss-common-core.jar;C:\cygwin\nes\jboss-osgi-1.0.0\runtime\lib\jboss-logging.jar;C:\cygwin\nes\jboss-osgi-1.0.0\runtime\lib\jboss-modules.jar;C:\cygwin\nes\jboss-osgi-1.0.0\runtime\lib\jboss-msc.jar;C:\cygwin\nes\jboss-osgi-1.0.0\runtime\lib\jboss-vfs.jar;C:\cygwin\nes\jboss-osgi-1.0.0\runtime\lib\junit.jar;C:\cygwin\nes\jboss-osgi-1.0.0\runtime\lib\log4j.jar;C:\cygwin\nes\jboss-osgi-1.0.0\runtime\lib\org.osgi.core.jar;C:\cygwin\nes\jboss-osgi-1.0.0\runtime\lib\shrinkwrap-api.jar org.jboss.osgi.spi.framework.OSGiBootstrap

      + echo 3568

      + trap kill -HUP  3568 HUP

      + trap kill -TERM 3568 INT

      + trap kill -QUIT 3568 QUIT

      + trap kill -PIPE 3568 PIPE

      + trap kill -TERM 3568 TERM

      + WAIT_STATUS=128

      + [ 128 -ge 128 ]

      + wait 3568

      log4j:WARN No appenders could be found for logger (org.jboss.osgi.spi.internal.OSGiBootstrapBean).

      log4j:WARN Please initialize the log4j system properly.

       

      I know that's not much to go on.  I don't see any other log files anywhere.

       

      Any suggestions?

       

      cseg

        • 1. Re: Windows7/Cygwin: run.sh produces less output than expected
          cseg

          Solved.  The problem is in these lines of run.sh:

           

          # Setup JBoss specific properties

          JAVA_OPTS="-Dprogram.name=$PROGNAME -Dosgi.home=$OSGI_HOME $JAVA_OPTS"

           

          # For Cygwin, switch paths to Windows format before running java

          if $cygwin; then

              OSGI_HOME=`cygpath --path --windows "$OSGI_HOME"`

              JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`

              OSGI_CLASSPATH=`cygpath --path --windows "$OSGI_CLASSPATH"`

          fi

           

          The JAVA_OPTS assignment needs to be moved after the cygwin conversions:

           

          # For Cygwin, switch paths to Windows format before running java

          if $cygwin; then

              OSGI_HOME=`cygpath --path --windows "$OSGI_HOME"`

              JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`

              OSGI_CLASSPATH=`cygpath --path --windows "$OSGI_CLASSPATH"`

          fi

           

          # Setup JBoss specific properties

          JAVA_OPTS="-Dprogram.name=$PROGNAME -Dosgi.home=$OSGI_HOME $JAVA_OPTS"

           

          This is because OSGI_HOME needs to be put into widows format before being added to JAVA_OPTS.

           

          Also, I needed to change these echos to /bin/echo -E so that the backslashes in the windows file names are not eaten:

           

          /bin/echo -E "  OSGI_HOME: $OSGI_HOME"

          /bin/echo -E "  JAVA: $JAVA"

          /bin/echo -E "  JAVA_OPTS: $JAVA_OPTS"

          • 2. Re: Windows7/Cygwin: run.sh produces less output than expected
            bosschaert

            Hi cseg,

             

            Great that you were able to solve it. Would you have the time to file this as an issue in JIRA? http://issues.jboss.org/browse/JBOSGI

             

            Many thanks,

             

            David

            • 3. Re: Windows7/Cygwin: run.sh produces less output than expected
              thomas.diesler
              • 4. Re: Windows7/Cygwin: run.sh produces less output than expected
                cseg

                I didn't get to your post until this morning.  Thanks for putting it up on JIRA.

                • 5. Re: Windows7/Cygwin: run.sh produces less output than expected
                  bosschaert

                  cseg wrote:

                   

                  Also, I needed to change these echos to /bin/echo -E so that the backslashes in the windows file names are not eaten:

                   

                  /bin/echo -E "  OSGI_HOME: $OSGI_HOME"

                  /bin/echo -E "  JAVA: $JAVA"

                  /bin/echo -E "  JAVA_OPTS: $JAVA_OPTS"

                   

                  I don't see this issue, without mofication to the echo statements the output appears as this for me:

                  {code}David@popwin /cygdrive/c/Users/David/jboss-osgi-1.0.0/runtime/bin

                  $ ./run.sh

                  =========================================================================

                   

                    JBossOSGi Bootstrap Environment

                   

                    OSGI_HOME: C:\Users\David\jboss-osgi-1.0.0\runtime

                   

                    JAVA: java

                   

                    JAVA_OPTS: -Dprogram.name=run.sh -Dosgi.home=C:\Users\David\jboss-osgi-1.0.0\r

                  untime -Xms128m -Xmx512m -XX:MaxPermSize=256m -Dsun.rmi.dgc.client.gcInterval=36

                  00000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.vfs.leakDebugging=true

                   

                  ========================================================================={code}

                  the above looks fine to me or am I missing something?

                   

                  I've attache a modified run.sh which incorporates your other findings to JBOSGI-492, could you give it a try to make sure it's ok?

                  https://issues.jboss.org/browse/JBOSGI-492