Win a copy of Svelte and Sapper in Action this week in the JavaScript 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

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

Posts: 14
  • Mark post as helpful
  • send pies
  • 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.

He was giving me directions and I was powerless to resist. I cannot resist this tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic