Change visibility to protected
This should bypass an issue with the parent class being loaded on a different classloader, resulting in an IllegalAccessError.
MODIFY
dd-java-agent/integrations/helpers/src/main/java/com/datadoghq/agent/integration/DDAgentTracingHelper.java
dd-java-agent/integrations/helpers/src/main/java/com/datadoghq/agent/integration/DDAgentTracingHelper.java
@@ -19,7 +19,9 @@ public abstract class DDAgentTracingHelper<T> extends OpenTracingHelper {
*/
protected final Tracer tracer;
- DDAgentTracingHelper(final Rule rule) {
+ // This is intentionally protected scope to avoid IllegalAccessError if on separate classloaders:
+ // https://stackoverflow.com/a/10538366
+ protected DDAgentTracingHelper(final Rule rule) {
super(rule);
Tracer tracerResolved;
try {

MODIFY
dd-trace/src/main/java/com/datadoghq/trace/writer/DDAgentWriter.java
dd-trace/src/main/java/com/datadoghq/trace/writer/DDAgentWriter.java
@@ -42,6 +42,7 @@ public class DDAgentWriter implements Writer {
/** Scheduled thread pool, acting like a cron */
private final ScheduledExecutorService scheduledExecutor = Executors.newScheduledThreadPool(1);
+ // FIXME: Properly name these threads to better identify them as ours.
/** Effective thread pool, where real logic is done */
private final ExecutorService executor = Executors.newSingleThreadExecutor();

Change visibility to protected

This should bypass an issue with the parent class being loaded on a different classloader, resulting in an IllegalAccessError.