Wildfly FirebirdSQLhibernate error
loufeliz May 19, 2016 4:42 PMHello,
I am running Wildfly 8.2, on Win 7 64 Bit, JDK 1.8
I have deployed the application Dashbuilder (http://www.dashbuilder.org/) and run demo with H2 and then I succesfully installed Postgres as my default datasource and repository. I added additional jdbc drivers to WildFly and used Postgres as a datasource for a simple dashboard.
I installed Firebird Jayberd2.2.10.jar driver into Wildfly and successfully tested it.
I restarted the Wildfly server (batch file). Logged into conosole made sure the datasource was enabled and did a test connect and it was succesful.
I follow steps to setup datasource in Dashbuilder and I get the error from Wildfly Log
2016-05-17 10:11:05,173 ERROR [org.jboss.dashboard.database. hibernate. HibernateInitializer] (default task-51) The underlying database code [firebird 1.55li] is not supported.
2016-05-17 10:11:05,185 ERROR [org.jboss.dashboard.dataset. sql.SQLDataSet] (default task-51) Error in load() SQLDataset. SQL = null: java.lang.NullPointerException
I tried with newer version of Firebrid SQL and similar error
2016-05-13 16:01:21,372 ERROR [org.jboss.dashboard.database.hibernate.HibernateInitializer] (default task-10) The underlying database code [firebird 2.1.wi] is not supported.
2016-05-13 16:01:21,383 ERROR [org.jboss.dashboard.dataset.sql.SQLDataSet] (default task-10) Error in load() SQLDataset. SQL = null: java.lang.NullPointerException
In theory I understand that Hibernate needs particular info on Firebird. What I am stuck on is where do tell it about firebird. I need to access a firebird database, but will also be using the app against Postgres and MS SQL. I found some information on dialects, but need some guidance on the next part. Is this something that I must set for each Firebird connection (Java:/fbdatabase)
Is Hibernate something configured within WildFly or is it possibly in the application?
I found info on mysql dialect and if same holds true for Firebird, I just need to locate the file in which to place this snippet of xml
<hibernate-configuration>
<session-factory>
<property name="dialect">
org.hibernate.dialect.FirebirdDialect
</property>
<property name="connection.datasource">java:/rskinfo</property>
</session-factory>
</hibernate-configuration>
and perhaps this is what needs
I really want to get Firebird working with this and would greatly appreciate some help.
Below is my configuration information:
I setup a folder C:\Server\wildfly-8.2.1\modules\system\layers\base\org\firebirdsql\main
copied in the jaybird-2.2.10.jar file (not the full jar)
module.xml
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.3" name="org.firebirdsql">
<resources>
<resource-root path="jaybird-2.2.10.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name = "javax.resource.api"/>
<module name="javax.transaction.api"/>
</dependencies>
</module>
I am running the STandlone.bat so I edit the standalone.xml config file adding the driver to drivers section
<driver name="firebirdsql" module="org.firebirdsql">
<driver-class>org.firebirdsql.jdbc.FBDriver</driver-class>
<xa-datasource-class>org.firebirdsql.ds.FBXADataSource</xa-datasource-class>
</driver>
Then added a datasource
<datasource jta="false" jndi-name="java:/rskinfo" pool-name="rskinfo" enabled="true" use-ccm="false">
<connection-url>jdbc:firebirdsql://server:3050/RSKINFO</connection-url>
<driver-class>org.firebirdsql.jdbc.FBDriver</driver-class>
<connection-property name="charset">
UTF8
</connection-property>
<driver>firebirdsql</driver>
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
<security>
<user-name>SYSDBA</user-name>
<password>masterkey</password>
</security>
<validation>
<validate-on-match>false</validate-on-match>
<background-validation>false</background-validation>
</validation>
<timeout>
<set-tx-query-timeout>false</set-tx-query-timeout>
<blocking-timeout-millis>0</blocking-timeout-millis>
<idle-timeout-minutes>0</idle-timeout-minutes>
<query-timeout>0</query-timeout>
<use-try-lock>0</use-try-lock>
<allocation-retry>0</allocation-retry>
<allocation-retry-wait-millis>0</allocation-retry-wait-millis>
</timeout>
<statement>
<share-prepared-statements>false</share-prepared-statements>
</statement>
</datasource>