Pessoal, eu tenho as seguintes persistence units
<persistence-unit name="livraria" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect" />
<property name="hibernate.connection.show_sql" value="true" />
<property name="hibernate.hbm2ddl.auto" value="update" />
<property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver " />
<property name="hibernate.connection.username" value="root" />
<property name="hibernate.connection.password" value="" />
<property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/livraria" />
</properties>
</persistence-unit>
<persistence-unit name="firebird" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<exclude-unlisted-classes>true</exclude-unlisted-classes>
<properties>
<property name="hibernate.url" value="jdbc:firebirdsql:localhost:C:/JAVA/workspace/AreCliente/BD.fdb"/>
<property name="hibernate.password" value="masterkey"/>
<property name="hibernate.username" value="sysdba"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.FirebirdDialect"/>
<property name="hibernate.driver_class" value="org.firebirdsql.jdbc.FBDriver"/>
<property name="hibernate.cache.provider_class" value="org.hibernate.cache.NoCacheProvider"/>
<property name="hibernate.hbm2ddl.auto" value="create"/>
</properties>
</persistence-unit>
A unidade “livraria” que é para mysql funciona perfeitamente, agora a “firebird” dá a seguinte mensagem.
ERROR: HHH000231: Schema export unsuccessful
java.lang.UnsupportedOperationException: The application must supply JDBC connections
at org.hibernate.service.jdbc.connections.internal.UserSuppliedConnectionProviderImpl.getConnection(UserSuppliedConnectionProviderImpl.java:62)
at org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:51)
at org.hibernate.tool.hbm2ddl.DatabaseExporter.(DatabaseExporter.java:52)
at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:367)
at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
at org.hibernate.internal.SessionFactoryImpl.(SessionFactoryImpl.java:490)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1741)
at org.hibernate.ejb.EntityManagerFactoryImpl.(EntityManagerFactoryImpl.java:93)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:905)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:890)
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:57)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:63)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:47)
at br.com.k19.jpa.GeraTabelas.main(GeraTabelas.java:8)
Os jars do Firebird encontra-se no classpath junto com os do hibernate e mysql(mysql-connector-java-5.1.23-bin).
jaybird-2.2.2
jaybird-full-2.2.2
Eu já tentei mudar o Dialect de org.hibernate.dialect.FirebirdDialect para org.hibernate.dialect.HSQLDialect mas não deu certo, esse erro deu com mysql e foi resolvido mudando o dialect de “org.hibernate.dialect.MySQLInnoDBDialect” para “org.hibernate.dialect.MySQL5InnoDBDialect”
O que está errado ai? Só para lembrar, as classes funciona corretamente com o mysql, cria tabelas, campos, persiste os dados, só está dando pau mesmo com o firebird, eu estou precisando conectar com o firebird para fazer uma área cliente de um sistema já existente e foi feito em firebird.