Glassfish DeploymentException: Error in linking security policy for

北城以北 提交于 2019-11-29 21:14:31

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...

I will answer this in response to the comment of @SteveTaylor. His answer in the above comment helped me solving the problem, so he is the one who deserves the credits.

Original answer from @SteveTaylor:

The problem is a corrupt OSGi cache. The reason upgrading worked for you is because you started with a clean OSGi cache. All that's needed to fix this problem is delete the entire OSGi cache under $GLASSFISH_HOME/glassfish/domains//osgi-cache

This answer worked for me as well. Thanks a lot. I am using a cluster (Oracle GlassFish 3.1.2.2) consisting of two nodes and a domain server. I removed the OSGi cache under all three directories (2 nodes and domain) after I stopped the cluster and restarted it then. After that, the problem was solved.

It happen to me to, especially after I check out different version of my web application and try to deploy it to Glassfish.

The only certain solution I've found is to completely stop galssfish, restart it and deploy the application.

In my case, I was missing @Stateless tag in one of my Managed Beans. Adding it, solved it for me. Hope it helps.

Probably a bug in the version of Glassfish I was using.

Basically changing to a different (later) version solved the problem.

I don't know if this helps, but I got the same error when deploying from the command line. In my case I'm using a pretty up-to-date version (GlassFish Server Open Source Edition 3.1.2 (build 23)). What worked for me was removing --force=true from this:

  $ sudo /usr/local/glassfish3/bin/asadmin deploy --force=true ~cornell/designer.war

What's important (I think) is that I had not previously deployed the app. Confusing!

It happen to me too. In my case, it have occurred when I try to deploy the project and forget to start the database server, and then when I start the database server and I deployed again, I got this error message. When this occurred, I recompile the code, stop the server, undeploy the old project and deploy the new again.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!