Issue Details (XML | Word | Printable)

Key: GLASSFISH-20623
Type: Bug Bug
Status: Resolved Resolved
Resolution: Duplicate
Priority: Major Major
Assignee: Hong Zhang
Reporter: juanmiguelbg
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
glassfish

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

Created: 11/Jun/13 10:40 AM   Updated: 09/Jul/13 01:01 PM   Resolved: 09/Jul/13 01:01 PM
Component/s: deployment
Affects Version/s: 3.1.2.2
Fix Version/s: None

Time Tracking:
Not Specified

Environment:

GlassFish Server Open Source Edition 3.1.2.2
Windows XP SP3

Issue Links:
Related
 

Tags:
Participants: Hong Zhang, Jeremy_Lv, juanmiguelbg and Romain Grécourt


 Description  « Hide

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.



Romain Grécourt added a comment - 11/Jun/13 11:41 AM

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


Hong Zhang added a comment - 11/Jun/13 01:22 PM

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?


Jeremy_Lv added a comment - 11/Jun/13 02:45 PM

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


Romain Grécourt added a comment - 11/Jun/13 03:01 PM

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


Jeremy_Lv added a comment - 11/Jun/13 03:22 PM - 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 - 11/Jun/13 03:23 PM
Field Original Value New Value
Link This issue is related to GLASSFISH-18789 [ GLASSFISH-18789 ]
Romain Grécourt added a comment - 11/Jun/13 03:39 PM

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 ?


Jeremy_Lv added a comment - 11/Jun/13 04:00 PM

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.


Romain Grécourt added a comment - 11/Jun/13 07:06 PM

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.


Hong Zhang added a comment - 09/Jul/13 01:01 PM

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 - 09/Jul/13 01:01 PM
Status Open [ 1 ] Resolved [ 5 ]
Resolution Duplicate [ 3 ]