Hi,
This is the code that i'm running:
Code:
Configuration conf = new Configuration().configure();
This is what GlassFish returns:
Code:
configuring from resource: /hibernate.cfg.xml
Configuration resource: /hibernate.cfg.xml
Reading mappings from resource : Client.hbm.xml
Error parsing XML: XML InputStream(1) Document is invalid: no grammar found.
Error parsing XML: XML InputStream(1) Document root element "hibernate-mapping", must match DOCTYPE root "null".
This is the error i get:
Quote:
Could not parse mapping document from resource Client.hbm.xml
This is the CLient.hbm.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class dynamic-insert="false" dynamic-update="false" mutable="true"
name="icmmclientsmanager.Client"
optimistic-lock="version"
polymorphism="implicit"
select-before-update="false" table="Clients">
<id column="cId" name="cid">
<generator class="identity"/>
</id>
<property column="cName" name="cName"/>
<property column="cAddress" name="cAddress"/>
</class>
</hibernate-mapping>
And here is the hibernate.cfg.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory name="session1">
<property name="hibernate.dialect">
org.hibernate.dialect.DerbyDialect
</property>
<property name="hibernate.connection.driver_class">
com.mysql.jdbc.Driver
</property>
<property name="hibernate.connection.url">
jdbc:mySql://localhost:3306/ICMMDev
</property>
<property name="hibernate.connection.username">
root
</property>
<property name="hibernate.connection.password">
password
</property>
<property name="hibernate.show_sql">
true
</property>
<property name="hibernate.current_session_context_class">
thread
</property>
<mapping resource="Client.hbm.xml"/>
</session-factory>
</hibernate-configuration>
Can I get some help please? Thanks!!