Eclipse3.4.2用Tomcat插件圖標啓動Tomcat的時候會報錯:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' ......
Invocation of init method failed; nested exception is java.lang.IllegalStateException:
Must start with Java agent to use InstrumentationLoadTimeWeaver. See Spring documentation.
解決辦法如下:
Eclipse3.4.2->Window->Preferences->左邊Tomcat->JVM Settings->Append to JVM Parameters
->Add->Enter a JVM parameter->加上-javaagent:"C:/Tomcat6.0/lib/spring-agent.jar"
C:/Tomcat6.0/lib/spring-agent.jar是我的spring-agent.jar的路徑