Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClasspathLoggingApplicationListener logs the classpath as unknown on Java 11 and later #23138

Closed
wilkinsona opened this issue Aug 30, 2020 · 1 comment
Assignees
Labels
type: bug A general bug
Milestone

Comments

@wilkinsona
Copy link
Member

When running the application's main method directly on Java 11 or later the TCCL won't, typically, be a URLClassLoader so the classpath is logged as unknown. When using the launcher, LaunchedURLClassLoader will be the TCCL and the problem won't occur. There are various other ways to get the classpath, such as using the java.class.path system property that we could look at using instead.

I think it's debatable whether ClasspathLoggingApplicationListener is still useful. It was added prior to 1.0 and things have moved on since then. For example, we now have failure analysers for classpath-related problems such as NoSuchMethodError. We could consider removing the listener entirely.

@wilkinsona wilkinsona added for: team-attention An issue we'd like other members of the team to review status: waiting-for-triage An issue we've not yet triaged labels Aug 30, 2020
@philwebb philwebb added type: bug A general bug and removed for: team-attention An issue we'd like other members of the team to review status: waiting-for-triage An issue we've not yet triaged labels Sep 9, 2020
@philwebb philwebb added this to the 2.2.x milestone Sep 9, 2020
@wilkinsona wilkinsona self-assigned this Nov 3, 2020
@wilkinsona wilkinsona modified the milestones: 2.2.x, 2.4.0 Nov 3, 2020
@wilkinsona
Copy link
Member Author

The listener is public API so it'll need to be deprecated first and then removed in a subsequent release. Moving to 2.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants