Monday, 15 August 2011

java - Hibernate: Exception in thread "main" org.hibernate.MappingException: invalid configuration -


I'm having trouble with my hybrnet.cfg.xml-file with which I want to export the attributes of an object Try an Apache Derby Table.

  & lt ;? XML version = '1.0' encoding = 'UTF-8'? & Gt; & Lt ;! DOCTYPE Hibernate-Configuration PUBLIC "- // Hibernate / Hibernate Configuration DTD 3.0 / N" "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"> & Lt; Hibernate-configuration & gt; & Lt; Session-Factory & gt; & Lt ;! - Database connection settings - & gt; & Lt; Property Name = "connection.driver_class" & gt; Org.apache.derby.jdbc.EmbeddedDriver & lt; / Property & gt; & Lt; Property Name = "connection.url" & gt; JDBC: Derby: C: \ Users \ Laundetio \ Documents Java Libes \ Habernet DB; Make = true < / Property & gt; & Lt; Property Name = "connection.username" & gt; Hibernate & lt; / Property & gt; & Lt; Property Name = "connection.password" & gt; Hibernate & lt; / Property & gt; / & Gt; & Lt ;! - JDBC connection pool (use built-in) - & gt; & Lt; Property Name = "connection.pool_size" & gt; 2 & lt; / Property & gt; & Lt ;! - SQL bid - & gt; & Lt; Property Name = "Bid" & gt; Org.hibernate.dialect.DerbyDialect & lt; / Property & gt; & Lt ;! - Enable hibernate current session context - & gt; & Lt; Property Name = "current_session_context_class" & gt; Thread & lt; / Property & gt; & Lt ;! - Disable second-level cache - & gt; & Lt; Property Name = "cache.provider_class" & gt; Org.hibernate.cache.internal.NoCacheProvider & lt; / Property & gt; & Lt ;! - Standout to all executed SQL - & gt; & Lt; Property Name = "show_sql" & gt; True & lt; / Property & gt; & Lt ;! - Drop and delete database schema at startup - & gt; & Lt ;! - & lt; Property Name = "hbm2ddl.auto" & gt; Create & lt; / Property & gt; & Lt; Mapping Resource = "org / hibernate / tutorial / domain / event.hbm.xml" /> & Lt; Mapping resource = "org / hibernate / tutorial / domain / person.hbm.xml" /> - & gt; & Lt; / Session-Factory & gt; & Lt; / Hibernate-configuration & gt;  

The exception message is the following:

  18: 01: 01,080 Debuts DTDXT revolver: 69 - Trying to solve the system ID [http: // world Wide Web. Hibernate.org/dtd/hibernate-configuration-3.0.dtd] 18: 01: 01,081 Debug DTDNET Revolver: 71 - Accredited Hibernate Namespace; Org / hibernate / 18: 01: 01,081 attempts to resolve the chamber within the debug DTDTT revolver: 108 - "[http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd] threads in the classpath" Main "Org.hibernate.MappingException: invalid configuration  

What could be the problem?

Code> & lt; attribute name = "connection.password" & gt; hibernate & lt; / property & gt;

Just a wrong formatted XML


No comments:

Post a Comment