Hibernate 3.X avec plugin Eclipse
Bonjour à tous,
j'ai des soucis entre le dernière version et le plugin eclipse hibernate.
hier ça marchait mais aujourd'hui j'ai des erreurs dont j'ai du mal à régler.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| <?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>
<!-- local connection properties -->
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/vxmltree</property>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.connection.password">wxcQSDaze123</property>
<!-- property name="hibernate.connection.pool_size"></property
dialect for DB2 -->
<property name="dialect">org.hibernate.dialect.DB2Dialect</property>
<property name="hibernate.show_sql">true</property>
<property name="hibernate.use_outer_join">true</property>
<property name="hibernate.jndi.class">org.hibernate.service.jndi.internet.JndiService</property>
<property name="hibernate.current_session_context_class">thread</property>
<!--
<property name="hibernate.transaction.factory_class">org.hibernate.engine.transaction.spi.TransactionFactory</property>
<property name="jta.UserTransaction">java:comp/UserTransaction</property>
-->
<!--
<mapping resource="Menudtmf.hbm"/>
<mapping resource="Routing.hbm"/>
<mapping resource="Messagerie.hbm"/>
<mapping resource="Calendar.hbm"/>
-->
<mapping resource="Nodetree.hbm"/>
</session-factory>
</hibernate-configuration> |
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
| <?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >
<hibernate-mapping package="iBox.server.hibernate">
<class name="Nodetree" table="nodetree">
<id
column="id"
name="Id"
type="integer"
>
<generator class="native" />
</id>
<property
column="nodetable"
length="45"
name="Nodetable"
not-null="true"
type="string"
/>
<property
column="rght"
length="10"
name="Rght"
not-null="true"
type="integer"
/>
<property
column="lft"
length="10"
name="Lft"
not-null="true"
type="integer"
/>
<property
column="nodename"
length="45"
name="Nodename"
not-null="true"
type="string"
/>
<property
column="nodeid"
length="10"
name="Nodeid"
not-null="true"
type="integer"
/>
</class>
</hibernate-mapping> |
et l'erreur :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
| 23 août 2012 10:58:58 org.hibernate.annotations.common.Version <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {4.0.1.Final}
23 août 2012 10:58:58 org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {4.1.6.Final}
23 août 2012 10:58:58 org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
23 août 2012 10:58:58 org.hibernate.cfg.Environment buildBytecodeProvider
INFO: HHH000021: Bytecode provider name : javassist
23 août 2012 10:58:58 org.hibernate.cfg.Configuration configure
INFO: HHH000043: Configuring from resource: /hibernate.cfg.xml
23 août 2012 10:58:58 org.hibernate.cfg.Configuration getConfigurationInputStream
INFO: HHH000040: Configuration resource: /hibernate.cfg.xml
23 août 2012 10:58:58 org.hibernate.internal.util.xml.DTDEntityResolver resolveEntity
WARN: HHH000223: Recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
23 août 2012 10:58:58 org.hibernate.cfg.Configuration addResource
INFO: HHH000221: Reading mappings from resource: Nodetree.hbm
23 août 2012 10:58:58 org.hibernate.internal.util.xml.DTDEntityResolver resolveEntity
WARN: HHH000223: Recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
23 août 2012 10:58:58 org.hibernate.internal.util.xml.DTDEntityResolver resolveEntity
WARN: HHH000223: Recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
23 août 2012 10:58:58 org.hibernate.internal.util.xml.ErrorLogger logErrors
ERROR: HHH000196: Error parsing XML (2) : Document root element "hibernate-mapping", must match DOCTYPE root "hibernate-configuration".
23 août 2012 10:58:58 org.hibernate.internal.util.xml.ErrorLogger logErrors
ERROR: HHH000196: Error parsing XML (2) : Element type "hibernate-mapping" must be declared.
23 août 2012 10:58:58 org.hibernate.internal.util.xml.ErrorLogger logErrors
ERROR: HHH000196: Error parsing XML (3) : Element type "class" must be declared.
23 août 2012 10:58:58 org.hibernate.internal.util.xml.ErrorLogger logErrors
ERROR: HHH000196: Error parsing XML (4) : Element type "id" must be declared.
23 août 2012 10:58:58 org.hibernate.internal.util.xml.ErrorLogger logErrors
ERROR: HHH000196: Error parsing XML (5) : Element type "generator" must be declared.
23 août 2012 10:58:58 org.hibernate.internal.util.xml.ErrorLogger logErrors
ERROR: HHH000196: Error parsing XML (7) : Attribute "column" must be declared for element type "property".
23 août 2012 10:58:58 org.hibernate.internal.util.xml.ErrorLogger logErrors
ERROR: HHH000196: Error parsing XML (7) : Attribute "length" must be declared for element type "property".
23 août 2012 10:58:58 org.hibernate.internal.util.xml.ErrorLogger logErrors
ERROR: HHH000196: Error parsing XML (7) : Attribute "not-null" must be declared for element type "property".
23 août 2012 10:58:58 org.hibernate.internal.util.xml.ErrorLogger logErrors
ERROR: HHH000196: Error parsing XML (7) : Attribute "type" must be declared for element type "property".
23 août 2012 10:58:58 org.hibernate.internal.util.xml.ErrorLogger logErrors
ERROR: HHH000196: Error parsing XML (8) : Attribute "column" must be declared for element type "property".
23 août 2012 10:58:58 org.hibernate.internal.util.xml.ErrorLogger logErrors
ERROR: HHH000196: Error parsing XML (8) : Attribute "length" must be declared for element type "property".
23 août 2012 10:58:58 org.hibernate.internal.util.xml.ErrorLogger logErrors
ERROR: HHH000196: Error parsing XML (8) : Attribute "not-null" must be declared for element type "property".
23 août 2012 10:58:58 org.hibernate.internal.util.xml.ErrorLogger logErrors
ERROR: HHH000196: Error parsing XML (8) : Attribute "type" must be declared for element type "property".
23 août 2012 10:58:58 org.hibernate.internal.util.xml.ErrorLogger logErrors
ERROR: HHH000196: Error parsing XML (9) : Attribute "column" must be declared for element type "property".
23 août 2012 10:58:58 org.hibernate.internal.util.xml.ErrorLogger logErrors
ERROR: HHH000196: Error parsing XML (9) : Attribute "length" must be declared for element type "property".
23 août 2012 10:58:58 org.hibernate.internal.util.xml.ErrorLogger logErrors
ERROR: HHH000196: Error parsing XML (9) : Attribute "not-null" must be declared for element type "property".
23 août 2012 10:58:58 org.hibernate.internal.util.xml.ErrorLogger logErrors
ERROR: HHH000196: Error parsing XML (9) : Attribute "type" must be declared for element type "property".
23 août 2012 10:58:58 org.hibernate.internal.util.xml.ErrorLogger logErrors
ERROR: HHH000196: Error parsing XML (10) : Attribute "column" must be declared for element type "property".
23 août 2012 10:58:58 org.hibernate.internal.util.xml.ErrorLogger logErrors
ERROR: HHH000196: Error parsing XML (10) : Attribute "length" must be declared for element type "property".
23 août 2012 10:58:58 org.hibernate.internal.util.xml.ErrorLogger logErrors
ERROR: HHH000196: Error parsing XML (10) : Attribute "not-null" must be declared for element type "property".
23 août 2012 10:58:58 org.hibernate.internal.util.xml.ErrorLogger logErrors
ERROR: HHH000196: Error parsing XML (10) : Attribute "type" must be declared for element type "property".
23 août 2012 10:58:58 org.hibernate.internal.util.xml.ErrorLogger logErrors
ERROR: HHH000196: Error parsing XML (11) : Attribute "column" must be declared for element type "property".
23 août 2012 10:58:58 org.hibernate.internal.util.xml.ErrorLogger logErrors
ERROR: HHH000196: Error parsing XML (11) : Attribute "length" must be declared for element type "property".
23 août 2012 10:58:58 org.hibernate.internal.util.xml.ErrorLogger logErrors
ERROR: HHH000196: Error parsing XML (11) : Attribute "not-null" must be declared for element type "property".
23 août 2012 10:58:58 org.hibernate.internal.util.xml.ErrorLogger logErrors
ERROR: HHH000196: Error parsing XML (11) : Attribute "type" must be declared for element type "property".
Exception in thread "main" java.lang.ExceptionInInitializerError
at iBox.server.hibernate.Main.main(Main.java:14)
Caused by: java.lang.RuntimeException: Probleme de configuration :Unable to read XML
at iBox.server.hibernate.HibernateFactory.<clinit>(HibernateFactory.java:17)
... 1 more
Caused by: org.hibernate.InvalidMappingException: Unable to read XML
at org.hibernate.internal.util.xml.MappingReader.readMappingDocument(MappingReader.java:109)
at org.hibernate.cfg.Configuration.add(Configuration.java:478)
at org.hibernate.cfg.Configuration.add(Configuration.java:474)
at org.hibernate.cfg.Configuration.add(Configuration.java:647)
at org.hibernate.cfg.Configuration.addResource(Configuration.java:730)
at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:2111)
at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:2083)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2063)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2016)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1931)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1910)
at iBox.server.hibernate.HibernateFactory.<clinit>(HibernateFactory.java:15)
... 1 more
Caused by: org.xml.sax.SAXParseException; lineNumber: 6; columnNumber: 52; Document root element "hibernate-mapping", must match DOCTYPE root "hibernate-configuration".
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:387)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:321)
at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.rootElementSpecified(XMLDTDValidator.java:1647)
at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleStartElement(XMLDTDValidator.java:1925)
at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator.java:790)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:376)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:602)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3080)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:899)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:625)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:488)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:819)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:748)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1208)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:525)
at org.dom4j.io.SAXReader.read(SAXReader.java:465)
at org.hibernate.internal.util.xml.MappingReader.readMappingDocument(MappingReader.java:78)
... 12 more |
Merci d'avance pour votre aide,
bonne journée