Reputation: 644
Currently I am learning hibernate.I am trying to create a project on hibernate in eclipse.In hibernate.cfg.xml, it shows warning.."stream not available"
hibernate.cfg.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory name="studentFactory">
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="connection.url">jdbc:mysql://localhost/nithya</property>
<property name="connection.username">root</property>
<property name="connection.password">root</property>
<property name="connection.pool_size">5</property>
<property name="dialect">org.hibernate.dialect.mysqlDialect</property>
<property name="show_sql">false</property>
<property name="hbm2ddl.auto">update</property>
<mapping resource="\com\\xmls\\Student.hbm.xml" />
</session-factory>
the warning line is... "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
anybody help me to overcome it and also suggest best ways to learn and create hibernate projects.. Thanks in advance..
Upvotes: 1
Views: 4007
Reputation: 590
Use this in your hibernate.cfg.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
instead of
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
Upvotes: 5