Hello.
I have encountered a rather strange problem.
The thing is, when I run atlas-run
for the first time it completes successfully - builds my plugin project, downloads everything needed, runs tests etc.
Now, when I shut down the running jira instance and attempt to get it back up again with atlas-run
it fails on tests throwing errors like :
java.lang.IllegalStateException: Failed to transform class with name com.mypackage.MyClassNameTest. Reason: cannot find com.mypackage.MyOtherClassName
Caused by: javassist.CannotCompileException: cannot find com.mypackage.MyOtherClassName
Caused by: javassist.NotFoundException: com.mypackage.MyOtherClassName
or
java.lang.NoClassDefFoundError: Lcom/mypackage/MyClassName;
Caused by: java.lang.ClassNotFoundException: com.mypackage.MyClassName;
I’ve tried the most obvious solutions. I tampered with Maven Surefire Plugin configuration to add additional classpath elements, I’ve run mvn -X test
to see the classpath (and it looked okay), I’ve tried updating javassist
version as I use PowerMockito
in some of the tests, and nothing worked.
I have also checked to see if the classes that generate the errors have anything special to them, but there is nothing like that. The compile directories target/classes
and target/test-classes
also look fine, everything that should be there is there.
What’s also weird is that I have ~68 unit tests written yet when the errors occur only 6 are executed (they all fail) and it’s like the rest doesn’t exist.
My unit tests are mainly written with JUnit5 + Mockito with some exceptions that use PowerMockito + JUnit4. As I’ve mentioned the tests that fail don’t have anything in common as far as I can tell.
Of course running mvn-clean
magically fixes everything and tests run successfully that one time.
Also I can run atlas-run -DskipTests
to get my jira instance up, and yet still these errors are inconvinient.
Does anybody have any idea how to fix this, or what to investigate to gain some insight into the reason why this is happening ?
Thanks in advance for any input on the topic.
Cheers.