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... :)