You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NullPointerException in test execution: Cannot invoke "java.lang.instrument.Instrumentation.retransformClasses(java.lang.Class[])" because "mockit.internal.startup.Startup.instrumentation" is null
#727
Open
3 tasks done
pksilen opened this issue
May 31, 2022
· 2 comments
Description of the problem or enhancement request:
All tests result in same NullPointerException:
[INFO] --- maven-surefire-plugin:3.0.0-M6:test (default-test) @ conflated-configuration-service ---
[WARNING] The parameter forkCount should likely not be 0. Forking a JVM for tests improves test accuracy. Ensure to have a >= 1.
[INFO] Using auto detected provider org.apache.maven.surefire.testng.TestNGProvider
[INFO] Running TestSuite
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[ERROR] Tests run: 178, Failures: 116, Errors: 0, Skipped: 0, Time elapsed: 1.124 s <<< FAILURE! - in TestSuite
[ERROR] com.silensoft.conflated.configuration.service.chart.ChartServiceTests.testGetEntityStore Time elapsed: 0.013 s <<< FAILURE!
java.lang.NullPointerException: Cannot invoke "java.lang.instrument.Instrumentation.retransformClasses(java.lang.Class[])" because "mockit.internal.startup.Startup.instrumentation" is null
at java.base/java.lang.Thread.run(Thread.java:833)
Check the following:
[x ] 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.
Here is pom.xml configuration for Maven surefire plugin:
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.
Problem occurs in JDK 8/11/17
The text was updated successfully, but these errors were encountered:
may I know if this issue is resolved, I got the same errors when I tried to build the project but when the unit tests are run standalone - all the test cases are running successfully without reporting any error.
Version of JMockit that was used:
1.49
All tests result in same NullPointerException:
[INFO] --- maven-surefire-plugin:3.0.0-M6:test (default-test) @ conflated-configuration-service ---
[WARNING] The parameter forkCount should likely not be 0. Forking a JVM for tests improves test accuracy. Ensure to have a >= 1.
[INFO] Using auto detected provider org.apache.maven.surefire.testng.TestNGProvider
[INFO] Running TestSuite
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[ERROR] Tests run: 178, Failures: 116, Errors: 0, Skipped: 0, Time elapsed: 1.124 s <<< FAILURE! - in TestSuite
[ERROR] com.silensoft.conflated.configuration.service.chart.ChartServiceTests.testGetEntityStore Time elapsed: 0.013 s <<< FAILURE!
java.lang.NullPointerException: Cannot invoke "java.lang.instrument.Instrumentation.retransformClasses(java.lang.Class[])" because "mockit.internal.startup.Startup.instrumentation" is null
at java.base/java.lang.Thread.run(Thread.java:833)
For that, include an example test (perhaps accompanied by a Maven/Gradle build script) which
can be executed without changes and reproduces the failure.
Here is pom.xml configuration for Maven surefire plugin:
Example test:
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.
Problem occurs in JDK 8/11/17
The text was updated successfully, but these errors were encountered: