the following is my hibernate.cfg.xml file
<!DOCTYPE hibernate-configuration SYSTEM
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hbm2ddl.auto">update</property>
<property name="dialect">org.hibernate.dialect.Oracle9Dialect</property>
<property name="connection.url">jdbc:oracle:thin:@localhost:1521:xe</property>
<property name="connection.username">bala</property>
<property name="connection.password">bala</property>
<property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<mapping resource="Products.hbm.xml" />
I got the error when changed 'PUBLIC' to SYSTEM. and I am unable to run my web application if I turn off my internet connection
My question How to execute a Hibernate web program without the internet connection?
If you need to change a kind of Document Type Definition, you should know, that for the SYSTEM one only a system identifier must be given, though PUBLIC needs a formal public identifier and then a system identifier.
So, in your case, you need to make it like:
<!DOCTYPE hibernate-configuration SYSTEM
"classpath://org/hibernate/hibernate-configuration-3.0.dtd">
In this case, dtd file will not be downloaded, but used a local one, which must be on your classpath.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.