Hi,
I'm having warnings when I configure a SessionFactory,
could anyone help me please?
thank you.
Code:
11:44:42,063 INFO Environment:401 - Hibernate 2.0.1
11:44:42,094 INFO Environment:435 - loaded properties from resource hibernate.properties: {hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver, hibernate.cglib.use_reflection_optimizer=true, hibernate.dialect=net.sf.hibernate.dialect.OracleDialect, hibernate.connection.username=crea, hibernate.connection.url=jdbc:oracle:thin:@wsdevel:1521:oradevel, hibernate.show_sql=true, hibernate.connection.password=crea, hibernate.connection.pool_size=30, hibernate.statement_cache.size=50}
11:44:42,104 INFO Environment:450 - using CGLIB reflection optimizer
11:44:42,114 INFO Environment:460 - JVM proxy support: true
11:44:42,124 INFO Configuration:283 - Mapping resource: net/wasys/crea/model/OpiniaoVO.hbm.xml
11:44:42,384 WARN XMLHelper:43 - Warning parsing XML: XML InputStream(1)
org.xml.sax.SAXParseException: URI was not reported to parser for entity [document]
at gnu.xml.aelfred2.SAXDriver.warn(SAXDriver.java:934)
at gnu.xml.aelfred2.SAXDriver.startExternalEntity(SAXDriver.java:631)
at gnu.xml.aelfred2.XmlParser.pushURL(XmlParser.java:3358)
at gnu.xml.aelfred2.XmlParser.doParse(XmlParser.java:159)
at gnu.xml.aelfred2.SAXDriver.parse(SAXDriver.java:320)
at gnu.xml.aelfred2.XmlReader.parse(XmlReader.java:294)
at org.dom4j.io.SAXReader.read(SAXReader.java:339)
at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:252)
at net.sf.hibernate.cfg.Configuration.addClass(Configuration.java:286)
at net.wasys.crea.hibernate.HibernateThreadLocalSession.init(HibernateThreadLocalSession.java:190)
at net.wasys.crea.hibernate.HibernateThreadLocalSession.<clinit>(HibernateThreadLocalSession.java:46)
at net.wasys.crea.test.Teste.main(Teste.java:27)
11:44:42,434 WARN XMLHelper:43 - Warning parsing XML: XML InputStream(4)
org.xml.sax.SAXParseException: No base URI; hope URI is absolute: http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd
at gnu.xml.aelfred2.SAXDriver.warn(SAXDriver.java:934)
at gnu.xml.aelfred2.XmlParser.readExternalIds(XmlParser.java:2399)
at gnu.xml.aelfred2.XmlParser.parseDoctypedecl(XmlParser.java:804)
at gnu.xml.aelfred2.XmlParser.parseProlog(XmlParser.java:522)
at gnu.xml.aelfred2.XmlParser.parseDocument(XmlParser.java:414)
at gnu.xml.aelfred2.XmlParser.doParse(XmlParser.java:167)
at gnu.xml.aelfred2.SAXDriver.parse(SAXDriver.java:320)
at gnu.xml.aelfred2.XmlReader.parse(XmlReader.java:294)
at org.dom4j.io.SAXReader.read(SAXReader.java:339)
at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:252)
at net.sf.hibernate.cfg.Configuration.addClass(Configuration.java:286)
at net.wasys.crea.hibernate.HibernateThreadLocalSession.init(HibernateThreadLocalSession.java:190)
at net.wasys.crea.hibernate.HibernateThreadLocalSession.<clinit>(HibernateThreadLocalSession.java:46)
at net.wasys.crea.test.Teste.main(Teste.java:27)
and my mapping file:
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
<class
name="net.wasys.crea.model.OpiniaoVO"
table="OPINIAO"
>
<id
name="id"
type="java.lang.Long"
column="OPINIAOID"
>
<generator class="sequence">
<param name="sequence">Opiniao_serial</param>
</generator>
</id>
<property
name="dataHoraOpiniao"
type="java.sql.Timestamp"
column="DATAHORAOPINIAO"
not-null="true"
length="7"
/>
<property
name="nomeUsuario"
type="java.lang.String"
column="NOMEUSUARIO"
not-null="true"
length="60"
/>
<property
name="emailUsuario"
type="java.lang.String"
column="EMAILUSUARIO"
not-null="true"
length="100"
/>
<property
name="link"
type="java.lang.String"
column="LINK"
not-null="true"
length="255"
/>
<property
name="mensagem"
type="java.lang.String"
column="MENSAGEM"
not-null="true"
length="500"
/>
</class>
</hibernate-mapping>