opentracing-contrib / opentracing-contrib/java-spring-cloud

ExecutorBeanPostProcessor tries to create cglib proxy for class without visible constructor

Open
#289 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
399
Forks
143
Avg merge
1d 3h
Merged PRs (30d)
22

Description

Problem:
The issue is when io.opentracing.contrib.spring.cloud.async.ExecutorBeanPostProcessor tries to create CGlib proxy on FinalizableDelegatedExecutorService and DelegatedScheduledExecutorService which don't have visible constructor. it fails with exception below:

java.lang.IllegalArgumentException: No visible constructors in class java.util.concurrent.Executors$DelegatedScheduledExecutorService

Reproduction - just try to do instrumentation for Executors below:

Executors.newSingleThreadExecutor()

or

Executors.newSingleThreadScheduledExecutor()

Tested on version:

0.5.3       

Module:

opentracing-spring-cloud-core

This is the exact same problem as here:
https://github.com/spring-cloud/spring-cloud-sleuth/issues/684

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the opentracing-spring-cloud-core module at io.opentracing.contrib.spring.cloud.async.ExecutorBeanPostProcessor. Reproduce the failure by instrumenting Executors.newSingleThreadExecutor() and Executors.newSingleThreadScheduledExecutor(), then inspect how proxy creation handles FinalizableDelegatedExecutorService and DelegatedScheduledExecutorService. Done means these executor types no longer fail with the visible-constructor exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring-boot
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.