ogn1.MethodFailedException:Method "xxx" failed for object xxx


問題描述:初學ssh寫了個小項目,訪問界面出現以下錯誤

 

 java. lang. NoSuchllethodError: org. hi bernate. SessionF actory. openSessi on() Lorg/hibernate/classic/Session;

 

 

問題解決:

<bean name="sessionFactory" class="org.springframework.orm.hibernate5.LocalSessionFactoryBean">
    ...
</bean>

在spring配置文件中寫的是hibernate5,而在dao類里面寫的是hibernate3,修改統一一下就好了。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM