openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeremy Bauer (JIRA)" <>
Subject [jira] Created: (OPENJPA-656) Incorrect connection URL causes NPE when using JDBC Driver
Date Thu, 10 Jul 2008 19:06:33 GMT
Incorrect connection URL causes NPE when using JDBC Driver

                 Key: OPENJPA-656
             Project: OpenJPA
          Issue Type: Bug
    Affects Versions: 1.2.0
            Reporter: Jeremy Bauer
            Priority: Minor

If a JDBC URL is specified with an incorrect protocol or subprotocol in combination with a
JDBC Driver class when configuring a PU an NPE is thrown within the OpenJPA code when trying
to create an entity manager.  The NPE bubbles out to a not-so-useful PersistenceException
with internal StoreException containing message text "null".  

For example:  (note the missing colon after the subprotocol)

Results in:

     [java] <openjpa-1.2.0-SNAPSHOT-r422266:667312 nonfatal general error> org.apache.openjpa.persistence.PersistenceException:
There were errors initializing your configuration: <openjpa-1.2.0-SNAPSHOT-r422266:667312
fatal store error> org.apache.openjpa.util.StoreException: null
     [java]     at org.apache.openjpa.jdbc.schema.DataSourceFactory.installDBDictionary(
     [java]     at org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.getConnectionFactory(
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke(
     [java]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(
     [java]     at java.lang.reflect.Method.invoke(
     [java]     at org.apache.openjpa.lib.conf.ConfigurationImpl.instantiateAll(
     [java]     at org.apache.openjpa.conf.OpenJPAConfigurationImpl.instantiateAll(
     [java]     at org.apache.openjpa.kernel.AbstractBrokerFactory.makeReadOnly(
     [java]     at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(
     [java]     at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(
     [java]     at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(
     [java]     at
     [java]     at
     [java]     at suite.r70.base.wasvadd.wsjpa_scripts.wsenhancer.VerifyEnhancementTest.main(
     [java] Caused by: java.lang.NullPointerException
     [java]     at org.apache.openjpa.lib.jdbc.DelegatingConnection.getAutoCommit(

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message