SpringJUnitRunner based tests fail under PIT - spring-test

I have a project that utilizes SpringJUnitRunner for testing the controllers and filters. When I run the test normally, everything runs fine. However, when I run the tests with PIT I get the following exception for every test using the SpringJUnitRunner:
java.lang.IllegalStateException: Failed to load ApplicationContext
at org.springframework.test.context.CacheAwareContextLoaderDelegate.loadContext(CacheAwareContextLoaderDelegate.java:99)
at org
11:53:55 PM PIT >> FINE : SLAVE : .springframework.test.context.DefaultTestContext.getApplicationContext(DefaultTestContext.java:101)
at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:155)
at org.springfr
11:53:55 PM PIT >> FINE : SLAVE : amework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:100)
at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:319)
at org.springframework.test.context.j
11:53:55 PM PIT >> FINE : SLAVE : unit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:212)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:289)
at org.junit.internal.runners.model.ReflectiveCallable.run
11:53:55 PM PIT >> FINE : SLAVE : (ReflectiveCallable.java:12)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:291)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:232)
a
11:53:55 PM PIT >> FINE : SLAVE : t org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:89)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.ru
11:53:55 PM PIT >> FINE : SLAVE : nners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.springframework.test.context.junit4.statements.RunBeforeT
11:53:55 PM PIT >> FINE : SLAVE : estClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at
11:53:55 PM PIT >> FINE : SLAVE : org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:175)
at org.pitest.junit.adapter.CustomRunnerExecutor.run(CustomRunnerExecutor.java:42)
at org.pitest.junit.adapter.AdaptedJUnitTestUnit.execute(AdaptedJUni
11:53:55 PM PIT >> FINE : SLAVE : tTestUnit.java:85)
at org.pitest.coverage.execute.CoverageDecorator.execute(CoverageDecorator.java:50)
at org.pitest.execute.containers.UnContainer.submit(UnContainer.java:45)
at org.pitest.execute.Pitest$3.run(Pitest.java:182)
at java.lang.Thread.run(
11:53:55 PM PIT >> FINE : SLAVE : Thread.java:662)
Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Only one AsyncAnnotationBeanPostProcessor may exist within the context.
It should be noted that we have also had issues using Emma for code coverage on these same tests, and have had to switch to Jacoco as a result.
Is there any known incompatibilities between SpringJUnitRunner and PIT, or is there some kind of configuration change I can make that will allow these two to play nicely together?
Thanks in advance for any help.

Related

Strange issue while starting multiple spring boot applications through a linux mint script

We have multiple spring boot microservices which start using a start.sh script which looks like this :
#!/bin/bash
export JAVA_CP=./;./config;
echo 'Starting config server'
export JAVA_OPTS="-Xms128m -Xmx512m -Dapp=config-server -Dapp.logdir=./log"
$JAVA_HOME/bin/java $JAVA_OPTS -cp $JAVA_CP -jar ./configserver-1.0.0.jar
I want to start all of them using a simple startAll script which looks like this :
#!/bin/sh
cd /home/component-setup
cd config-server
gnome-terminal --tab --title="Config server" -- sh -c bin/start.sh
sleep 30
cd ..
cd app1-server
gnome-terminal --tab --title="app1-server" -- sh -c bin/start.sh
cd ..
cd app2-server
gnome-terminal --tab --title="app2-server" -- sh -c bin/start.sh
so on...
Issue: If I directly start the config server either using the start.sh file or even the gnome-terminal --tab --title="Config server" -- sh -c bin/start.sh command the config server starts.
However, when I run using the startAll script it doesn't start and gives the following error :
2022-10-18 14:50:40.925 INFO 11449 --- [ main] o.a.c.c.C.[.[.[/] : Initializing Spring embedded WebApplicationContext
2022-10-18 14:50:40.925 INFO 11449 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 3579 ms
2022-10-18 14:50:41.328 INFO 11449 --- [ main] o.s.b.a.e.w.ServletEndpointRegistrar : Registered '/manage/jolokia' to jolokia-actuator-endpoint
2022-10-18 14:50:41.366 ERROR 11449 --- [ main] o.a.c.c.C.[.[.[/] : Exception starting filter [webMvcMetricsFilter]
java.lang.NoClassDefFoundError: javax/annotation/PostConstruct
at org.apache.catalina.core.DefaultInstanceManager.findPostConstruct(DefaultInstanceManager.java:703)
at org.apache.catalina.core.DefaultInstanceManager.populateAnnotationsCache(DefaultInstanceManager.java:374)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:172)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:165)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:104)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4613)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5256)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1396)
And after a few lines :
org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:163)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:577)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:434)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:338)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1332)
at com.gi_de.configserver.Application.main(Application.java:17)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:142)
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.<init>(TomcatWebServer.java:104)
at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:450)
at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:199)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:182)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:160)
... 16 more
Caused by: java.lang.IllegalStateException: StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[] failed to start
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.rethrowDeferredStartupExceptions(TomcatWebServer.java:187)
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:126)
... 21 more
I just cant figure out what the problem is. Can anyone see whats wrong?

Emulator fails to Launch

I was using the emulator perfectly fine yesterday, but today I cannot open the emulator. I have read up on the android documentation and on other issues people have run into and I cannot find a solution. I have attempted to force the emulator to run through the terminal using both -gpu host and -gpu swiftshader_indirect and I was not successful. I have updated all SDK Platforms and SDK Tools with no success. I have deleted the emulator and installed a different emulator through the AVD manager to be certain the download was current. Here are also some of the trouble shooting commands I have tried with the error messages. I am not sure what to do now. If anyone has any advice, I would greatly appreciate it!
Here is what the Terminal shows:
emulator: WARNING: encryption is off
init: Could not find wglGetExtensionsString!
getGLES2ExtensionString: Could not find GLES 2.x config!
Failed to obtain GLES 2.x extensions string!
Could not initialize emulated framebuffer
emulator: WARNING: load_config.cpp:52: Could not parse verified boot config:
emulator: WARNING: load_config.cpp:54: 1:1: Invalid control characters encountered in text.
Failed to open /qemu.conf, err: 2
HAX is working and emulator runs in fast virt mode.
emulator: WARNING: EmulatorService.cpp:448: Cannot find certfile: C:\Users\iante.android\emulator-grpc.cer security will be disa
bled.
Started GRPC server at 127.0.0.1:8554
emulator: ERROR: OpenGLES emulation failed to initialize. Please consider the following troubleshooting steps:
Make sure your GPU drivers are up to date.
Erase and re-download the emulator ($ANDROID_SDK_ROOT/emulator).
Try software rendering: Go to Extended Controls > Settings > Advanced tab and change "OpenGL ES renderer (requires restart)" t
o "Swiftshader".
Or, run emulator from command line with "-gpu swiftshader_indirect". 4. Please file an issue to https://issuetracker.google.com/i
ssues?q=componentid:192727 and provide your complete CPU/GPU info plus OS and display setup.
crashhandler_die: fatal: OpenGLES emulation failed to initialize. Please consider the following troubleshooting steps:
Make sure your GPU drivers are up to date.
Erase and re-download the emulator ($ANDROID_SDK_ROOT/emulator).
Try software rendering: Go to Extended Controls > Settings > Advanced tab and change "OpenGL ES renderer (requires restart)" t
o "Swiftshader".
Or, run emulator from command line with "-gpu swiftshader_indirect". 4. Please file an issue to https://issuetracker.google.com/i
ssues?q=componentid:192727 and provide your complete CPU/GPU info plus OS and display setup.
And this is what the event log reports:
1:30 PM Emulator: init: Could not find wglGetExtensionsString!
1:30 PM Emulator: getGLES2ExtensionString: Could not find GLES 2.x config!
1:30 PM Emulator: Failed to obtain GLES 2.x extensions string!
1:30 PM Emulator: Could not initialize emulated framebuffer
1:30 PM Emulator: emulator: WARNING: load_config.cpp:52: Could not parse verified boot config:
1:30 PM Emulator: emulator: WARNING: load_config.cpp:54: 1:1: Invalid control characters encountered in text.
1:30 PM Emulator: emulator: WARNING: EmulatorService.cpp:448: Cannot find certfile: C:\Users\iante.android\emulator-grpc.cer security will be disabled.
1:30 PM Emulator: Started GRPC server at 127.0.0.1:8554
1:30 PM Emulator: emulator: ERROR: OpenGLES emulation failed to initialize. Please consider the following troubleshooting steps:
1:30 PM Emulator: crashhandler_die: fatal: OpenGLES emulation failed to initialize. Please consider the following troubleshooting steps:
1:30 PM Emulator:
1:30 PM Emulator: 1. Make sure your GPU drivers are up to date.
1:30 PM Emulator:
1:30 PM Emulator: 2. Erase and re-download the emulator ($ANDROID_SDK_ROOT/emulator).
1:30 PM Emulator:
1:30 PM Emulator: 3. Try software rendering: Go to Extended Controls > Settings > Advanced tab and change "OpenGL ES renderer (requires restart)" to "Swiftshader".
1:30 PM Emulator:
1:30 PM Emulator: Or, run emulator from command line with "-gpu swiftshader_indirect". 4. Please file an issue to https://issuetracker.google.com/issues?q=componentid:192727 and provide your complete CPU/GPU info plus OS and display setup.
1:30 PM Emulator:
1:30 PM Emulator: Process finished with exit code -1073741819 (0xC0000005)
EDIT:
When I restarted my computer, I saw there was an update available for Android Studio, so I updated it accordingly. When I ran the main activity as I have done so previously with my preferred AVD selected the emulator failed to start. Then I attempted to run it through the terminal with both -gpu host and -gpu swiftshader_indirect commands and it still did not work.
SOLUTION TO MY ISSUE:
1. Restart computer.
2. Open Android Studio and run the emulator through the terminal using emulator -avd Pixel_2_API_29 -gpu host.
3. Now run the main activity.
It is beyond me why all of a sudden now this is the work around to run on the emulator when I have previously simply clicked run main activity with my preferred AVD and it would run without problems.
I hope this helps if anyone runs into this issue. I do not think this a complete solution, but I can live with this for the time being.
this from GUI
Go to Extended Controls > Settings > Advanced tab and change "OpenGL ES renderer (requires restart)" to "Swiftshader". solution image

ClassNotFoundException with Openjdk on ubuntu

I have a problem with openjdk on ubuntu.
I have a java program that works perfectly on my machine (OSX 10.11). When I try to run it on the ubuntu I encounter errors telling me that classes are missing...
root#syncapp:/home/user# java -jar syncapp.jar
++ System >> Maximum heap size can used : 522190848 bytes
Exception in thread "main" java.lang.reflect.InvocationTargetException
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base#9-Ubuntu/Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base#9-Ubuntu/NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base#9-Ubuntu/DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(java.base#9-Ubuntu/Method.java:535)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: java.lang.NoClassDefFoundError: javax/activation/UnsupportedDataTypeException
at skay.com.xxx.yyy.sync.Application.createPIDFile(Application.java:67)
at skay.com.xxx.yyy.sync.Application.main(Application.java:29)
... 5 more
Caused by: java.lang.ClassNotFoundException: javax.activation.UnsupportedDataTypeException
at java.net.URLClassLoader.findClass(java.base#9-Ubuntu/URLClassLoader.java:388)
at java.lang.ClassLoader.loadClass(java.base#9-Ubuntu/ClassLoader.java:486)
at java.lang.ClassLoader.loadClass(java.base#9-Ubuntu/ClassLoader.java:419)
... 7 more
The line 67 of my "Application.java" file is :
final Matcher PID = Settings.get().patterns.get("PID_HOST").matcher( ManagementFactory.getRuntimeMXBean().getName() ) ;
Here is my configuration:
root#syncapp:/home/user# uname -a
Linux syncapp 4.8.0-22-generic #24-Ubuntu SMP Sat Oct 8 09:15:00 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
root#syncapp:/home/user# java -version
openjdk version "9-Ubuntu"
OpenJDK Runtime Environment (build 9-Ubuntu+0-9b134-2ubuntu1)
OpenJDK 64-Bit Server VM (build 9-Ubuntu+0-9b134-2ubuntu1, mixed mode)
Edit 1 :
Apparently it would come from a problem related to the version of openjdk installed. The following were available:
root#syncapp:/home/user# update-alternatives --config java
Il existe 3 choix pour l'alternative java (qui fournit /usr/bin/java).
Sélection Chemin Priorité État
------------------------------------------------------------
* 0 /usr/lib/jvm/java-9-openjdk-amd64/bin/java 1091 mode automatique
1 /usr/bin/gij-6 1060 mode manuel
2 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 1081 mode manuel
3 /usr/lib/jvm/java-9-openjdk-amd64/bin/java 1091 mode manuel
Appuyez sur <Entrée> pour conserver la valeur par défaut[*] ou choisissez le numéro sélectionné :
And following the message it turns out that JavaFX was not found. And we had to install the openjfx package. What's the location of the JavaFX runtime JAR file, jfxrt.jar, on Linux?
When I see the package page on the ubuntu package website (http://packages.ubuntu.com/yakkety/openjfx), I realized that it seems compatible with version 8 of the openjdk (openjdk-8-jre).
So I run the jar with this JRE and the blocking point previously encountered seems to have gone but another one has appeared. Apparently the following class seems to be absent (from the classpath) jdk/management/resource/ResourceRequestDeniedException.
root#syncapp:/home/user# /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -jar syncapp.jar
++ System >> Maximum heap size can used : 464519168 bytes
++ System >> PID (2125) created...
++ System >> USR2 Signal handled...
++ System >> Settings file (/home/user/resources/sets.ini) loaded.
++ System >> 4 worker(s) has been created and launched...
++ System >> Worker started (13#741054620)
++ System >> Worker started (10#1702086468)
++ System >> Worker started (11#1289522363)
++ System >> Worker started (12#194404)
[...]
++ System >> Database pool created (4/8)
[...]
Exception in thread "Thread-3" java.lang.NoClassDefFoundError: jdk/management/resource/ResourceRequestDeniedException
at skay.com.xxxx.yyyy.sync.core.job.associate.SynchronizeCalendarWithXXXXXXJob.apply(SynchronizeCalendarWithXXXXXXJob.java:139)
at skay.com.xxxx.yyyy.sync.core.threadpool.Worker.run(Worker.java:70)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: jdk.management.resource.ResourceRequestDeniedException
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 3 more
So how I can add this library to the classpath please?
Edit 2 :
Just a small clarification regarding the "ResourceRequestDeniedException" exception. I voluntarily call it in my code in the case of a response to an HTTP request with a return code designating an error. For example here is the piece of code concerned by the exception mentioned above.
if( con == null || con.getResponseCode() != 200 )
throw new ResourceRequestDeniedException() ;
Where "con" is an "HttpURLConnection" object.
Edit 3 :
No response including on askubuntu.com. So I create a custom exception (extends Exception) to replace ResourceRequestDeniedException to see if another problem occurs. No additional problems, the application looks to run properly.

RetryableHazelcastException when launching cluster using Hazelcast 3.7

I have a cluster with two members that have map loaders to a database.
Version 3.6.1 shows no issues during startup - however when I upgraded to 3.7, I was presented with lots of exceptions like below - and the cluster failed to start!
Any ideas what it means?
Thanks
14:32:50.613), waitTimeout=-1, callTimeout=60000, name=TRADE_SETTLEMENT}, tryCount=250, tryPauseMillis=500, invokeCount=240, callTimeoutMillis=60000, firstInvocationTimeMs=1473427838152, firstInvocationTime='2016-09-09 14:30:38.152', lastHeartbeatMillis=0, lastHeartbeatTime='1970-01-01 01:00:00.000', target=[xxx.co.uk]:5702, pendingResponse={VOID}, backupsAcksExpected=0, backupsAcksReceived=0, connection=null}, Reason: com.hazelcast.spi.exception.RetryableHazelcastException: Map TRADE_SETTLEMENT is still loading data from external store
Sep 09, 2016 2:32:50 PM com.hazelcast.spi.impl.operationservice.impl.Invocation

Does Tomcat uses the java under the symbolic link /usr/bin/java?

I have two linux servers having a tomcat 7.0.42 running with two java applications packaged in 2 WAR files. I'm using JDK7u25 on linux, but one of them still has a symbolic link to jdk1.4.2 (I have no admin rights, so I can't change it).
The Linux server that has the correct symbolic link /usr/bin/java --> jdk 7, works fine. The applications are running without any issues.
The other Linux server that has /usr/bin/java --> jdk1.4.2, BUT has a JAVA_HOME in tomcat set to jdk 7, (JAVA_HOME=//jdk_1.7.0.25/), throws me an error when deploying my apps. My apps need the Forkjoin API (available only in jdk 7).
The only difference I noticed between these two servers, is the symbolic links.
I copied the working tomcat (directory + apps + JDK) to the not working server, and set the JAVA_HOME to the imported working JDK, but still not working... It keeps throwing me error message and can't run the apps.
Here are the logs, although I think it's not explicit enough to understand what I am doing.
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
and the other repeated log error:
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
Can it be from the java under /usr/bin/javaeven if I have set JAVA_HOME to the right place? I can't find how tomcat really uses java...
Tomcat, as Stephen indicated, uses multiple different ways, depending on the server configuration, to determine what java is being used.
In most cases, I would start by checking on the working server for the existence of $JAVA_HOME, as well as custom $PATH settings. Check the usual suspects: /etc/profile, /etc/profile.d/, .bash, .profile or the like.
You may even find that JAVA_HOME is specified both at the user level, but also at the service level in the init scripts if you are running it as an actual service.
At this moment, there are many variables that are unanswered in your question:
1.) Are you running the process as the same user in both locations?
2.) Are the users configured identically in both locations, with the same PATH precedence and ENV variables?
3.) Are the init scripts the same?
By providing us as much detail as possible, we can provide a more complete/thorough response.
Does Tomcat uses the java under the symbolic link /usr/bin/java?
It entirely depends on how you have configured Tomcat and how you are launching it.
But the good news that all of that happens in shell scripts that you can easily read ... and if necessary "hack" to figure out which java command is being used. Start with the launch command or init.d script or whatever, and trace it through.
Also, bear in mind that a lot of this stuff is dependent on the Linux distro that you are using, and how they have put together the Tomcat "package".

Resources