2013-03-20 118 views
0

我已經使用struts和hibernate創建了應用程序。在Eclipse IDE中運行應用程序時出現錯誤:無法在ValueStack中打開或放置休眠會話:無法打開連接

org.hibernate.SessionException: Error! Please, check your JDBC/JDNI Configurations and Database Server avaliability. 

Could not open or put a Hibernate Session in ValueStack: Cannot open connection 
    com.googlecode.s2hibernate.struts2.plugin.interceptors.SessionTransactionInjectorInterceptor.intercept(SessionTransactionInjectorInterceptor.java:134) 
    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) 
    org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52) 
    org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:468) 
    org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77) 
    org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:76) 

任何線索?

問候,

+0

任何線索來克服這個錯誤? – user2189411 2013-03-20 07:52:37

+0

org.hibernate.SessionException:錯誤!請檢查您的JDBC/JDNI配置和數據庫服務器的可用性。 無法打開連接 – 2013-03-20 07:57:09

+0

這是一個自定義錯誤消息嗎? – 2013-03-21 10:48:59

回答

0

您需要添加在我的pom.xml ASM和CGLIB的依賴.Did你還說?請一次檢查。

see here例如

+0

@ user2189411你檢查了我的答案嗎 – PSR 2013-03-20 05:19:40

+0

@ user2189411是否爲你工作 – PSR 2013-03-20 05:21:08

+0

謝謝你的回答PSR。我在Eclipse Indigo中使用簡單的Dynamic項目。我沒有使用Maven項目來添加POM.xml文件。在這種情況下,我該如何解決我的問題? – user2189411 2013-03-20 05:32:57