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
JDK11: BAD LDC: 17 (Dynamic Class-File Constants) #282
Comments
I've faced with this issue as well, here is an exception stack trace:
|
Did you get around solving it? or like do you have any fix for this issue? |
I'll check this. |
Any update on a fix? |
Not yet, but I'm working on this. |
Any update on this? |
Is there anyone who kindly writes a Java source file that is compiled into a class file including the bytecode ldc with CONSTANT_Dynamic? |
Can anyone check javassist.jar available from master/HEAD? |
Hi @chibash |
Great, thanks to @SurpSG |
@chibash Are there any plans to release a new version with this feature any time soon? |
Until the end of this year? |
Not particularly before the end of this year just in general. |
@chibash do you have plans to release a new version in the near future? |
@andreimozgo I'm just a contributor, I can't release it, I'm waiting for release as you and anybody else 😄 |
Sorry for my silence. I'll release within a day. |
I have done. The new release will be available soon from maven (but I must ask someone else to upload). |
@chibash Could you please upload the new version to mvnrepository ? |
I don't have an access permission. |
Now it's on maven. |
So can this issue be closed? |
Did anybody find working versions combination? i try to migrate to java 11 and have the same issue. still have tried to play with versions in different cases have different exception. |
@Artke I recommend to use PowerMock |
tried with higher versions |
@Artke could you please make sure you don't have another version of javassist in classpath? also could you post the full exception stacktrace? |
@valfirst powermock-module-junit4:2.0.7 has javassist 3.27.0-GA within itself so i deleted my extra dependency. so now i have
FileSystem.Cache.Key class its the field of tested FileSystem.class @PrepareForTest({FileSystem.class, CheckStatusStep.class}) any idea why its frozen? |
@Artke It has worked for me by using the following combination/versions: Javassist 3.27.0-GA |
@Artke this should help: powermock/powermock#475 (comment) |
I add this for my testClass it solved the problem,you should try it again. may be can solve your problem. @SuppressStaticInitializationFor("org.apache.hadoop.fs.FileSystem")
|
Hi All, We are trying to migrate the code from JDK 8 to 11. Old code was using old versions of javassist, powermock and mockito. Now we are trying with following combination, While doing this, we got following error,
Does anyone know why do we get this error and how to resolve it? What do class frozen means? Thanks in advance! |
#270 I thought that the PR/merge would make javassist fully compatible with Dynamic Class-File Constants(https://openjdk.java.net/jeps/309). When running junit tests using powermock on the Java 11 I get this error: "BAD LDC 17". Here Javassist and Mockito is used as a dependency of PowerMock.
I am using the following versions.
The text was updated successfully, but these errors were encountered: