-
Notifications
You must be signed in to change notification settings - Fork 240
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
NoClassDefFoundError: org/omg/IOP/IORHelper Jmockit 1.49 and JDK-11 #728
Comments
Upgrade the version of JMockit will effectively resolve this. static void createSyntheticFieldsInJREClassToHoldMockingBridges(@Nonnull Instrumentation inst) {
ClassFileTransformer trans = new FieldAdditionTransformer();
inst.addTransformer(trans);
try {
IORHelper.id();
} finally {
inst.removeTransformer(trans);
}
setMockingBridgeFields();
} And this is the code of static void createSyntheticFieldsInJREClassToHoldClassLoadingBridges(@Nonnull Instrumentation instrumentation) {
FieldAdditionTransformer fieldAdditionTransformer = new FieldAdditionTransformer(instrumentation);
instrumentation.addTransformer(fieldAdditionTransformer);
NegativeArraySizeException.class.getName();
String hostClassName = fieldAdditionTransformer.hostClassName;
if (hostClassName == null) {
Provider.class.getName();
hostClassName = fieldAdditionTransformer.hostClassName;
}
ClassLoadingBridge.hostJREClassName = hostClassName;
} |
Thanks!! Upgrading worked for me |
Please provide the following information:
Version of JMockit that was used: 1.49
Description of the problem or enhancement request:
while upgrading existing code from Java 8, Jmockit 1.22 to Java 11 and jmockit 1.49 - i get the following when running the test from intellij (...yes - with -javaagent:/root/.m2/repository/org/jmockit/jmockit/1.49/jmockit-1.49.jar)
any idea how to solve?
If a defect or unexpected result, JMockit project members should be able to reproduce it.
For that, include an example test (perhaps accompanied by a Maven/Gradle build script) which
can be executed without changes and reproduces the failure.
If an enhancement or new feature request, it should be justified by an example test
demonstrating the validity and usefulness of the desired enhancement or new feature.
The issue does not fall outside the scope of the project (for example, attempting to use
JMockit APIs from Groovy or Scala code, or with an Android runtime).
The JDK where the problem occurs is a final release, not a development build.
The text was updated successfully, but these errors were encountered: