Intellij JUnit test configuration won't load Spring-instrument load time weaver?

I moved to a different machine recently and lost all my test configuration information for my Intellij projects.    Now, I can't re-create the settings for my JUnit tests to run - they require the Spring load time weaver and it's being difficult.   No matter what I try, I get this:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.context.weaving.AspectJWeavingEnabler#0': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loadTimeWeaver': Initialization of bean failed; nested exception is java.lang.IllegalStateException: ClassLoader [java.net.URLClassLoader] does NOT provide an 'addTransformer(ClassFileTransformer)' method. Specify a custom LoadTimeWeaver or start your Java virtual machine with Spring's agent: -javaagent:org.springframework.instrument.jar

 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:547)



I have the following in my Junit configuration setup:   -javaagent:C:/Users/me/.m2/repository/org/springframework/spring-instrument/4.0.6.RELEASE/spring-instrument-4.0.6.RELEASE.jar

but that does not help, no matter what I do, I still get this error.    So far, I have tried:  
backslashes in the path
forward slashes in the path
double backslashes in the path
other versions of spring-instrument JAR (3.1.1, 3.2.1, 3.2.9)
verified that the required JAR is actually on my machine
Moved the JAR into the project directory itself

Just wondering if anybody has the "magic bullet" to fix this problem.
1 comment
Comment actions Permalink

This looks like it might be connected to this Intellij issue:

https://youtrack.jetbrains.com/issue/IDEA-97946#tab=Comments

Just wondering, it looks like this issue is still open - can anyone verify if it got fixed or not?  (My version:  14.1.4)

0

Please sign in to leave a comment.