geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cumbers <>
Subject Geronimo with openjpa (and DataSource lookups)
Date Thu, 26 Nov 2009 17:44:54 GMT

I am looking for someone to put me out of my geronimo/openpa misery.

I have an application that I can deploy to Geronimo ( that uses
openjpa where the properties inside the persistence.xml are explicitly
defined like so:

        <property name="openjpa.ConnectionDriverName"
        <property name="openjpa.ConnectionURL"
        <property name="openjpa.ConnectionUserName"
        <property name="openjpa.ConnectionPassword"

However this app is going to be deployed by lots of users, and ideally I
would like to ship a war file, and direct users to create a JNDI object that
they define and then openjpa uses this.

Simply defining the JNDI datasource connection within Geronimo, and using
the reference in the <jta-data-source>jdbc/db</jta-data-source> or
<non-jta-data-source>jdbc/db</non-jta-data-source> does not appear to work,
and I get the following error message when I try and create an

"<openjpa-1.2.1-r2180:4612 fatal user error>
org.apache.openjpa.persistence.ArgumentException: A JDBC Driver or
DataSource class name must be specified in the ConnectionDriverName

After 3 days on google, I found this page:
which suggests that:

"Although many other servers use jndi to define the meaning of the
jta-data-source and non-jta-data-source geronimo does not. These are not
jndi names in any way but must match the name specified in the connector

OK so using the jndi object name directly does not seem to be supported.
However the name in the resourceadapter of the plan.xml IS "jdbc/db" and so
I think this should work. Here is the relevant snippet from my plan.xml as
created when I define a JDBC datasource using Geronimo.


I have run out of ideas on how I can make this work, and would be massively
appreciative if anyone can shed some light on why this is not working. If
you think you need more information please let me know!


View this message in context:
Sent from the Apache Geronimo - Users mailing list archive at

View raw message