我有两台 linux 服务器,它们有一个运行在 2 个 WAR 文件中的两个 java 应用程序的 tomcat 7.0.42。我在 linux 上使用 JDK7u25,但其中一个仍然有一个指向 jdk1.4.2 的符号链接(我没有管理员权限,所以我无法更改它)。
具有正确符号链接 /usr/bin/java --> jdk 7 的 Linux 服务器工作正常。应用程序运行没有任何问题。
另一个具有 /usr/bin/java --> jdk1.4.2 的 Linux 服务器,但在 tomcat 中有一个 JAVA_HOME 设置为 jdk 7,(JAVA_HOME=//jdk_1.7.0.25/),在部署我的应用。我的应用需要 Forkjoin API(仅在 jdk 7 中可用)。
我注意到这两个服务器之间的唯一区别是符号链接。
我将工作的tomcat(目录+应用程序+ JDK)复制到不工作的服务器,并将JAVA_HOME设置为导入的工作JDK,但仍然无法工作......它不断向我抛出错误消息并且无法运行应用程序。
这是日志,尽管我认为它不够明确,无法理解我在做什么。
WARNING: Exception encountered when executing an asynchronous task com.quartetfs.fwk.QuartetRuntimeException: com.quartetfs.biz.pivot.MergeException: [rcpcn0c-29706] Could not merge commit 2 from BoNYslNonCashCollateralsCube( r9szn0c-50673) in BoNYslNonCashCollateralsDistributedCube at com.quartetfs.biz.pivot.distribution.impl.DistributedDimensionsManager$ApplyInitialMessageTask.consume(DistributedDimensionsManager.java:493) at com.quartetfs.biz.pivot.distribution.impl.DistributedDimensionsManager$ApplyInitialMessageTask.consume(DistributedDimensionsManager.java:408) at jsr166.impl.SingleConsumerQueue.tryConsume(SingleConsumerQueue.java:249) at com.quartetfs.biz.pivot.distribution.impl.DistributedDimensionsManager$ApplyInitialMessageTask.compute(DistributedDimensionsManager.java:439) at jsr166.cancellable.impl.CancellableRecursiveAction.executeTask(CancellableRecursiveAction.java:28) at jsr166.cancellable.impl.CancellableForkJoinTask.exec(CancellableForkJoinTask.java:79) at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:264) at jsr166e.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:990) at jsr166e.ForkJoinPool.runWorker(ForkJoinPool.java:1631) at jsr166e.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:108) Caused by: com.quartetfs.biz.pivot.MergeException: [rcpcn0c-29706] Could not merge commit 2 from BoNYslNonCashCollateralsCube( r9szn0c-50673) in BoNYslNonCashCollateralsDistributedCube at com.quartetfs.biz.pivot.impl.ADistributedActivePivot$DistributedTransactionManager.mergeDimensionsInCube(ADistributedActivePivot.java:1014) at com.quartetfs.biz.pivot.impl.ADistributedActivePivot$DistributedTransactionManager.onInitialRemoteCommit(ADistributedActivePivot.java:861) at com.quartetfs.biz.pivot.distribution.impl.DistributedDimensionsManager$ApplyInitialMessageTask.consume(DistributedDimensionsManager.java:479) ... 9 more Caused by: java.lang.IllegalArgumentException: The measure CollateralValue.SUM belongs to more than one cube at com.quartetfs.biz.pivot.distribution.impl.PolymorphicLocalityIdentifier.validateAndContribute(PolymorphicLocalityIdentifier.java:235) at com.quartetfs.biz.pivot.impl.ADistributedActivePivot$MergeDimensionsTask.compute(ADistributedActivePivot.java:770) at jsr166.cancellable.impl.CancellableRecursiveAction.executeTask(CancellableRecursiveAction.java:28) at jsr166.cancellable.impl.CancellableForkJoinTask.exec(CancellableForkJoinTask.java:79) at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:264) at jsr166e.ForkJoinTask.doInvoke(ForkJoinTask.java:360) at jsr166e.ForkJoinTask.invoke(ForkJoinTask.java:691) at com.quartetfs.biz.pivot.impl.ADistributedActivePivot$DistributedTransactionManager.mergeDimensionsInCube(ADistributedActivePivot.java:1009) ... 11 more
Aug 07, 2013 8:18:11 PM com.quartetfs.tech.distribution.messenger.impl.SafeBroadcastingTask compute INFO: Exception encountered during a broadcasting task. Retrying ... com.quartetfs.fwk.QuartetRuntimeException: java.util.concurrent.ExecutionException: com.quartetfs.fwk.QuartetRuntimeException: com.quartetfs.biz.pivot.MergeException: [rcpcn0c-29706] Could not merge commit 2 from BoNYslNonCashCollateralsCube( r9szn0c-50673) in BoNYslNonCashCollateralsDistributedCube at com.quartetfs.biz.pivot.distribution.impl.RemoteInstanceDistributionManager.onMembersChanged(RemoteInstanceDistributionManager.java:217) at com.quartetfs.tech.distribution.messenger.impl.ADistributedMessenger$MembersNotificationAction$1.compute(ADistributedMessenger.java:1046) at jsr166e.RecursiveAction.exec(RecursiveAction.java:161) at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:264) at jsr166e.ForkJoinTask.doJoin(ForkJoinTask.java:345) at jsr166e.ForkJoinTask.invokeAll(ForkJoinTask.java:756) at com.quartetfs.tech.distribution.messenger.impl.ADistributedMessenger$MembersNotificationAction.execute(ADistributedMessenger.java:1050) at jsr166.impl.DeferredActionQueue$ConsumerProcedure.consume(DeferredActionQueue.java:181) at jsr166.impl.DeferredActionQueue$ConsumerProcedure.consume(DeferredActionQueue.java:157) at jsr166.impl.SingleConsumerQueue.tryConsume(SingleConsumerQueue.java:249) at jsr166.impl.DeferredActionQueue.executeAll(DeferredActionQueue.java:68) at jsr166.impl.DeferredActionQueue$DeferredExecutionAction.compute(DeferredActionQueue.java:274) at jsr166e.RecursiveAction.exec(RecursiveAction.java:161) at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:264) at jsr166e.ForkJoinTask.doInvoke(ForkJoinTask.java:360) at jsr166e.ForkJoinTask.invoke(ForkJoinTask.java:691) at com.quartetfs.tech.distribution.messenger.impl.SafeBroadcastingTask.compute(SafeBroadcastingTask.java:101) at jsr166e.RecursiveTask.exec(RecursiveTask.java:65) at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:264) at jsr166e.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:990) at jsr166e.ForkJoinPool.runWorker(ForkJoinPool.java:1631) at jsr166e.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:108) Caused by: java.util.concurrent.ExecutionException: com.quartetfs.fwk.QuartetRuntimeException: com.quartetfs.biz.pivot.MergeException: [rcpcn0c-29706] Could not merge commit 2 from BoNYslNonCashCollateralsCube( r9szn0c-50673) in BoNYslNonCashCollateralsDistributedCube at com.quartetfs.tech.distribution.messenger.future.impl.ACompositeFuture.getResult(ACompositeFuture.java:155) at com.quartetfs.tech.distribution.messenger.future.impl.ACompositeFuture.getOrCancel(ACompositeFuture.java:251) at com.quartetfs.tech.distribution.messenger.impl.ADistributedMessenger.sendMessages(ADistributedMessenger.java:793) at com.quartetfs.tech.distribution.messenger.impl.ADistributedMessenger.sendMessage(ADistributedMessenger.java:864) at com.quartetfs.biz.pivot.distribution.impl.RemoteInstanceDistributionManager.onMembersChanged(RemoteInstanceDistributionManager.java:215) ... 21 more Caused by: com.quartetfs.fwk.QuartetRuntimeException: com.quartetfs.biz.pivot.MergeException: [rcpcn0c-29706] Could not merge commit 2 from BoNYslNonCashCollateralsCube( r9szn0c-50673) in BoNYslNonCashCollateralsDistributedCube at com.quartetfs.biz.pivot.distribution.impl.DistributedDimensionsManager$ApplyInitialMessageTask.consume(DistributedDimensionsManager.java:493) at com.quartetfs.biz.pivot.distribution.impl.DistributedDimensionsManager$ApplyInitialMessageTask.consume(DistributedDimensionsManager.java:408) at jsr166.impl.SingleConsumerQueue.tryConsume(SingleConsumerQueue.java:249) at com.quartetfs.biz.pivot.distribution.impl.DistributedDimensionsManager$ApplyInitialMessageTask.compute(DistributedDimensionsManager.java:439) at jsr166.cancellable.impl.CancellableRecursiveAction.executeTask(CancellableRecursiveAction.java:28) at jsr166.cancellable.impl.CancellableForkJoinTask.exec(CancellableForkJoinTask.java:79) ... 4 more Caused by: com.quartetfs.biz.pivot.MergeException: [rcpcn0c-29706] Could not merge commit 2 from BoNYslNonCashCollateralsCube( r9szn0c-50673) in BoNYslNonCashCollateralsDistributedCube at com.quartetfs.biz.pivot.impl.ADistributedActivePivot$DistributedTransactionManager.mergeDimensionsInCube(ADistributedActivePivot.java:1014) at com.quartetfs.biz.pivot.impl.ADistributedActivePivot$DistributedTransactionManager.onInitialRemoteCommit(ADistributedActivePivot.java:861) at com.quartetfs.biz.pivot.distribution.impl.DistributedDimensionsManager$ApplyInitialMessageTask.consume(DistributedDimensionsManager.java:479) ... 9 more Caused by: java.lang.IllegalArgumentException: The measure CollateralValue.SUM belongs to more than one cube at com.quartetfs.biz.pivot.distribution.impl.PolymorphicLocalityIdentifier.validateAndContribute(PolymorphicLocalityIdentifier.java:235) at com.quartetfs.biz.pivot.impl.ADistributedActivePivot$MergeDimensionsTask.compute(ADistributedActivePivot.java:770) at jsr166.cancellable.impl.CancellableRecursiveAction.executeTask(CancellableRecursiveAction.java:28) at jsr166.cancellable.impl.CancellableForkJoinTask.exec(CancellableForkJoinTask.java:79) at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:264) at jsr166e.ForkJoinTask.doInvoke(ForkJoinTask.java:360) at jsr166e.ForkJoinTask.invoke(ForkJoinTask.java:691) at com.quartetfs.biz.pivot.impl.ADistributedActivePivot$DistributedTransactionManager.mergeDimensionsInCube(ADistributedActivePivot.java:1009) ... 11 more
和另一个重复的日志错误:
SEVERE: HelloMessage [HelloMessage-rcpcn0c-47329-62] could not be transmitted
java.util.concurrent.CancellationException
at com.quartetfs.tech.distribution.messenger.future.impl.ACompositeFuture.getResult(ACompositeFuture.java:159)
at com.quartetfs.tech.distribution.messenger.future.impl.ACompositeFuture.getOrCancel(ACompositeFuture.java:251)
at com.quartetfs.tech.distribution.messenger.impl.ADistributedMessenger.sendMessages(ADistributedMessenger.java:793)
at com.quartetfs.tech.distribution.messenger.impl.ADistributedMessenger.sendMessage(ADistributedMessenger.java:864)
at com.quartetfs.tech.distribution.messenger.impl.ADistributedMessenger.broadcast(ADistributedMessenger.java:881)
at com.quartetfs.tech.distribution.messenger.impl.JGroupsMessenger.ensureMembersCommunication(JGroupsMessenger.java:174)
at com.quartetfs.tech.distribution.messenger.impl.ADistributedMessenger$MembersNotificationAction.execute(ADistributedMessenger.java:1004)
at jsr166.impl.DeferredActionQueue$ConsumerProcedure.consume(DeferredActionQueue.java:181)
at jsr166.impl.DeferredActionQueue$ConsumerProcedure.consume(DeferredActionQueue.java:157)
at jsr166.impl.SingleConsumerQueue.tryConsume(SingleConsumerQueue.java:249)
at jsr166.impl.DeferredActionQueue.executeAll(DeferredActionQueue.java:68)
at jsr166.impl.DeferredActionQueue$DeferredExecutionAction.compute(DeferredActionQueue.java:274)
at jsr166e.RecursiveAction.exec(RecursiveAction.java:161)
at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:264)
at jsr166e.ForkJoinTask.doInvoke(ForkJoinTask.java:360)
at jsr166e.ForkJoinTask.invoke(ForkJoinTask.java:691)
at com.quartetfs.tech.distribution.messenger.impl.SafeBroadcastingTask.compute(SafeBroadcastingTask.java:101)
at jsr166e.RecursiveTask.exec(RecursiveTask.java:65)
at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:264)
at jsr166e.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:990)
at jsr166e.ForkJoinPool.runWorker(ForkJoinPool.java:1631)
at jsr166e.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:108)
Aug 07, 2013 8:18:29 PM com.quartetfs.tech.distribution.messenger.impl.SafeBroadcastingTask compute
INFO: Exception encountered during a broadcasting task. Retrying ...
com.quartetfs.fwk.QuartetRuntimeException: Could not connect to remote instances
at com.quartetfs.tech.distribution.messenger.impl.JGroupsMessenger.ensureMembersCommunication(JGroupsMessenger.java:188)
at com.quartetfs.tech.distribution.messenger.impl.ADistributedMessenger$MembersNotificationAction.execute(ADistributedMessenger.java:1004)
at jsr166.impl.DeferredActionQueue$ConsumerProcedure.consume(DeferredActionQueue.java:181)
at jsr166.impl.DeferredActionQueue$ConsumerProcedure.consume(DeferredActionQueue.java:157)
at jsr166.impl.SingleConsumerQueue.tryConsume(SingleConsumerQueue.java:249)
at jsr166.impl.DeferredActionQueue.executeAll(DeferredActionQueue.java:68)
at jsr166.impl.DeferredActionQueue$DeferredExecutionAction.compute(DeferredActionQueue.java:274)
at jsr166e.RecursiveAction.exec(RecursiveAction.java:161)
at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:264)
at jsr166e.ForkJoinTask.doInvoke(ForkJoinTask.java:360)
at jsr166e.ForkJoinTask.invoke(ForkJoinTask.java:691)
at com.quartetfs.tech.distribution.messenger.impl.SafeBroadcastingTask.compute(SafeBroadcastingTask.java:101)
at jsr166e.RecursiveTask.exec(RecursiveTask.java:65)
at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:264)
at jsr166e.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:990)
at jsr166e.ForkJoinPool.runWorker(ForkJoinPool.java:1631)
at jsr166e.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:108)
Caused by: java.util.concurrent.CancellationException
at com.quartetfs.tech.distribution.messenger.future.impl.ACompositeFuture.getResult(ACompositeFuture.java:159)
at com.quartetfs.tech.distribution.messenger.future.impl.ACompositeFuture.getOrCancel(ACompositeFuture.java:251)
at com.quartetfs.tech.distribution.messenger.impl.ADistributedMessenger.sendMessages(ADistributedMessenger.java:793)
at com.quartetfs.tech.distribution.messenger.impl.ADistributedMessenger.sendMessage(ADistributedMessenger.java:864)
at com.quartetfs.tech.distribution.messenger.impl.ADistributedMessenger.broadcast(ADistributedMessenger.java:881)
at com.quartetfs.tech.distribution.messenger.impl.JGroupsMessenger.ensureMembersCommunication(JGroupsMessenger.java:174)
... 16 more
即使我已将 JAVA_HOME 设置到正确的位置,它是否可以来自 /usr/bin/java 下的 java?我找不到tomcat如何真正使用java ...