To recreate this AM I created a fresh project on a fresh install of
glassfish build48 and added the following to application.xml only
(modified no other files):
<security-role>
<role-name>employee</role-name>
</security-role>
The result from the netbeans output screen is:
ADM1064:The upload file at [C:\Documents and Settings\Dennis\Local
Settings\Temp\s1astempdomain1server1032367450\App.ear] exists and will
be overwritten.
ADM1006:Uploading the file to:[C:\Documents and Settings\Dennis\Local
Settings\Temp\s1astempdomain1server1032367450\App.ear]
Linked policy contexts have different roleToSubjectMaps
[App/App-war_war] [App/App-ejb_jar].
"commit failed for policy context [App/App-war_war] caught
java.lang.RuntimeException: Linked policy contexts have different
roleToSubjectMaps (App/App-war_war)<->(App/App-ejb_jar).
UTIL6040: Error attempting to delete
C:\java\sun\glassfish\domains\domain1\generated\xml\j2ee-apps\App
UTIL6041: Performing gc to try to force file closures
UTIL6043: Attempt to delete
C:\java\sun\glassfish\domains\domain1\generated\xml\j2ee-apps\App failed
after 4 retries
UTIL6048: Attempt to delete
C:\java\sun\glassfish\domains\domain1\generated\xml\j2ee-apps\App
failed; now marked for delete-on-exit
Exception occured in J2EEC Phase
com.sun.enterprise.deployment.backend.IASDeploymentException: Cannot
generate policy file for App. --
javax.security.jacc.PolicyContextException: java.lang.RuntimeException:
Linked policy contexts have different roleToSubjectMaps
(App/App-war_war)<->(App/App-ejb_jar)
at
com.sun.enterprise.security.SecurityUtil.generatePolicyFile(SecurityUtil.java:242)
at
com.sun.enterprise.deployment.backend.AppDeployerBase.generatePolicy(AppDeployerBase.java:379)
at
com.sun.enterprise.deployment.backend.AppDeployer.doRequestFinish(AppDeployer.java:130)
at
com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:169)
at
com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:95)
at
com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:871)
at
com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:266)
at
com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:739)
at
com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:174)
at
com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:210)
|#]
I had started out by trying to add the security-role to web.xml but got
pretty much the same output:
ADM1064:The upload file at [C:\Documents and Settings\Dennis\Local
Settings\Temp\s1astempdomain1server1032367450\App.ear] exists and will
be overwritten.
ADM1006:Uploading the file to:[C:\Documents and Settings\Dennis\Local
Settings\Temp\s1astempdomain1server1032367450\App.ear]
Linked policy contexts have different roleToSubjectMaps
[App/App-war_war] [App/App-ejb_jar].
"commit failed for policy context [App/App-war_war] caught
java.lang.RuntimeException: Linked policy contexts have different
roleToSubjectMaps (App/App-war_war)<->(App/App-ejb_jar).
Exception occured in J2EEC Phase
com.sun.enterprise.deployment.backend.IASDeploymentException: Cannot
generate policy file for App. --
javax.security.jacc.PolicyContextException: java.lang.RuntimeException:
Linked policy contexts have different roleToSubjectMaps
(App/App-war_war)<->(App/App-ejb_jar)
at
com.sun.enterprise.security.SecurityUtil.generatePolicyFile(SecurityUtil.java:242)
at
com.sun.enterprise.deployment.backend.AppDeployerBase.generatePolicy(AppDeployerBase.java:379)
at
com.sun.enterprise.deployment.backend.AppDeployer.doRequestFinish(AppDeployer.java:130)
at
com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:169)
at
com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:95)
at
com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:871)
at
com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:266)
at
com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:739)
at
com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:174)
at
com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:210)
|#]
Shing Wai Chan wrote:
> Dennis Gesker wrote:
>
>> <security-role>
>> <role-name>employee</role-name>
>> </security-role>
>>
>> When I add the element above to my application.xml I get a "Linked
>> policy contexts have different roleToSubjectMaps" error. This is a fresh
>> project.
>>
>>
> According to message format:
> pc.linked_with_different_role_maps=Linked policy contexts have
> different roleToSubjectMaps [{0}] [{1}].
> there should be more info in log message.
> Can you give us the complete message?
>
>> Could someone offer a hint as to what is happening? Shouldn't the
>> application.xml cover both my ejb.jar and war files?
>>
>>
> Do you have any <security-role> defined in other deployment descriptors?
> Do you use annotations?
>
>> Dennis
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
--
Dennis R. Gesker
email: dennis_at_alamon.com
gpg key: 0xEFA10A51