Hi,
I'm having problems to recover a reference to a SessionFactory using:
Code:
Configuration conf = new Configuration().configure();
sessionFactory = conf.buildSessionFactory();
it get stuck under the call to buildSessionFactory, and oracle DB starts to process like crazy.
I'm using Oracle DB, with tomcat 4.1 with a tomcat DataSource connecting to oracle, then I have the following xml files for hibernate configuration placed under the web-inf/classes folder:
hibernate.cfg.xml
Code:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration
PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="connection.datasource">java:comp/env/sistemaSegurancaDS</property>
<property name="show_sql">false</property>
<property name="dialect">net.sf.hibernate.dialect.OracleDialect</property>
<!-- Mapping files -->
<mapping resource="Sistema.map.xml"/>
</session-factory>
</hibernate-configuration>
and also:
Sistema.map.xml
Code:
<?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="testestrutshibernate.SistemaDTO" table="tb_sistema">
<id name="id">
<generator class="sequence">
<param name="id">SQ_BD_SISTEMA</param>
</generator>
</id>
<property name="sigla">
<column name="SIGLA"/>
</property>
<property name="nome">
<column name="NOME"/>
</property>
<property name="descricao">
<column name="DESCRICAO"/>
</property>
</class>
</hibernate-mapping>
tx in advance,