Announcement Announcement Module
No announcement yet.
Support for Firebird DB (jaybird jdbc driver) Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Support for Firebird DB (jaybird jdbc driver)

    Spring roo, don´t have native support for Firebird Db. at the moment.
    But I make tests to include manually.
    - I create a project with hibernate and mysql support
    - Change pom.xml, I put jaybird library in replacement mysql lib.
    - Next chage in persistence.xml: <property name="hibernate.dialect" value="org.hibernate.dialect.FirebirdDialect"/>
    - changes
    Compile the project correctly and run from springsource ide.
    To access database, i have the error: Cannot load JDBC driver class 'org.firebirdsql.jdbc.FBDriver'
    The jaybird lib is in Reference libraries. How include this librery correctly?

  • #2
    I send more information, there are the changes made in configuration files:

    I add dependency in pom.xml:
    This dependency is correctly added en WEB-INF/lib

    I add this lines in
    database.driverClassName=org.firebirdsql.jdbc.FBDr iver

    I change dialect in persistence.xml:
    <property name="hibernate.dialect" value="org.hibernate.dialect.FirebirdDialect"/>

    The project work fine whith HIBERNATE and HYPERSONIC_PERSISTENCE until make the changes:

    To run mvn tomcat:run obtain this error:

    21/10/2010 12:07:38 org.apache.catalina.core.StandardContext filterStart
    GRAVE: Exception starting filter Spring OpenEntityManagerInViewFilter
    gerInViewFilter cannot be cast to javax.servlet.Filter
    at org.apache.catalina.core.ApplicationFilterConfig.g etFilter(Applicatio
    at org.apache.catalina.core.ApplicationFilterConfig.s etFilterDef(Applica

    someone could get it to work spring roo with firebird database?


    • #3
      Please log a Jira request for this. Is the jar available in maven central?


      • #4
        Thanks, yes this lib org.firebirdsql.jdbc.jaybird is it in the maven central:
        version 2.1.6
        I newby, i try log in jira


        • #5
          Hello Alan, I update spring roo from de git repository to test Firebird support.
          But i have a problem to compile de project, in wrapping:

          C:\msysgit\msysgit\git\roo>cd wrapping

          C:\msysgit\msysgit\git\roo\wrapping>mvn clean compile
          [INFO] Scanning for projects...
          [INFO] ------------------------------------------------------------------------
          [INFO] ------------------------------------------------------------------------
          [INFO] Error building POM (may not be this project's POM).

          Project ID: unknown

          Reason: Could not find the model file 'C:\msysgit\msysgit\git\roo\wrapping\firebird'. for project unknown

          El volumen de la unidad C es Principal
          El número de serie del volumen es: 5833-C871

          Directorio de C:\msysgit\msysgit\git\roo\wrapping

          25/10/2010 12:50 p.m. <DIR> .
          25/10/2010 12:50 p.m. <DIR> ..
          25/10/2010 12:50 p.m. <DIR> bcpg-jdk15
          25/10/2010 12:50 p.m. <DIR> bcprov-jdk15
          25/10/2010 12:50 p.m. <DIR> hapax
          25/10/2010 12:50 p.m. <DIR> hsqldb
          25/10/2010 12:50 p.m. <DIR> inflector
          25/10/2010 12:50 p.m. <DIR> javaparser
          25/10/2010 12:50 p.m. <DIR> jline
          25/10/2010 12:50 p.m. <DIR> json-simple
          25/10/2010 12:50 p.m. <DIR> jtds
          25/10/2010 12:50 p.m. <DIR> jtopen
          25/10/2010 12:50 p.m. <DIR> mysql
          25/10/2010 12:50 p.m. 2.346 pom.xml
          25/10/2010 12:50 p.m. <DIR> postgresql
          25/10/2010 12:50 p.m. <DIR> protobuf
          1 archivos 2.346 bytes
          15 dirs 18.777.096.192 bytes libres


          I have a git pull. is lastest version, but don't have a firebird dir.


          • #6
            It got left out in the last Git commit. Added now. Please try again.


            • #7
              I try again, the mvn clean install on /wrapping folder is sucefully.
              But mvn clean install in roo don't run. I have this errors:

              C:\msysgit\msysgit\roo>mvn -e clean install
              + Error stacktraces are turned on.
              [INFO] Scanning for projects...
              [INFO] Reactor build order:
              [INFO] Spring Roo
              [INFO] Spring Roo - OSGi Bundle Module Parent
              [INFO] Spring Roo - Support
              [INFO] Spring Roo - Support for OSGi Features
              [INFO] Spring Roo - Shell
              [INFO] Spring Roo - Shell - JSON Support
              [INFO] Spring Roo - Maven Plugin - Add-On Development
              [INFO] Spring Roo - OSGi Roo Bundle Module Parent
              [INFO] Spring Roo - Bootstrap
              [INFO] Spring Roo - OSGi Start Level Control
              [INFO] Spring Roo - URL Stream API Contract
              [INFO] Spring Roo - OBR Services
              [INFO] Spring Roo - Shell (OSGi Launcher)
              [INFO] Spring Roo - URL Stream - JDK
              [INFO] Spring Roo - Shell - JLine
              [INFO] Spring Roo - Shell - JLine (OSGi Launcher)
              [INFO] Spring Roo - Felix Interoperability
              [INFO] Spring Roo - Model
              [INFO] Spring Roo - Metadata
              [INFO] Spring Roo - File Undo
              [INFO] Spring Roo - File Monitor
              [INFO] Spring Roo - File Monitor - Polling
              [INFO] Spring Roo - File Monitor - Polling (Roo Launcher)
              [INFO] Spring Roo - Project
              [INFO] Spring Roo - Process Manager
              [INFO] Spring Roo - Classpath
              [INFO] Spring Roo - Classpath (JavaParser Implementation)
              [INFO] Spring Roo - Addon - Maven
              [INFO] Spring Roo - Addon - JavaBean Information
              [INFO] Spring Roo - Addon - toString
              [INFO] Spring Roo - Addon - JavaBean Method Manager
              [INFO] Spring Roo - Addon - Plural Details
              [INFO] Spring Roo - Addon - Property Files
              [INFO] Spring Roo - Addon - @Configurable Support
              [INFO] Spring Roo - Addon - Email
              [INFO] Spring Roo - Addon - JPA
              [INFO] Spring Roo - Addon - JMS
              [INFO] Spring Roo - Addon - Serializable
              [INFO] Spring Roo - Addon - Entity
              [INFO] Spring Roo - Addon - Finder
              [INFO] Spring Roo - Addon - Logging
              [INFO] Spring Roo - Addon - Property Editor
              [INFO] Spring Roo - Addon - Test Data On Demand
              [INFO] Spring Roo - Addon - Automated Integration Testing
              [INFO] Spring Roo - Addon - Backup
              [INFO] Spring Roo - Addon - JSON
              [INFO] Spring Roo - Addon - Web MVC Controller
              [INFO] Spring Roo - Addon - JDBC Driver Acquisition
              [INFO] Spring Roo - Addon - Database Reverse Engineering
              [INFO] Spring Roo - Addon - Web MVC JSP View
              [INFO] Spring Roo - Addon - Web MVC Embedded Extensions
              [INFO] Spring Roo - Addon - Spring Security
              [INFO] Spring Roo - Addon - Solr
              [INFO] Spring Roo - Addon - Web - Flow
              [INFO] Spring Roo - Addon - Web Selenium Test Generator
              [INFO] Spring Roo - Addon - Google Web Toolkit
              [INFO] Spring Roo - Addon - Creator
              [INFO] Spring Roo - Addon - RooBot Client
              [INFO] Spring Roo - Addon - Op4J
              [INFO] Spring Roo - Annotations (ASLv2/GPLv3 Dual Licensed)
              [INFO] ------------------------------------------------------------------------
              [INFO] Building Spring Roo
              [INFO] task-segment: [clean, install]
              [INFO] ------------------------------------------------------------------------
              [INFO] [clean:clean {execution: default-clean}]
              [INFO] Deleting directory C:\msysgit\msysgit\roo\target
              [INFO] [site:attach-descriptor {execution: default-attach-descriptor}]
              [INFO] Preparing source:jar
              [WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation.
              [INFO] No goals needed for project - skipping
              [INFO] [source:jar {execution: default}]
              [INFO] [gpg:sign {execution: sign-artifacts}]
              GPG Passphrase: *********
              *[INFO] [install:install {execution: default-install}]
              [INFO] Installing C:\msysgit\msysgit\roo\pom.xml to C:\Documents and Settings\cg
              nunez\.m2\repository\org\springframework\roo\org.s pringframework.roo.root\1.1.1.
              [INFO] Installing C:\msysgit\msysgit\roo\target\org.springframework. roo.root-1.1
              .1.RELEASE.pom.asc to C:\Documents and Settings\cgnunez\.m2\repository\org\sprin
              gframework\roo\org.springframework.roo.root\1.1.1. RELEASE\
              [INFO] ------------------------------------------------------------------------
              [INFO] Building Spring Roo - OSGi Bundle Module Parent
              [INFO] task-segment: [clean, install]
              [INFO] ------------------------------------------------------------------------
              [INFO] [clean:clean {execution: default-clean}]
              [INFO] Deleting directory C:\msysgit\msysgit\roo\osgi-bundle\target
              [INFO] [exec:exec {execution: default}]
              [INFO] ------------------------------------------------------------------------
              [ERROR] BUILD ERROR
              [INFO] ------------------------------------------------------------------------
              [INFO] Result of cmd.exe /X /C "git log "--pretty=format:Git-Commit-Hash: %H" -n
              1" execution is: '-1073741515'.
              [INFO] ------------------------------------------------------------------------
              [INFO] Trace
              org.apache.maven.lifecycle.LifecycleExecutionExcep tion: Result of cmd.exe /X /C
              "git log "--pretty=format:Git-Commit-Hash: %H" -n1" execution is: '-1073741515'.

              at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.executeGoals(Defa
              at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.executeGoalWithLi
              at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.executeGoal(Defau
              at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.executeGoalAndHan
              at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.executeTaskSegmen
              at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.execute(DefaultLi
              at org.apache.maven.DefaultMaven.doExecute(DefaultMav
              at org.apache.maven.DefaultMaven.execute(DefaultMaven .java:138)
              at org.apache.maven.cli.MavenCli.main( 62)
              at org.apache.maven.cli.compat.CompatibleMain.main(Co
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAcces
              at java.lang.reflect.Method.invoke(
              at org.codehaus.classworlds.Launcher.launchEnhanced(L
              at org.codehaus.classworlds.Launcher.launch(Launcher. java:255)
              at org.codehaus.classworlds.Launcher.mainWithExitCode (

              at org.codehaus.classworlds.Launcher.main(Launcher.ja va:375)
              Caused by: org.apache.maven.plugin.MojoExecutionException: Result of cmd.exe /X
              /C "git log "--pretty=format:Git-Commit-Hash: %H" -n1" execution is: '-107374151
              at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.j ava:283)
              at org.apache.maven.plugin.DefaultPluginManager.execu teMojo(DefaultPlugi
              at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.executeGoals(Defa
              ... 17 more
              [INFO] ------------------------------------------------------------------------
              [INFO] Total time: 17 seconds
              [INFO] Finished at: Tue Oct 26 10:58:48 GFT 2010
              [INFO] Final Memory: 41M/97M
              [INFO] ------------------------------------------------------------------------
              Thans for any help.


              • #8
                I solution this problem adding path:

                Edit: If you get an error like this one Result of cmd.exe /X /C “git log “–pretty=format:Git-Commit-Hash: %H” -n 1″ execution is: ’1′. you should add {Msysgit_installation}/cmd to your PATH environment variable.



                • #9
                  I compile perfectly spring roo from sources.
                  But i have problem to run a simple aplication:
                  I test in Windows XP
                  script vote.roo
                  persistence setup --provider HIBERNATE --database FIREBIRD --userName sysdba --password masterkey --databaseName c:\bde\fuse.fdb
                  Creation OK, next: mvn tomcat:run

                  INFO: Starting tomcat server
                  26/10/2010 15:40:32 org.apache.catalina.core.StandardEngine start
                  INFO: Starting Servlet Engine: Apache Tomcat/6.0.26
                  26/10/2010 15:40:34 org.apache.catalina.core.StandardContext filterStart
                  GRAVE: Exception starting filter Spring OpenEntityManagerInViewFilter
                  gerInViewFilter cannot be cast to javax.servlet.Filter
                  at org.apache.catalina.core.ApplicationFilterConfig.g etFilter(Applicatio
                  at org.apache.catalina.core.ApplicationFilterConfig.s etFilterDef(Applica
                  at org.apache.catalina.core.ApplicationFilterConfig.< init>(ApplicationFi
                  at org.apache.catalina.core.StandardContext.filterSta rt(StandardContext.
                  at org.apache.catalina.core.StandardContext.start(Sta


                  26/10/2010 15:40:34 org.apache.catalina.core.StandardContext start
                  GRAVE: Error filterStart
                  26/10/2010 15:40:34 org.apache.catalina.core.StandardContext start
                  GRAVE: Context [/vote] startup failed due to previous errors
                  26/10/2010 15:40:34 org.apache.coyote.http11.Http11Protocol init
                  INFO: Initializing Coyote HTTP/1.1 on http-8080
                  26/10/2010 15:40:34 org.apache.coyote.http11.Http11Protocol start
                  INFO: Starting Coyote HTTP/1.1 on http-8080


                  I check
                  #Updated at Tue Oct 26 15:36:53 GFT 2010
                  #Tue Oct 26 15:36:53 GFT 2010
                  database.driverClassName=org.firebirdsql.jdbc.FBDr iver

                  test change database.url ( i see much \ / ), with this choises:

                  I not run correctly. I don't test in Linux.
                  Where is the problem, tomcat, Windows or jaybird driver?


                  • #10
                    The problem may be with the tomcat plugin. See this forum entry The Roo vote sample starts OK when deployed to a tomcat server.