openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Piotr Gli┼║niewicz (JIRA) <>
Subject [jira] [Created] (OPENJPA-2023) Meaningless messages when JNDI lookup fails.
Date Tue, 28 Jun 2011 06:42:17 GMT
Meaningless messages when JNDI lookup fails.

                 Key: OPENJPA-2023
             Project: OpenJPA
          Issue Type: Improvement
          Components: kernel
    Affects Versions: 2.0.1
            Reporter: Piotr Gli┼║niewicz

If OpenJPA is configured to get the DataSource from JNDI and the lookup fails it return meaningless

lookupConnectionFactory(String name, String userKey) in org.apache.openjpa.conf.OpenJPAConfigurationImpl
swallows exceptions if a NamingException is thrown during a JNDI lookup.

The effect is, that in createConnectionFactory in org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl,
if a ConnectionFactoryName is provided which causes a NamingException, null is returned from
getConnectionFactory() and it tries to get the DataSource using JDBC configuration data, what
fails, since there aren't any provided. It ends up with a ArgumentException with message:
"A JDBC Driver or DataSource class name must be specified in the ConnectionDriverName property."
which is totally misleading.

Expected: the provider returns information about the failure to retrieve the DataSource from
JNDI. It should silently fall back to using JDBC properties.

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message