错误:
SEVERE: Exception sending context initialized event to listener instance
of class org.springframework.web.context.ContextLoaderListener
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
[org.apache.catalina.loader.WebappClassLoader] does NOT provide an
'addTransformer(ClassFileTransformer)' method. Specify a custom
LoadTimeWeaver or start your Java virtual machine with Spring's agent:
-javaagent:spring-agent.jar但是我的tomcat虚拟机参数中有javaagent
-Dext.prop.dir="/home/gopi/Desktop/REST_CONFIG" -javaagent:/home/gopi/.m2
/repository/org/springframework/spring-agent/2.5.6/spring-agent-
2.5.6.jar -Dcatalina.base="/opt/apache-tomcat-7.0.62"
-Dcatalina.home="/opt/apache-tomcat-7.0.62" -Dwtp.deploy="/opt/apache-
tomcat-7.0.62/wtpwebapps" -Djava.endorsed.dirs="/opt/apache-tomcat-
7.0.62/endorsed"默认情况下,我添加的-Dext.prop.dir and -javaagent和剩余的是..我该如何解决这个问题?有什么想法吗?
发布于 2015-06-03 17:40:51
我猜您需要在下面给出,以指定要使用的loadTimeWeaver。详情请参见here。
<context:load-time-weaver
weaver-class="org.springframework.instrument.classloading.ReflectiveLoadTimeWeaver"/>
</beans>https://stackoverflow.com/questions/30612220
复制相似问题