-
Oct 18th, 2010, 08:45 AM
#1
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 database.properties
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?
Thanks
-
Oct 21st, 2010, 10:21 AM
#2
I send more information, there are the changes made in configuration files:
I add dependency in pom.xml:
<dependency>
<groupId>org.firebirdsql.jdbc</groupId>
<artifactId>jaybird</artifactId>
<version>2.1.6</version>
</dependency>
This dependency is correctly added en WEB-INF/lib
I add this lines in database.properties:
database.password=masterkey
database.url=jdbc:firebirdsql://localhost:3050/c:\bde\fuse.fdb
database.username=sysdba
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
java.lang.ClassCastException: org.springframework.orm.jpa.support.OpenEntityMana
gerInViewFilter cannot be cast to javax.servlet.Filter
at org.apache.catalina.core.ApplicationFilterConfig.g etFilter(Applicatio
nFilterConfig.java:275)
at org.apache.catalina.core.ApplicationFilterConfig.s etFilterDef(Applica
tionFilterConfig.java:422)
--------------------------------------------------------
someone could get it to work spring roo with firebird database?
-
Oct 21st, 2010, 08:16 PM
#3
Please log a Jira request for this. Is the jar available in maven central?
-
Oct 22nd, 2010, 08:46 AM
#4
Thanks, yes this lib org.firebirdsql.jdbc.jaybird is it in the maven central:
http://repo1.maven.org/maven2/org/fi.../jdbc/jaybird/
version 2.1.6
I newby, i try log in jira
-
Oct 25th, 2010, 01:10 PM
#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] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[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
--------------------------------------------------------------------------
C:\msysgit\msysgit\git\roo\wrapping>dir
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
C:\msysgit\msysgit\git\roo\wrapping>
I have a git pull. is lastest version, but don't have a firebird dir.
Thanks
-
Oct 25th, 2010, 03:14 PM
#6
It got left out in the last Git commit. Added now. Please try again.
-
Oct 26th, 2010, 09:00 AM
#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.
RELEASE\org.springframework.roo.root-1.1.1.RELEASE.pom
[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\org.springframework.ro
o.root-1.1.1.RELEASE.pom.asc
[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
ultLifecycleExecutor.java:719)
at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:556)
at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.executeGoal(Defau
ltLifecycleExecutor.java:535)
at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.execute(DefaultLi
fecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMav en.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven .java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:3 62)
at org.apache.maven.cli.compat.CompatibleMain.main(Co mpatibleMain.java:6
0)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(L auncher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher. java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode (Launcher.java:430)
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
5'.
at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.j ava:283)
at org.apache.maven.plugin.DefaultPluginManager.execu teMojo(DefaultPlugi
nManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.executeGoals(Defa
ultLifecycleExecutor.java:694)
... 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] ------------------------------------------------------------------------
C:\msysgit\msysgit\roo>
Thans for any help.
-
Oct 26th, 2010, 10:34 AM
#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.
Thanks
-
Oct 26th, 2010, 02:03 PM
#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
java.lang.ClassCastException: org.springframework.orm.jpa.support.OpenEntityMana
gerInViewFilter cannot be cast to javax.servlet.Filter
at org.apache.catalina.core.ApplicationFilterConfig.g etFilter(Applicatio
nFilterConfig.java:275)
at org.apache.catalina.core.ApplicationFilterConfig.s etFilterDef(Applica
tionFilterConfig.java:422)
at org.apache.catalina.core.ApplicationFilterConfig.< init>(ApplicationFi
lterConfig.java:115)
at org.apache.catalina.core.StandardContext.filterSta rt(StandardContext.
java:3838)
at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4
488)
...
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 database.properties
#Updated at Tue Oct 26 15:36:53 GFT 2010
#Tue Oct 26 15:36:53 GFT 2010
database.password=sysdba
database.url=jdbc\:firebirdsql\://localhost\:3050//c\:\\bde\\fuse.fdb
database.username=masterkey
database.driverClassName=org.firebirdsql.jdbc.FBDr iver
test change database.url ( i see much \ / ), with this choises:
database.url=jdbc:firebirdsql://localhost:3050/c:\bde\fuse.fdb
database.url=jdbc:firebirdsql://localhost:3050/c:\\bde\\fuse.fdb
database.url=jdbc:firebirdsql:localhost/3050:c:\bde\fuse.fdb
database.url=jdbc:firebirdsql:localhost/3050:c:\\bde\\fuse.fdb
I not run correctly. I don't test in Linux.
Where is the problem, tomcat, Windows or jaybird driver?
Thanks
-
Oct 26th, 2010, 04:15 PM
#10
The problem may be with the tomcat plugin. See this forum entry http://forum.springsource.org/showthread.php?t=89883. The Roo vote sample starts OK when deployed to a tomcat server.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules