Unable to run hibernate project while there is no internet

54 views Asked by At

I am new in hibernate programming.

As I am working with hibernate3 and successfully able to run project.

But as I noticed I am unable to run project whenever there is no internet connection and getting below exception,

org.hibernate.HibernateException: Could not parse configuration: /hibernate.cfg.xml

As searched, I got suggestion to change in DTD but still no luck.

Below is my hibernate.cfg.xml file,

<!DOCTYPE hibernate-configuration SYSTEM 
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<hibernate-configuration>
 <session-factory>
   <property name="hibernate.dialect"> org.hibernate.dialect.MySQLDialect   
</property>
   <property name="hibernate.connection.driver_class">  com.mysql.jdbc.Driver  </property>
   <property name="hibernate.connection.url"> jdbc:mysql://LOCALHOST/test  
</property>
   <property name="hibernate.connection.username"> root  </property>
   <property name="hibernate.connection.password"> vijay@123 </property>
   <property name="show_sql">  true  </property>
   <property name="hbm2ddl.auto">update</property>
   <property name="hibernate.connection.zeroDateTimeBehavior">convertToNull</property>

   <!-- List of XML mapping files -->
   <mapping resource="model/Customer.hbm.xml" />

 </session-factory>

</hibernate-configuration>

Below is the Dependence,

mysql-connector-java-5.1.41-bin.jar
antlr-2.7.6.jar
asm-attrs.jar
asm.jar
c3p0-0.9.1.jar
cglib-2.1.3.jar
commons-collections-2.1.1.jar
commons-logging-1.0.4.jar
dom4j-1.6.1.jar
ehcache-1.2.3.jar
ejb3-persistence.jar
hibernate-annotations.jar
hibernate-commons-annotations.jar
hibernate-validator.jar
hibernate3.jar
jdbc2_0-stdext.jar
jta.jar
log4j-1.2.11.jar
xerces-2.6.2.jar
jstl-1.2.jar

I know its known issue, but I am unable to resolve this.

Please advise.

Regards, Vijay

0

There are 0 answers