Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

JPA error: A JDBC Driver or DataSource class name must be specified in the ConnectionDriverName prop

Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All

I'm trying to use openjpa 1.1 in weblogic ( it comes with weblogic 10) but I keep getting the error:

Caused by: <openjpa-1.1.0-r422266:657916 fatal user error> org.apache.openjpa.persistence.ArgumentException: A JDBC Driver or DataSource class name must be specified in the ConnectionDriverName property.
at org.apache.openjpa.jdbc.schema.DataSourceFactory.newDataSource(
at org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.createConnectionFactory(
at org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.getDBDictionaryInstance(
at org.apache.openjpa.jdbc.meta.MappingRepository.endConfiguration(
at org.apache.openjpa.lib.conf.Configurations.configureInstance(
at org.apache.openjpa.lib.conf.Configurations.configureInstance(
at org.apache.openjpa.lib.conf.PluginValue.instantiate(
at org.apache.openjpa.conf.MetaDataRepositoryValue.instantiate(
at org.apache.openjpa.lib.conf.ObjectValue.instantiate(
at org.apache.openjpa.conf.OpenJPAConfigurationImpl.newMetaDataRepositoryInstance(
at org.apache.openjpa.conf.OpenJPAConfigurationImpl.getMetaDataRepositoryInstance(
at org.apache.openjpa.kernel.AbstractBrokerFactory.makeReadOnly(
at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(
at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(
at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(
at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(
at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(
at com.ets.domain.messagecustom.MessageCustomDao.<init>(

line 22 in MessageCustomDao is:

// MessageCustomJPAPersistenceUnit is defined in the persistence.xml
emf = Persistence.createEntityManagerFactory("MessageCustomJPAPersistenceUnit");
em = emf.createEntityManager(); // LINE 22

my persistence.xml looks like:

<?xml version="1.0"?>
<persistence-unit name="MessageCustomJPAPersistenceUnit"
<property name="openjpa.ConnectionDriverName" value="oracle.jdbc.OracleDriver" />

and the JPADataSource is a tested DataSource targeted to my weblogic server instance and tests green.

can anyone tell me what the problem is - this is my first attempt at using a JPA implemenation? is my persistence.xml incorrect? am i not creating the entity manager factory or entity manager correctly?

Any help would be appreciated.

You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic