glassfish
  1. glassfish
  2. GLASSFISH-20419

capture-schema, package-appclient and jspc do not work when invoked with space in path

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.0_b85
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Linux

      Description

      capture-schema, package-appclient and jspc do not work when glassfish is installed in directory with space.

      [root@localhost local]# "./glass fish4/glassfish/bin/jspc"
      dirname: extra operand `fish4/glassfish/bin/jspc'
      Try `dirname --help' for more information.
      Error: Could not find or load main class org.apache.jasper.JspC
      [root@localhost local]#
      

      In the script, AS_INSTALL=`dirname $0`/.. does not work if dirname contains space.

        Issue Links

          Activity

          Hide
          Tim Quinn added a comment -

          Did you actually install the product somehow into "glass fish4" or is that a typo in the editor? The glassfish4 directory name is embedded into the zip file's entries.

          For the package-appclient case can you please post a copy of your session including the error?

          I just unzipped glassfish.zip into the directory "with space" and was able to run package-appclient successfully (on Mac OS X).

          Show
          Tim Quinn added a comment - Did you actually install the product somehow into "glass fish4" or is that a typo in the editor? The glassfish4 directory name is embedded into the zip file's entries. For the package-appclient case can you please post a copy of your session including the error? I just unzipped glassfish.zip into the directory "with space" and was able to run package-appclient successfully (on Mac OS X).
          Hide
          tak09 added a comment -

          In the previous post, I unzipped the file and then rename the directory name to "glass fish4". mv glassfish4 "glass fish4".

          This time, I installed it in "/usr/local/test 123" to make it easier to explain. The problem is exactly same.

          [root@localhost /]# /usr/local/test\ 123/glassfish4/glassfish/bin/jspc
          dirname: extra operand `123/glassfish4/glassfish/bin/jspc'
          Try `dirname --help' for more information.
          Error: Could not find or load main class org.apache.jasper.JspC
          [root@localhost /]# /usr/local/test\ 123/glassfish4/glassfish/bin/package-appclient
          dirname: extra operand `123/glassfish4/glassfish/bin/package-appclient'
          Try `dirname --help' for more information.
          /usr/local/test 123/glassfish4/glassfish/bin/package-appclient: line 51: /../config/asenv.conf: No such file or directory
          [root@localhost /]# /usr/local/test\ 123/glassfish4/glassfish/bin/capture-schema
          dirname: extra operand `123/glassfish4/glassfish/bin/capture-schema'
          Try `dirname --help' for more information.
          java -Xms24m -Xmx96m -cp /../modules/common-util.jar;/../modules/cmp-utility.jar;/../modules/cmp-support-ejb.jar;/../modules/cmp-ejb-mapping.jar;/../modules/dbschema-repackaged.jar; com.sun.jdo.spi.persistence.support.ejb.util.CaptureSchemaWrapper
          Error: Could not find or load main class com.sun.jdo.spi.persistence.support.ejb.util.CaptureSchemaWrapper
          [root@localhost /]# 
          
          
          Show
          tak09 added a comment - In the previous post, I unzipped the file and then rename the directory name to "glass fish4". mv glassfish4 "glass fish4". This time, I installed it in "/usr/local/test 123" to make it easier to explain. The problem is exactly same. [root@localhost /]# /usr/local/test\ 123/glassfish4/glassfish/bin/jspc dirname: extra operand `123/glassfish4/glassfish/bin/jspc' Try `dirname --help' for more information. Error: Could not find or load main class org.apache.jasper.JspC [root@localhost /]# /usr/local/test\ 123/glassfish4/glassfish/bin/package-appclient dirname: extra operand `123/glassfish4/glassfish/bin/package-appclient' Try `dirname --help' for more information. /usr/local/test 123/glassfish4/glassfish/bin/package-appclient: line 51: /../config/asenv.conf: No such file or directory [root@localhost /]# /usr/local/test\ 123/glassfish4/glassfish/bin/capture-schema dirname: extra operand `123/glassfish4/glassfish/bin/capture-schema' Try `dirname --help' for more information. java -Xms24m -Xmx96m -cp /../modules/common-util.jar;/../modules/cmp-utility.jar;/../modules/cmp-support-ejb.jar;/../modules/cmp-ejb-mapping.jar;/../modules/dbschema-repackaged.jar; com.sun.jdo.spi.persistence.support.ejb.util.CaptureSchemaWrapper Error: Could not find or load main class com.sun.jdo.spi.persistence.support.ejb.util.CaptureSchemaWrapper [root@localhost /]#
          Hide
          Tim Quinn added a comment -

          Linking this umbrella issue to the one specific to the package-appclient script.

          Show
          Tim Quinn added a comment - Linking this umbrella issue to the one specific to the package-appclient script.
          Hide
          Tim Quinn added a comment - - edited

          The original title was misleading.

          To see the problem, install GlassFish into a path which contains a path and invoke one of the scripts mentioned in a way that includes the space. Installing GlassFish into a path containing a space is by itself not sufficient to trigger the problem; you have to include the space in the path you use to run the script also.

          Show
          Tim Quinn added a comment - - edited The original title was misleading. To see the problem, install GlassFish into a path which contains a path and invoke one of the scripts mentioned in a way that includes the space. Installing GlassFish into a path containing a space is by itself not sufficient to trigger the problem; you have to include the space in the path you use to run the script also.
          Hide
          Mahesh Kannan added a comment -

          This issue doesn't belong to 'batch' component

          Show
          Mahesh Kannan added a comment - This issue doesn't belong to 'batch' component

            People

            • Assignee:
              michael.y.chen
              Reporter:
              tak09
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: