-
Notifications
You must be signed in to change notification settings - Fork 21
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
:javap crashes REPL with java.lang.NoClassDefFoundError (JDK 11) #11154
Comments
This happened to me too and somehow |
Nope, that's not it. I didn't have JAVA_HOME set at all. I set it to the correct location and nothing changed. |
workaround: |
Wow, xuwei-k is all over the place. I also took a look. This is the REPL class not seeing the The tool is loaded reflectively using the REPL class loader. I'll look for the way to eliminate the warning.
|
@retronym this looks like your dept, should we try to sneak a fix into 2.12.7, or let it go? |
We could certainly do with a better error message when the The illegal reflective access warning would require another command line option:
Not sure how to automate the addition of this in a low-risk manner. It might be possible to reflectively load a new Another strategy would be to just fork and call I don't think we should hold up 2.12.7 for these given that there are workarounds and that the path forward is still somewhat murky. |
still happens in Scala 2.12.8 on JDK 11 |
I'm getting this error now with bloop tests if running Java 11, it compiles fine but tests fail. Is there some magic sbt setting for ensuring nobootcp is used for test/run/etc? Or is this a zinc issue to add the same nobootcp function? There is an interesting example here: https://github.com/eligosource/eventsourced/blob/master/project/Build.scala#L77 but it's for sbt 0.13 and looks like it would need someone with more sbt Fu than I to adapt to sbt 1.x |
I refactored to use java.util.spi.ToolProvider (since Java 9) and current reflection on Java 8. The REPL is just filtering output from the tool either way. I'll PR after polish. |
@som-snytt interested in returning to this one? |
Yes, I have a branch for this. Is summer over already? When is Labor Day? School hasn't started yet. |
San Francisco schools are session. I'm moving this the to 2.12.11 milestone, but a timely fix could still make 2.12.10 |
I reverted to 2.12.10 because it says it has no due date. Edit: on the PR side, it says due Sept 6. If today is Wednesday, it must be California. |
I just read the forum thread about infighting within the community; I was going to add something about the folks who push a PR to the next milestone and then the other faction that immediately push it back again. Sorry @SethTisue I just saw that you were happy at zero PRs. Probably retronym is the only user of |
On 2.13 as scala/scala#8486 and on 2.12 as scala/scala#8400 Not only can we not have nice things, but we have to fix them twice when they break. The merged version does not do the backflip with a twist to accommodate the classloader. Instead:
I try to start with |
This is completely reproducible for me and happens regardless of what
Foo
I pass to:javap Foo
(even if it doesn't exist).The text was updated successfully, but these errors were encountered: