Spring MVC + Thymeleafを勉強している中で、下記のサイトを参考に勉強しておりますが、 どうしてもエラーが解消されなく、投稿させていただきました。 ◼︎環境 mac 10.10.4 eclipse 4.4 tomcat 8.0.21 java 1.8.0_31 mysql 5.6.25 pom.xml 内設定(一部抜粋) 4.2.0.RELEASE 1.8.2.RELEASE 1.2.5.RELEASE 4.3.5.FINAL 1.0 2.1.4.RELEASE 4.11 2.4.9 org.hibernate hibernate-core ${version.hibernate} org.hibernate hibernate-entitymanager ${version.hibernate} org.hibernate.javax.persistence hibernate-jpa-2.0-api 1.0.1.Final org.hibernate.java-persistence jpa-api 2.0-cr-1 javax.validation validation-api 1.0.0.GA org.hibernate hibernate-validator 4.3.0.Final ◼︎参考サイト http://brissyu.blogspot.jp/2014/07/spring-mvc-thymeleaf-web003.html ◼︎問題 上記サイトで、DBテストを実施しておりますが下記エラーが表示されてしまう。 2015/08/02 14:16:56:386 WARN - AnnotationConfigWebApplicationContext.refresh Exception encountered during context initialization - cancelling refresh attempt org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [com/base/init/DbConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean]: Factory method 'entityManagerFactory' threw exception; nested exception is java.lang.NoClassDefFoundError: org/hibernate/ejb/HibernatePersistence ◼︎試したこと バージョンなど、参考サイト(http://brissyu.blogspot.jp/2014/07/spring-mvc-thymeleaf-web001.html)に合わせて、検証もしましたがpoxの設定でHibernate 4.1.9.FINALを設定しましたが、エラーになり現状のバージョンで設定で実施しております。 お手数をお掛けいたしますが、上記解決方法のご教授をお願いいたします。
↧