openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jody Grassel (Assigned) (JIRA)" <>
Subject [jira] [Assigned] (OPENJPA-2023) Meaningless messages when JNDI lookup fails.
Date Mon, 03 Oct 2011 20:37:36 GMT


Jody Grassel reassigned OPENJPA-2023:

    Assignee: Jody Grassel
> Meaningless messages when JNDI lookup fails.
> --------------------------------------------
>                 Key: OPENJPA-2023
>                 URL:
>             Project: OpenJPA
>          Issue Type: Improvement
>          Components: kernel
>    Affects Versions: 2.0.1
>            Reporter: Piotr Gli┼║niewicz
>            Assignee: Jody Grassel
> If OpenJPA is configured to get the DataSource from JNDI and the lookup fails it return
meaningless messages.
> 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 shouldn't silently fall back to using JDBC properties.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message