May there be something wrong using ENTITIES in the mapping file?
My mapping-file (model.hbm.xml) works fine with the following mapping-file DOCTYPE (without ENTITY-declaration):
Code:
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
Adding an ENTITY-entry brings a MappingException: Could not read mappings from resource: model.hbm.xml
The new DOCTYPE-declaration:
Code:
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" [
<!ENTITY gp SYSTEM "generic-properties.hbm.xml">
]>
The InternetExplorer reads the mapping-file without problems. If I include the "&gp;"-entity tag, the content of the generic-properties.hbm.xml-file is also included.
But Hibernate fails to startup everytime with the same error (Hibernate 3.1.3).
Maybe my ENTITY-declaration may be wrong but because it works with IE I think there might be a problem with the xml-parser...
Here the stacktrace:
Code:
org.hibernate.MappingException: Could not read mappings from resource: model.hbm.xml
at org.hibernate.cfg.Configuration.addResource(Configuration.java:485)
at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1465)
at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1433)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1414)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1390)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1310)
at org.vgb.persistence.HibernateSessionFactory.rebuildSessionFactory(HibernateSessionFactory.java:66)