我有一个 Glassfish 3.1.2 集群。我有 2 个 ssh 节点,每个节点都有 1 个实例。我在 DASdomains/mydomain/config/mycluster-config/lib/
目录中添加了我的 lib jar。当我重新启动我的实例时,我看到 jars 被复制到
nodes/node1/instance1/config/mycluster-config/lib/
目录和
nodes/node2/instance2/config/mycluster-config/lib/
目录中的每个节点。
我的应用程序是带有 Richfaces 4.3 的 JSF 2.2 应用程序
问题是当我部署我的应用程序时,应用程序无法从我的库中找到任何 jar。一个问题是:如何设置节点的类路径?我已经尝试过:
export LD_LIBRARY_PATH="/path/to/node1/instance1/config/prodc-config/lib"
在另一个节点上的命令相同。这并没有使我的应用程序能够找到库。
如果我将 EAR 部署到独立域而不是集群,那么它将在没有任何错误的情况下部署。
当我从 Web 管理控制台部署我的应用程序时,我会检查是否启用了可用性并确保目标指向 mycluster。
这些是我得到的一些错误:
WELD-000119 Not generating any bean definitions from com.my.domain.Validate because of underlying class loading error
Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory. Attempting to find backup.
集群始终能够启动。实例启动和停止都很好。
部署我的 EAR 时的完整消息是:
Warning Command succeeded with Warning
"domain/applications/application/my_EAR" created successfully.
WARNING: Command _deploy did not complete successfully on server instance instance1: remote failure:
Failed to load the application on instance instance1.
The application will not run properly. Please fix your application and redeploy.
Exception while shutting down application container : java.lang.NullPointerException. Please see server.log for more details.
WARNING: Command _deploy did not complete successfully on server instance instance2: remote failure:
Failed to load the application on instance instance2. The application will not run properly. Please fix your application and redeploy.
Exception while shutting down application container : java.lang.NullPointerException. Please see server.log for more details.
WARNING: Command _deploy did not complete successfully on server instance instance1: remote failure:
Failed to load the application on instance instance1. The .... msg.seeServerLog
感谢您对我的问题的任何帮助。