run:
94 [main] INFO org.hibernate.annotations.common.Version - Hibernate Commons Annotations 3.2.0.Final
110 [main] INFO org.hibernate.cfg.Environment - Hibernate 3.6.0.Final
110 [main] INFO org.hibernate.cfg.Environment - hibernate.properties not found
110 [main] INFO org.hibernate.cfg.Environment - Bytecode provider name : javassist
110 [main] INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
172 [main] INFO org.hibernate.cfg.Configuration - configuring from resource: hibernate/hibernate.cfg.xml
172 [main] INFO org.hibernate.cfg.Configuration - Configuration resource: hibernate/hibernate.cfg.xml
500 [main] WARN org.hibernate.util.DTDEntityResolver - recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
org.hibernate.HibernateException: Could not parse configuration: hibernate/hibernate.cfg.xml
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2216)
at org.hibernate.cfg.Configuration.configure(Configuration.java:2128)
at model.Teste.main(Teste.java:23)
Caused by: org.dom4j.DocumentException: Connection timed out: connect Nested exception: Connection timed out: connect
at org.dom4j.io.SAXReader.read(SAXReader.java:484)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2208)
... 2 more
<?xml version="1.0" encoding="UTF-8"?>
<!--
Document : hibernate.cfg.xml
Created on : 27 de Janeiro de 2011, 08:05
Author : Administrador
Description:
Purpose of the document follows.
-->
<!DOCTYPE hibernate-configuration
PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">
oracle.jdbc.driver.OracleDriver
</property>
<property name="hibernate.connection.url">
jdbc:oracle:thin:@127.0.0.1:1521:xe
</property>
<property name="hibernate.connection.username">
tecnicos
</property>
<property name="hibernate.connection.password">
tecnicos
</property>
<property name="hibernate.connection.dialect">
org.hibernate.dialect.Oracle10gDialect
</property>
<mapping resource="hibernate/empresa.hbm.xml"/>
</session-factory>
</hibernate-configuration>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Document : empresa.hbm.xml
Created on : 27 de Janeiro de 2011, 08:37
Author : Administrador
Description:
Purpose of the document follows.
-->
<!DOCTYPE hibernate-mapping
PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="model.Empresa">
<id name="emp_id"/>
<property name="emp_fili_codi"/>
<property name="emp_nome"/>
<property name="emp_email"/>
</class>
</hibernate-mapping>
por favor me ajudem.