-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Hibernate 3 + Firebird 2.0
PostPosted: Fri Mar 07, 2008 12:53 pm 
Newbie

Joined: Tue Mar 04, 2008 1:05 pm
Posts: 2
Location: Floripa/Brazil
Hibernate version: 3

Hi peoples...

What's problem in my connection?


Exception:
Quote:
Exception in thread "main" java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at br.ind.cianet.ciaproxy.dao.DAOFactory.getDAO(DAOFactory.java:39)
at br.ind.cianet.ciaproxy.control.ProxyControl.<init>(ProxyControl.java:33)
at br.ind.cianet.ciaproxy.monitor.MonitorService.<init>(MonitorService.java:47)
at br.ind.cianet.ciaproxy.monitor.MonitorService.getInstance(MonitorService.java:71)
at br.ind.cianet.ciaproxy.socket.ServidorSocket.<init>(ServidorSocket.java:64)
at br.ind.cianet.ciaproxy.CiaProxy.main(CiaProxy.java:68 )
Caused by: javax.persistence.PersistenceException: org.hibernate.HibernateException: Hibernate Dialect must be explicitly set for database: Firebird 2.0
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:720)
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:33)
at br.ind.cianet.ciaproxy.dao.GenericEJB3DAO.<clinit>(GenericEJB3DAO.java:191)
... 8 more
Caused by: org.hibernate.HibernateException: Hibernate Dialect must be explicitly set for database: Firebird 2.0
at org.hibernate.dialect.DialectFactory.determineDialect(DialectFactory.java:62)
at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:39)
at org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.java:409)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:119)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2006)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1289)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:713)
... 12 more


persistence.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0"
   xmlns="http://java.sun.com/xml/ns/persistence"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
   <persistence-unit name="ciasharedPU" transaction-type="RESOURCE_LOCAL">
      <class>br.ind.cianet.ciashared.model.PerfilPadrao</class>
      <class>br.ind.cianet.ciashared.model.Equipamento</class>
      <class>br.ind.cianet.ciashared.model.Mapa</class>
      <class>br.ind.cianet.ciashared.model.Valor</class>
      <class>br.ind.cianet.ciashared.model.TipoEquipamentoGenerico</class>
      <class>br.ind.cianet.ciashared.model.TipoVariavel</class>
      <class>br.ind.cianet.ciashared.model.Servidor</class>
      <class>br.ind.cianet.ciashared.model.Usuario</class>
      <class>br.ind.cianet.ciashared.model.Atributo</class>
      <class>br.ind.cianet.ciashared.model.Registro</class>
      <class>br.ind.cianet.ciashared.model.BinaryBlobType</class>
      <class>br.ind.cianet.ciashared.model.Archive</class>
      <class>br.ind.cianet.ciashared.model.OpcaoEquipamento</class>
      <class>br.ind.cianet.ciashared.model.Alarme</class>
      <!-- <class>br.ind.cianet.ciashared.model.Equipamento_Alarme</class> -->
      <class>br.ind.cianet.ciashared.model.EnderecoIp</class>
      <class>br.ind.cianet.ciashared.model.Proxy</class>
      <class>br.ind.cianet.ciashared.model.Elemento</class>
      <class>br.ind.cianet.ciashared.model.EnderecoIp</class>
      <class>br.ind.cianet.ciashared.model.Equipamento_Atributo</class>
      <class>br.ind.cianet.ciashared.model.Equipamento_OpcaoEquipamento</class>
      <class>br.ind.cianet.ciashared.model.PerfilPadrao_Atributo</class>
      <class>br.ind.cianet.ciashared.model.Proxy_EnderecoIp</class>
      <class>br.ind.cianet.ciashared.model.TipoEquipamento</class>
      <class>br.ind.cianet.ciashared.model.TipoEquipamento_TipoVariavel</class>
      <class>br.ind.cianet.ciashared.model.Usuario_Mapa</class>
      <properties>
         <property name="hibernate.connection.username" value="sysdba" />
         <property name="hibernate.connection.driver_class" value="org.firebirdsql.jdbc.FBDriver" />
         <property name="hibernate.connection.password" value="masterkey" />
         <property name="hibernate.connection.url" value="jdbc:firebirdsql:localhost/3050:C:\FIREBIRD\CIASHARED.GDB" />
         <property name="hibernate.connection.dialect" value="org.hibernate.dialect.FirebirdDialect" />
         <property name="hibernate.hbm2ddl.auto" value="create" />
      </properties>
   </persistence-unit>
</persistence>


thanks... :)

_________________
Pablo


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 07, 2008 5:45 pm 
Red Hat Associate
Red Hat Associate

Joined: Mon Aug 16, 2004 11:14 am
Posts: 253
Location: Raleigh, NC
Code:
<property name="hibernate.connection.dialect" value="org.hibernate.dialect.FirebirdDialect" />


The property's name is "hibernate.dialect", not "hibernate.connection.dialect".

_________________
Chris Bredesen
Senior Software Maintenance Engineer, JBoss


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.