我有两个linux服务器,运行tomcat 7.0.42,两个java应用程序打包在2个WAR文件中。我在linux上使用JDK7u25,但其中一个仍然有jdk1.4.2的符号链接(我没有管理员权限,所以我无法改变它。)
具有正确符号链接/ usr / bin / java的Linux服务器 - > jdk 7,工作正常。应用程序正在运行,没有任何问题。
具有/ usr / bin / java的其他Linux服务器 - > jdk1.4.2,但是在tomcat中将JAVA_HOME设置为jdk 7(JAVA_HOME = // jdk_1.7.0.25 /),在部署我的应用程序时会抛出一个错误。我的应用程序需要Forkjoin API(仅在jdk 7中可用)。
我注意到这两个服务器之间的唯一区别是符号链接。
我将工作的tomcat(目录+ apps + 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 / javaeven下的java吗?我找不到tomcat如何真正使用java ...
答案 0 :(得分:1)
正如Stephen指出的那样,Tomcat根据服务器配置使用多种不同的方式来确定正在使用的java。
在大多数情况下,我首先检查工作服务器是否存在$ JAVA_HOME,以及自定义$ PATH设置。检查通常的嫌疑人:/ etc / profile,/ etc / profile.d / ,.bash ,。profile,等等。
如果您将JAVA_HOME作为实际服务运行,您甚至可以在用户级别指定JAVA_HOME,也可以在init脚本中指定服务级别。
此时,您的问题中有许多未解答的变量:
1。)您是否在两个位置以同一用户身份运行该流程? 2.)用户是否在两个位置配置相同,具有相同的PATH优先级和ENV变量? 3.)init脚本是否相同?
通过尽可能详细地提供我们,我们可以提供更完整/彻底的回复。
答案 1 :(得分:0)
Tomcat是否在符号链接/ usr / bin / java下使用java?
这完全取决于您如何配置Tomcat以及如何启动它。
但好消息是所有这些都发生在shell脚本中,您可以轻松阅读......如果有必要,“黑客”找出正在使用的java
命令。从启动命令或init.d脚本或其他任何内容开始,并跟踪它。
另外,请记住,很多这些东西都依赖于您正在使用的Linux发行版,以及它们如何组合Tomcat“包”。