Glassfish hangs after moving installation directory

做~自己de王妃 提交于 2019-12-04 04:15:49

问题


I know the answer to this, but I'm posting this here because as an app developer, I was burned by this problem several times and it took a very long time to find the answer:

I've moved my glassfish installation dir, and now it hangs on startup.

How can I fix this?


回答1:


There are a couple strategies that you can apply to resolve this issue.

The quick and dirty 'solution' is to

  1. Make sure the server is stopped.

  2. Delete the content of the osgi-cache, by removing the osgi-cache/felix directory in your domain. This is usually found in glassfishv3/glassfish/domains/domain1 (GlassFish Server 3.0.1) OR glassfish3/glassfish/domains/domain1 (GlassFish Server 3.1).

There are situations where this will damage your domain, since you can install OSGi modules into your server that do not come from the glassfish/modules directory. To avoid this kind of problem, you may want to

  1. Verify that the server is stopped

  2. Apply this work-around.




回答2:


To give credit, the answer comes from this thread.

Here is the executive summary, and what you need to do:

I think you need to delete the existing OSGi framework cache, since the framework uses the location of the bundles as a key and moving the install directory thus changes this key. You should just be able to delete:

  glassfish-v3/glassfish/domains/domain1/osgi-cache/felix/ 


来源:https://stackoverflow.com/questions/5300034/glassfish-hangs-after-moving-installation-directory

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