Skip to main content

2 wars in .ear => "Cannot link PolicyConfiguration to itself"

1 reply [Last post]
edrandall
Offline
Joined: 2006-03-01

We have recently tried adding a second .war module to our existing project, but cannot now deploy; the second .war is currently just a skeleton project, but something in the configuration is preventing the .ear from deploying anymore.

I can't figure out which bit of configuration is causing this - Where do I start to look?!

Thanks

Ed

[#|2008-11-18T17:36:32.523+0000|WARNING|sun-appserver9.1|javax.enterprise.system.core.security|_ThreadID=63;_ThreadName=Thread-373;_RequestID=19d88d98-386b-468b-b7c3-154ec2202146;|Cannot link PolicyConfiguration to itself.|#]

[#|2008-11-18T17:36:32.633+0000|SEVERE|sun-appserver9.1|javax.enterprise.system.tools.deployment|_ThreadID=63;_ThreadName=Thread-373;_RequestID=19d88d98-386b-468b-b7c3-154ec2202146;|Exception occured in J2EEC Phase
com.sun.enterprise.deployment.backend.IASDeploymentException: Deployment Error -- Operation attempted to link PolicyConfiguration to itself.
at com.sun.enterprise.security.provider.PolicyConfigurationImpl.linkConfiguration(PolicyConfigurationImpl.java:652)
at com.sun.enterprise.security.SecurityUtil.linkPolicyFile(SecurityUtil.java:345)
at com.sun.enterprise.deployment.backend.AppDeployerBase.generatePolicy(AppDeployerBase.java:379)
at com.sun.enterprise.deployment.backend.AppDeployer.doRequestFinish(AppDeployer.java:149)
at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:191)
at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:933)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:279)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:802)
at com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:187)
at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:225)
|#]

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
edrandall
Offline
Joined: 2006-03-01

We solved this, for the record here is the cause:

Our 2 .war files were named according to this convention:

Ourproject.pkg.war.file1.war
Ourproject.pkg.war.file2.war

We solved the issue by renaming them in this convention:

Ourproject.pkg.web.file1.war
Ourproject.pkg.web.file2.war

It seems that the deployer parses the .war file name in the web-uri of the application.xml, it stops at the first occurrence of the word ".war" and uses that name.
Hence following our initial convention, both .wars would have been deemed "the same".
Simply renaming them and adjusting the corresponding config files fixed it!