Skip to content

Classloading Problems with Java 25 and Virtual (System?) Threads #1243

@laeubi

Description

@laeubi

I encountered a strange problem recently that when a Virtual Thread or System Thread (I'm not sure i maybe both are the same) is trying to load some dependency it fails with ClassNotFoundException or ClassCastException on Java 25.

The strange thing is that one can "fix" it e.g. by having an activator in the bundle that loads triggers the classload, or any other kind of code. I first noticed this with parallel streams that suddenly throw an exception where I though it was a configuration problem and it vanished as soon as I added some debugging (outside) the loop. In one case the not found class was even in the same bundle and tried to be loaded via the Java service loader.

I have not yet a good reproducer here but maybe it rings a bell to someone (@tjwatson ?) what could be the case, maybe some API changed or is unavailable?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions