Search code examples
securitydeploymentglassfishjava-ee-6netbeans7.0

Glassfish DeploymentException: Error in linking security policy for


I have been trying to deploy my web application (war) from Glassfish AdminConsole but I keep getting the following error message -

Exception while loading the app : Error in linking security policy for MyApp-war -- Inconsistent Module State.

But it deploys without any problem when I do it from Netbeans. (I don't know if Netbeans is doing something that I am missing before deploying the application.)

And I also tried with the latest version of Glassfish (i.e. V3.1.1 (build 12) ), and I can deploy the same application without any problem from AdminConsole.

I am using Glassfish 3.1 (build 43) and Netbeans 7.0.

Is there any Security Policy setting that I have to have before deploying my application with this version of Glassfish?


Solution

  • The same thing was happening to me.

    Here is what I did:

    • Stoped the Glassfish server
    • Deleted all the content from glassfishhome/glassfish/domains/yourdomainname/generated
    • Started Glassfish

    It worked for me. But what still sucks is that everytime I need to deploy I need to follow this procedure again...