glassfish
  1. glassfish
  2. GLASSFISH-20623

Error creationg "granted.policy" file on Windows with property "version-identifier" on "glassfish-application.xml" file

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 3.1.2.2
    • Fix Version/s: None
    • Component/s: deployment
    • Labels:
      None
    • Environment:

      GlassFish Server Open Source Edition 3.1.2.2
      Windows XP SP3

      Description

      In application with EJBs on web module, I've the property version-identifier with value 0.0.1 on glassfish-application.xml file. When I try to deploy to server I get the next error:


      {{Deployment Error for module: fundeweb2-ear: Error durante el despliegue:

      Exception while loading the app : Error in committing security policy for ejbs of fundeweb2-ear:0.0.1 –

      javax.security.jacc.PolicyContextException: java.io.FileNotFoundException:

      C:\FundeWeb\2.0\servidores\glassfish3\glassfish\domains\fundeweb\generated\policy*fundeweb2-ear:0.0.1*\web_fundeweb2_internal\granted.policy

      (El nombre de archivo, directorio o etiqueta del volumen no es válido). Consulte server.log para obtener más información.}}


      The problem is in the path of the file: fundeweb2-ear:0.0.1 isn't a valid path in windows. In Windows, you can't use : in paths.

        Issue Links

          Activity

          juanmiguelbg created issue -
          Hide
          Romain Grécourt added a comment -

          ':' is not a valid character on windows filesystems.
          The untagged name ("fundeweb2-ear") and the version identifier are separated by a '-' in the filesystem.

          It looks like some code does not use the versioning utilities to resolve correct paths for versioned applications.

          Show
          Romain Grécourt added a comment - ':' is not a valid character on windows filesystems. The untagged name ("fundeweb2-ear") and the version identifier are separated by a '-' in the filesystem. It looks like some code does not use the versioning utilities to resolve correct paths for versioned applications.
          Hide
          Hong Zhang added a comment -

          Yes, seems when the security code calculates the security policy, it did not take consideration of the versioned application.

          Jeremy: I remember you fixed something similar recently in the security code for this, can you try to see if your fix also address this issue?

          Show
          Hong Zhang added a comment - Yes, seems when the security code calculates the security policy, it did not take consideration of the versioned application. Jeremy: I remember you fixed something similar recently in the security code for this, can you try to see if your fix also address this issue?
          Hide
          Jeremy_Lv added a comment -

          juanmiguelbg:
          Cc: Hong, Romain:

          Yes, I have checked in the changes to the glassfish trunk and the symbol of ":" is a valid character on windows files systems during the GFV4.0.1

          Here's some of the detailed discussion in the https://java.net/jira/browse/GLASSFISH-18789.

          Thanks

          Show
          Jeremy_Lv added a comment - juanmiguelbg: Cc: Hong, Romain: Yes, I have checked in the changes to the glassfish trunk and the symbol of ":" is a valid character on windows files systems during the GFV4.0.1 Here's some of the detailed discussion in the https://java.net/jira/browse/GLASSFISH-18789 . Thanks
          Hide
          Romain Grécourt added a comment -

          I presume you meant to say "':" is not a valid character

          If this is fixed in the trunk, then we should certainly ask junamiguelbg to verify this issue against a nightly build of 4.0.1 (http://dlc.sun.com.edgesuite.net/glassfish/4.0.1/nightly/)

          Show
          Romain Grécourt added a comment - I presume you meant to say "':" is not a valid character If this is fixed in the trunk, then we should certainly ask junamiguelbg to verify this issue against a nightly build of 4.0.1 ( http://dlc.sun.com.edgesuite.net/glassfish/4.0.1/nightly/ )
          Hide
          Jeremy_Lv added a comment - - edited

          I presume you meant to say "':" is not a valid character

          Here's some of the clear informations:
          Yes, we can't define the directory name if it contain the symbol ":" based on the windows platform, but I think we can define the name option in the
          glassfish-application.xml or deploy the application when specify the value of --name contains the symbol ":"

          If this is fixed in the trunk, then we should certainly ask junamiguelbg to verify this issue against a nightly build of 4.0.1 (http://dlc.sun.com.edgesuite.net/glassfish/4.0.1/nightly/)

          Pls regard the tips as Romain has suggested.

          Show
          Jeremy_Lv added a comment - - edited I presume you meant to say "':" is not a valid character Here's some of the clear informations: Yes, we can't define the directory name if it contain the symbol ":" based on the windows platform, but I think we can define the name option in the glassfish-application.xml or deploy the application when specify the value of --name contains the symbol ":" If this is fixed in the trunk, then we should certainly ask junamiguelbg to verify this issue against a nightly build of 4.0.1 ( http://dlc.sun.com.edgesuite.net/glassfish/4.0.1/nightly/ ) Pls regard the tips as Romain has suggested.
          Hong Zhang made changes -
          Field Original Value New Value
          Link This issue is related to GLASSFISH-18789 [ GLASSFISH-18789 ]
          Hide
          Romain Grécourt added a comment -

          The values of the VERSION_SEPARATOR (':') and REPOSITORY_DASH ('~') are currently hardcoded.
          Are you suggesting to allow configuration of REPOSITORY_DASH via command option or deployment descriptor ?

          Show
          Romain Grécourt added a comment - The values of the VERSION_SEPARATOR (':') and REPOSITORY_DASH ('~') are currently hardcoded. Are you suggesting to allow configuration of REPOSITORY_DASH via command option or deployment descriptor ?
          Hide
          Jeremy_Lv added a comment -

          The values of the VERSION_SEPARATOR (':') and REPOSITORY_DASH ('~') are currently hardcoded.

          Yes, it is.

          Are you suggesting to allow configuration of REPOSITORY_DASH via command option or deployment descriptor ?

          Yes, I have changed the latest syntax so that it can be deployed as specified the value of --name contains the ":" to allow configuration of REPOSITORY_DASH via command option or deployment descriptor

          Windows Platform:
          For example, if I deploy the application as "asadmin deploy --name fundeweb2-ear:0.0.1 appname", the application can be deployed successfully and there will be a directory called fundeweb2-ear~0.0.1 under the domains/domain_name/applications

          while you list the application name , the application name is still fundeweb2-ear:0.0.1.

          I think this is the right syntax.

          Show
          Jeremy_Lv added a comment - The values of the VERSION_SEPARATOR (':') and REPOSITORY_DASH ('~') are currently hardcoded. Yes, it is. Are you suggesting to allow configuration of REPOSITORY_DASH via command option or deployment descriptor ? Yes, I have changed the latest syntax so that it can be deployed as specified the value of --name contains the ":" to allow configuration of REPOSITORY_DASH via command option or deployment descriptor Windows Platform: For example, if I deploy the application as "asadmin deploy --name fundeweb2-ear:0.0.1 appname", the application can be deployed successfully and there will be a directory called fundeweb2-ear~0.0.1 under the domains/domain_name/applications while you list the application name , the application name is still fundeweb2-ear:0.0.1. I think this is the right syntax.
          Hide
          Romain Grécourt added a comment -

          I see, I completely misunderstood your previous comment, please ignore my answer to it.

          Thank you for fixing #18789 ! I'd say this issue could be marked as duplicate.

          Show
          Romain Grécourt added a comment - I see, I completely misunderstood your previous comment, please ignore my answer to it. Thank you for fixing #18789 ! I'd say this issue could be marked as duplicate.
          Hide
          Hong Zhang added a comment -

          Closing the bug as duplicate of issue 18789 (which was already fixed in 4.0) based on jeremy and romain's comments.

          Show
          Hong Zhang added a comment - Closing the bug as duplicate of issue 18789 (which was already fixed in 4.0) based on jeremy and romain's comments.
          Hong Zhang made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Duplicate [ 3 ]

            People

            • Assignee:
              Hong Zhang
              Reporter:
              juanmiguelbg
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: