问题
I got an error while restarting or re-deploying an app to Glassfish and I get the exception below:
com.sun.enterprise.admin.cli.CommandException: remote failure: Exception while loading the app : org.glassfish.deployment.common.DeploymentException: Error in linking security policy for appname -- Inconsistent Module State
What should i do to solve this issue?
回答1:
After googling for a couple of hours I found some replies and only this one worked for me:
Remove the application folder which is placed under policy folder:
rm -Rf /opt/sun-glassfish/glassfish/domains/domain1/generated/policy/appname
Then redeploy and restart Glassfish.
It should work.
回答2:
I also got same error when I try to start the payara server through eclipse, because I added new user to admin realm by mistake.
So, I started the server from bin (startserv.bat) folder, and removed newly added user from admin realm.
I started the server through eclipse and deployed the application.
It workrd for me.
来源:https://stackoverflow.com/questions/25976011/glassfish-error-in-linking-security-policy-for