glassfish
  1. glassfish
  2. GLASSFISH-20759

Invalid filename is not checked when a domain is created

    Details

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

      OS
      Windows 7 Enterprise (Service Pack 1)

      JDK
      java version "1.7.0_11"
      Java(TM) SE Runtime Environment (build 1.7.0_11-b21) Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)

      Description

      Reproducible operational steps:

      1) create a domain and enter a long domain name (246 characters or longer)
      asadmin create-domain A1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234Y
      Enter admin user name [Enter to accept default "admin" / no password]>

      Domain A1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234Y allows admin login as user "admin" with no password.
      Command create-domain executed successfully.

      The command-line does not check if the filename is valid under windows.

      2) list-domain command is OK
      asadmin list-domains
      A1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234Y not running
      domain1 not running
      Command list-domains executed successfully.

      3) start-domain command failed due to invalid filename
      asadmin start-domain A1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234Y
      JVM failed to start: java.io.IOException: Cannot run program "C:\Program Files\Java\jdk1.7.0\bin\java.exe" (in directory "C:\glassfish-4.0.1\glassfish-4.0.1-b02-07_22_2013\glassfish4\glassfish\domains\A1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234Y\config"): CreateProcess error=267, The directory name is invalid
      Command start-domain failed.

      It looks like that the directory for the newly created domain is not valid under Windows.
      The command-line (create-domain) should check this and produce an error instead of creating an invalid directory.

        Activity

        Hide
        jifeng added a comment -

        Hi
        Chris Kasso,xianwu
        I have reproduced this bug and I will give a patch later

        Show
        jifeng added a comment - Hi Chris Kasso,xianwu I have reproduced this bug and I will give a patch later
        Hide
        jifeng added a comment -

        Hi
        Chris Kasso,xianwu

        I create a patch for this bug,This is probably not the best fix.so,could you help me to review these changes and give me some suggestions?

        Show
        jifeng added a comment - Hi Chris Kasso,xianwu I create a patch for this bug,This is probably not the best fix.so,could you help me to review these changes and give me some suggestions?

          People

          • Assignee:
            Chris Kasso
            Reporter:
            xianwu
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: