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

ClassCastException when running on Wildfly and Java 17 #429

Closed
dbaldes opened this issue Aug 22, 2022 · 2 comments
Closed

ClassCastException when running on Wildfly and Java 17 #429

dbaldes opened this issue Aug 22, 2022 · 2 comments

Comments

@dbaldes
Copy link

dbaldes commented Aug 22, 2022

I get the following exception when running org.reflections 0.10.2 on Widlfly 26.1.1 and Java 17:

WARN  [org.reflections.Reflections] could not create Dir using jboss_vfs from url vfs:/xxxxx.jar/. skipping.: java.lang.ClassCastException: class org.jboss.vfs.VirtualJarInputStream cannot be cast to class org.jboss.vfs.VirtualFile (org.jboss.vfs.VirtualJarInputStream and org.jboss.vfs.VirtualFile are in unnamed module of loader 'org.jboss.vfs@3.2.16.Final' @3f3afe78)
	at xxxx.war//org.reflections.vfs.JbossDir.createDir(JbossDir.java:19)
	at xxxx.war//org.reflections.vfs.Vfs$DefaultUrlTypes$4.createDir(Vfs.java:259)

Apparently, url.openConnection().getContent() returns a VirtualJarInputStream on Java 17 instead of the expected VirtualFile.

@dbaldes
Copy link
Author

dbaldes commented Aug 22, 2022

This seems to be a duplicate of #427

@dbaldes
Copy link
Author

dbaldes commented Aug 22, 2022

This is caused by: https://issues.redhat.com/browse/WFLY-16322
And is fixed in jboss-vfs v.3,2,17.Final

@dbaldes dbaldes closed this as completed Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant