Default Writer Requires Additional Dependency

Description

When starting a kieker instrumented application with the javaagent like -javaagent:~/.m2/repository/net/kieker-monitoring/kieker/1.15-SNAPSHOT/kieker-1.15-SNAPSHOT-aspectj.jar (or with source instrumentation), many projects get exceptions like this:

{{Exception in thread "main" java.lang.ExceptionInInitializerError
at kieker.monitoring.core.controller.MonitoringController.getInstance(MonitoringController.java:404)
at kieker.monitoring.probe.aspectj.flow.operationExecution.AbstractAspect.<clinit>(AbstractAspect.java:42)
at org.openjdk.jmh.runner.ForkedMain.main(ForkedMain.java:55)
Caused by: java.lang.IllegalStateException: java.lang.ClassNotFoundException: org.jctools.queues.MpscArrayQueue
at kieker.monitoring.core.controller.WriterController.newQueue(WriterController.java:247)
at kieker.monitoring.core.controller.WriterController.<init>(WriterController.java:110)
at kieker.monitoring.core.controller.MonitoringController.<init>(MonitoringController.java:72)
at kieker.monitoring.core.controller.MonitoringController.createInstance(MonitoringController.java:92)
at kieker.monitoring.core.controller.MonitoringController$SingletonHelper.<clinit>(MonitoringController.java:412)
... 3 more
Caused by: java.lang.ClassNotFoundException: org.jctools.queues.MpscArrayQueue
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:315)
at kieker.monitoring.core.controller.WriterController.newQueue(WriterController.java:238)
... 7 more}}

To overcome this, one needs to add the jctools dependency:

{{ <dependency>
<groupId>org.jctools</groupId>
<artifactId>jctools-core</artifactId>
<version>3.3.0</version>
</dependency>}}

to the project or change the RecordQueueFQN e.g. by
-Dkieker.monitoring.core.controller.WriterController.RecordQueueFQN=java.util.concurrent.ArrayBlockingQueue

I would recommend to either add the required class to the jar or to change the default queue implementation to java.util.concurrent.ArrayBlockingQueue by editing kieker.monitoring.default.properties.

Assignee

Unassigned

Reporter

David Georg Reichelt

Labels

None

External issue ID

None

Components

Affects versions

Priority

Medium