struts2啓動tomcat服務器時出錯

 

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的路徑

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章