users@glassfish.java.net

Error in linking security policy for testing -- Inconsistent Module State

From: Jacques <whshub_at_gmail.com>
Date: Sat, 6 Mar 2010 10:43:00 -0800

I have an exploded ear I'm trying to deploy to Glassfishv3. The first time
I deploy the application, the deploy is successful. However, if I undeploy
and then redeploy, I receive the following exception:

Exception while loading the
app org.glassfish.deployment.common.DeploymentException: Error in linking
security policy for testing -- Inconsistent Module State

Even if I stop and restart the Glassfish server, this problem still occurs.

The ear contains an ejb-jar, a war, and two shared libraries (one of which
is a entity jar--that is unexploded because of that other bug). The ear
started presenting redeployment problems when I added the war.

Doing some investigation, I've found that a directory in generated/policy is
created for the war that ends with _internal. This is generated on the
initial deploy of the ear and is never removed (even after undeploy or the
ear). In order to redeploy, I have to delete this directory, shutdown and
restart glassfish, and then redeploy.

Does anyone have any idea what could be causing this or how to fix?

Thanks,
Jacques