Home  >  Forum  >  Hibernate
Post New Query

java.lang.ClassNotFoundException: org.hibernate.util.DTDEntityResolver


joined on
March 27,2014
Asked on May 11,2014
java.lang.ClassNotFoundException: org.hibernate.util.DTDEntityResolver
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClass(ClassLoader.java:760)
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2895)
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1173)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1681)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
org.hibernate.cfg.Configuration.reset(Configuration.java:353)
org.hibernate.cfg.AnnotationConfiguration.reset(AnnotationConfiguration.java:289)
org.hibernate.cfg.Configuration.<init>(Configuration.java:289)
org.hibernate.cfg.Configuration.<init>(Configuration.java:293)
org.hibernate.cfg.AnnotationConfiguration.<init>(AnnotationConfiguration.java:168)
com.concretepage.HibernateUtil.<clinit>(HibernateUtil.java:12)
com.concretepage.dao.UserDao.saveUserDetail(UserDao.java:11)
com.concretepage.action.ResultAction.execute(ResultAction.java:25)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:483)


While running struts 2 + hibernate integration, i got below error. How to resolve it?

joined on
March 14,2013
Replied on June 09,2014

Use pom as below
<dependencies>
	<dependency>
		<groupId>org.apache.struts</groupId>
		<artifactId>struts2-core</artifactId>
		<version>2.3.16</version>
	</dependency>
	<dependency>
		<groupId>org.apache.struts</groupId>
		<artifactId>struts2-convention-plugin</artifactId>
		<version>2.3.8</version>
	</dependency>
    <dependency>
	  <groupId>org.hibernate</groupId>
	  <artifactId>hibernate-annotations</artifactId>
	  <version>3.5.6-Final</version>
    </dependency>
    <dependency>
	  <groupId>org.hibernate.javax.persistence</groupId>
	  <artifactId>hibernate-jpa-2.0-api</artifactId>
	  <version>1.0.1.Final</version>
    </dependency>
    <dependency>
	    <groupId>org.slf4j</groupId>
	    <artifactId>slf4j-api</artifactId>
	    <version>1.7.7</version>
    </dependency>
    <dependency>
	   <groupId>mysql</groupId>
	   <artifactId>mysql-connector-java</artifactId>
	   <version>5.1.17</version>
    </dependency>
  </dependencies> 

Write Answer









Copyright ©2017 concretepage.com, all rights reserved |Privacy Policy | Contact Us