Hi all !!
I've a very very boring problem...
Caused by: java.lang.RuntimeException: Exception building SessionFactory: Error reading resource: ../../mapping/Environnement.hbm.xml at majpps.serveurmad.accesbase.HibernateUtil.<clinit>(HibernateUtil.java:38) ... 33 more Caused by: net.sf.hibernate.MappingException: Error reading resource: ../../mapping/Environnement.hbm.xml at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:318) at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:976) at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:928) at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:856) at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:842) at majpps.serveurmad.accesbase.HibernateUtil.<clinit>(HibernateUtil.java:35) ... 33 more Caused by: net.sf.hibernate.MappingException: invalid mapping at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:284) at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:315) ... 38 more Caused by: org.xml.sax.SAXParseException: The content of element type "class" must match "(meta*,(cache|jcs-cache)?,(id|composite-id),discriminator?,(version|timestamp)?,(property|many-to-one|one-to-one|component|dynamic-component|any|map|set|list|bag|idbag|array|primitive-array)*,(subclass*|joined-subclass*))". at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source) at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.dom4j.io.SAXReader.read(SAXReader.java:339) at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:283)
Environnement.hbm.xml is like that :
<?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping> <class name="majpps.beans.Environnement" table="environnement" lazy="true"> <id name="idEnv" column="IDENV"> <generator class="sequence"> <param name="seq_environnement">seq_environnement</param> </generator> </id>
<property name="nom"> <column name="NOM" sql-type="VARCHAR2(50)" not-null="true"/> </property>
<discriminator column="ENV_TYPE" type="string"/>
<subclass name="majpps.beans.EnvironnementPoste" lazy="false" discriminator-value="POSTE" dynamic-update="true" dynamic-insert="true"> <property name="version"> <column name="VERSION" sql-type="VARCHAR2(50)" not-null="true"/> </property> </subclass>
<subclass name="majpps.beans.SolutionLecteur" lazy="false" discriminator-value="LECTEUR" dynamic-update="true" dynamic-insert="true"/>
</class>
</hibernate-mapping>
What's the prob folks please ?? I don't understand... right DTD, right tags... don't really understand and I'm tired of this issue...
Really Thank You !!! Really...
|