Dependencias de Firebird, Jaybird e Hibernate

I was interested to see the performance of Firebird with Hibernate, but I can not manage to make it run correctly. I added to my pom.xml:


When running it I keep getting:

java.lang.ClassNotFoundException: javax.resource.ResourceException

I tried adding all kinds of javax, javaee and others dependencies (via Maven), but I can't manage to run it. With PostgreSQL I have no issues and everything works as it is supposed to.

Running on Apache Tomcat 7.0.26.

preguntado el 10 de marzo de 12 a las 13:03

Is there a reason you are not using the standard pom entry for Jaybird? -

2 Respuestas

The 'problem' is that Jaybird internally depends on the JavaEE concept of a resource-adapter and therefor requires some classes from JavaEE (specifically one that includes the javax.resource package (and subpackages). You need to include a JavaEE jar, or use


This one should automatically download the required dependency.

If all else fails, download the distribution from and use the connector-api-1.5.jar from the lib folder.

BTW: I hope to eliminate this dependency in Jaybird 5.

Descargo de responsabilidad: soy uno de los desarrolladores de Jaybird

Respondido 06 Feb 19, 08:02

@Vojtěch Did you try using the dependency in my answer, did it work? - Marcos Rotteveel

No, it did not make any difference, I had to add the jar manually. - Vojtech

@Vojtěch That is weird, I created to investigate that further. - Marcos Rotteveel

@Vojtěch Actually, I think I found the cause: Last, any JAR file that contains Servlet API classes will be explicitly ignored by the classloader The geronimo dependency that is used for maven instead of that mini-j2ee.jar also contains javax.servlet and is therefor entirely ignored. - Marcos Rotteveel

@Vojtěch Just as a follow up: using the jaybird 2.1.6 in my post and excluding the geronimo dependency and including groupID: javax.resource, artifactId: connector-api, version: 1.5 as dependency also works - Marcos Rotteveel

We'll i was able to figure this out:

  1. you can use hibernate's own connection pool
  2. you can use commons-dbcp connection pool
  3. you can use new tomcat7's jdbc connection pool.

Assuming you want to use 3, there are few steps you must perform, if you use firebird

  1. Download jdk from :

  2. Extract archive, copy jaybird*.jar and connector-api*.jar to /usr/share/tomcat7/lib. Inside the connector-api jar, there is the missing class ResourceException.

WARNING: do not copy huge j2eeapi.jar instead, beacuse they contain offending classes to servlet-api.jar from tomcat

  1. If you installed tomcat7 from tar, that's all. If you use ubuntu apt to install tomcat's package, then download original tar from tomcat's download side, extract it and copy tomcat-jdbc to wherever is you tomcat's lib folder (for ubuntu, that is /usr/share/tomcat7/lib)

That's all. Put the configuration into context.xml and that's all

    validationQuery="SELECT 'NOW' from RDB$DATABASE"

Respondido el 06 de Septiembre de 12 a las 12:09

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.