11 Replies Latest reply on May 25, 2016 2:09 PM by Lou Feliz

    Wildfly  FirebirdSQLhibernate error

    Lou Feliz Newbie



      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




                  <property name="dialect">



              <property name="connection.datasource">java:/rskinfo</property>




      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)


      <?xml version="1.0" encoding="UTF-8"?>

      <module xmlns="urn:jboss:module:1.3" name="org.firebirdsql">


              <resource-root path="jaybird-2.2.10.jar"/>




              <module name="javax.api"/>

        <module name = "javax.resource.api"/>

              <module name="javax.transaction.api"/>




      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">





      Then added   a datasource


                      <datasource jta="false" jndi-name="java:/rskinfo" pool-name="rskinfo" enabled="true" use-ccm="false">



                          <connection-property name="charset">


























        • 1. Re: Wildfly  FirebirdSQLhibernate error
          Lou Feliz Newbie

          Just updating this.... Problem is with Dashbuilder not directly supporting FirebridSQL.  I has submitted a ticket to the Dashbuilder  dev's.




          - Lou

          • 2. Re: Wildfly  FirebirdSQLhibernate error
            Wolfgang Mayer Master

            I don't think this is related to Dashbuilder (but you should use the 'JNDI' configruration)

            You also should make sure that your driver is installed correctly in wildfly.

            This module.xm should be working

            <module xmlns="urn:jboss:module:1.3" name="org.firebird">


                    <resource-root path="jaybird-2.2.10.jar"/>



                    <module name="javax.api"/>

                    <module name="javax.resource.api"/>

                    <module name="javax.transaction.api"/>



            I'd suggest that you install the driver via cli. You datasource could be created via the console

            • 3. Re: Wildfly  FirebirdSQLhibernate error
              Lou Feliz Newbie



              Interesting as the driver says it is fine in Wildfly.    What steps did you take to install driver via CLI ?





              • 4. Re: Wildfly  FirebirdSQLhibernate error
                Wolfgang Mayer Master

                This documentation should provide more details (JDBC Driver / DataSource Setup | HAL Management Console). But in short this is:


                1. change to directory $JBOSS_HOME/bin
                2. Connect to WildFly: ./jboss-cli.sh  --connect
                3. add the driver:


                • 5. Re: Wildfly  FirebirdSQLhibernate error
                  Lou Feliz Newbie



                  I just want to clarify my problem, before I attempt redoing install via CLI, I checked my install and updated naming convention I used for the module and updated my config. I am able to setup an External Connection to Firebird datasource that is configured in Wildfly.  When setting the Ext Connection in Dashbuilder,  the test SQL does pass.


                  In Dashbuilder, I get the hibernate error in log file when I goto define the datasource and select the SQL Qry - external firebird connection that I defined. 


                  I will now attempt installing driver in manner you mentioned via CLI and see what happens.....

                  • 6. Re: Wildfly  FirebirdSQLhibernate error
                    Lou Feliz Newbie

                    Hello ,


                    I added the driver via the cli, thank you.


                    I then proceed to add data source via Wildfly Admin control panel,  enable it, test connection. All is well.


                    Login to Dashbuilder,    add External Connection,    test it successfully,


                    Then proceed to add a Data provider.  I select  the type, select my External connection, put in valid SQL, one I used to test the Connection and error.  Below is excerpt from the Log.




                    2016-05-24 15:05:05,873 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-16) JBAS010400: Bound data source [java:/wsdmxtransport]

                    2016-05-24 15:06:16,935 ERROR [org.jboss.dashboard.database.hibernate.HibernateInitializer] (default task-40) The underlying database code [firebird 2.5] is not supported.

                    2016-05-24 15:06:16,935 ERROR [org.jboss.dashboard.dataset.sql.SQLDataSet] (default task-40) Error in load() SQLDataset. SQL = null: java.lang.NullPointerException

                    • 7. Re: Wildfly  FirebirdSQLhibernate error
                      Wolfgang Mayer Master

                      Yes, you are right. This message is thrown within the class HibernateInitializer from Dashbuilder (dashboard-builder-6.4.0.Final/modules/dashboard-commons/src/main/java/org/jboss/dashboard/database/hibernate/HibernateInitializer.java)

                      But it worked in my test when I made some simple changes:


                      below: public static final String DB_SYBASE = "sybase";

                      add:public static final String DB_FIREBIRD = "firebird";


                      change: DB_SYBASE + "=org.hibernate.dialect.SybaseASE157Dialect")

                      to:         DB_SYBASE + "=org.hibernate.dialect.SybaseASE157Dialect," +

                                   DB_FIREBIRD + "=org.hibernate.dialect.FirebirdDialect")


                      below: if (dbProductName.contains("oracle")) return DB_ORACLE;

                      add: if (dbProductName.contains("firebird")) return DB_FIREBIRD


                      Then do the

                      mvn clean install -Dfull -DskipTests

                      • 8. Re: Wildfly  FirebirdSQLhibernate error
                        Lou Feliz Newbie

                        Thank you that's good to know.  My experience working with Java is minimal, I am able to open war file, modify properties and build new war to deploy Dashbuilder with different default database, add role etc...


                        Is there a good place for me to find step by step what I need to setup on my workstation to modify the project as you have?  I am primarily developing desktop biz apps with Delphi.  I am working on Win 7 64 bit. If needed, I can setup a linux VM for this and would like to be able to modify the DashB source so I can keep testing FirebirdSQL.    I would then generate my own custom build of DashB until Firebird support is officially added by the dev team.


                        I am currently using V2.5, and would like to migrate to V3 which was just recently released.




                        - Lou

                        • 10. Re: Wildfly  FirebirdSQLhibernate error
                          Lou Feliz Newbie

                          Thanks.  I will give this a go on Windows, and later on a newly minted Linux VM.



                          • 11. Re: Wildfly  FirebirdSQLhibernate error
                            Lou Feliz Newbie

                            Hello.  Success!  I added the lines  as indicated  to enable Firebird and it worked against FB 1.5. I will be testing against  FB 2.5 and 3.0 NExt.


                            I built on Windows 7 64 bit using JDK 8 and latest Maven and all is good....so far. Lets see  what happens when I start building new workspace.


                            This is great.  I hope that this change makes it into next build.  My users are going to like DashBuilder!


                            - Lou