[GLASSFISH-20623] Error creationg "granted.policy" file on Windows with property "version-identifier" on "glassfish-application.xml" file Created: 11/Jun/13  Updated: 09/Jul/13  Resolved: 09/Jul/13

Status: Resolved
Project: glassfish
Component/s: deployment
Affects Version/s: 3.1.2.2
Fix Version/s: None

Type: Bug Priority: Major
Reporter: juanmiguelbg Assignee: Hong Zhang
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

GlassFish Server Open Source Edition 3.1.2.2
Windows XP SP3


Issue Links:
Related
is related to GLASSFISH-18789 Cannot enable versioned application o... Resolved

 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.



 Comments   
Comment by Romain Grécourt [ 11/Jun/13 ]

':' 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.

Comment by Hong Zhang [ 11/Jun/13 ]

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?

Comment by Jeremy_Lv [ 11/Jun/13 ]

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

Comment by Romain Grécourt [ 11/Jun/13 ]

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/)

Comment by Jeremy_Lv [ 11/Jun/13 ]

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.

Comment by Romain Grécourt [ 11/Jun/13 ]

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 ?

Comment by Jeremy_Lv [ 11/Jun/13 ]

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.

Comment by Romain Grécourt [ 11/Jun/13 ]

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.

Comment by Hong Zhang [ 09/Jul/13 ]

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

Generated at Thu Feb 23 04:09:48 UTC 2017 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.