question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

unable to run Tests with release 1.2.2

See original GitHub issue

after i updated to version 1.2.2 my tests are no longer running all fail with this exception

java.lang.IllegalAccessError: tried to access class org.springframework.test.context.support.TestPropertySourceUtils from class org.springframework.boot.test.SpringApplicationContextLoader$PropertySourceLocationsInitializer
    at org.springframework.boot.test.SpringApplicationContextLoader$PropertySourceLocationsInitializer.initialize(SpringApplicationContextLoader.java:290)
    at org.springframework.boot.SpringApplication.applyInitializers(SpringApplication.java:567)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:303)
    at org.springframework.boot.test.SpringApplicationContextLoader.loadContext(SpringApplicationContextLoader.java:100)
    at org.springframework.test.context.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:68)
    at org.springframework.test.context.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:86)
    at org.springframework.test.context.DefaultTestContext.getApplicationContext(DefaultTestContext.java:72)
    at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:117)
    at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:83)
    at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:212)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:200)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:252)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:254)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:217)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:83)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
    at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:68)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:163)
    at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
    at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
    at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
    at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
AlthafAzeezcommented, Apr 5, 2017

I fixed this by removing the mockito library dependency from my project

0reactions
jukecraftcommented, Jan 12, 2017

@claytantor I fixed it by removing our own dependency definition (and version number!) for mockito from the pom and running mvn clean. I guess we have to accept Spring choosing the Mockito version for us. Found the solution here: http://stackoverflow.com/a/41041477

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't run unit tests in Android Studio - Stack Overflow
This happens trying to run both the test class, or just the methods. I've tried to clean all the test configurations and rebuild...
Read more >
[firebase_messaging] Unable to build or run tests after release
Bug report Describe the bug Im trying to run tests and build the application, but im getting the error: ...
Read more >
Unable to run tests on extensions - Omniverse Isaac Sim
I am running isaac sim headless in a docker container, and I cannot run the test cases on any of the extensions for...
Read more >
Idea unable to debug unit tests – IDEs Support (IntelliJ Platform)
I have a Spring Boot Gradle project and when I try to run the unit tests via debug either via the Menu or...
Read more >
Unit tests were not showing up - Visual Studio Feedback
A fix for this issue has been released! Install the most recent release from https://visualstudio.microsoft.com/downloads/ . Thank you for providing valuable ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found