You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Manoranjitham G <ma...@polarisft.com> on 2014/11/28 10:40:37 UTC

Exception: A Java Database Connectivity (JDBC) driver or data source class name must be specified in the openjpa.ConnectionDriverName or javax.persistence.jdbc.driver property.

Hi All,
   I am doing a POC in apache camel to pick data from a file and save it in
database
consumer- file
producer - jpa - when executing the program am getting the below exception

*"org.apache.openjpa.persistence.ArgumentException: The persistence provider
is attempting to use properties in the persistence.xml file to resolve the
data source. A Java Database Connectivity (JDBC) driver or data source class
name must be specified in the openjpa.ConnectionDriverName or
javax.persistence.jdbc.driver property. The following properties are
available in the configuration:
"org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl@442ce698". *

this is my persistence.xml:

<?xml version="1.0" encoding="UTF-8"?>

<persistence xmlns="http://java.sun.com/xml/ns/persistence"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">

	<persistence-unit name="camel" transaction-type="RESOURCE_LOCAL">
	
<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>		
		<class>com.polaris.sample.CustomerEntity</class>
		<properties>
			<property name="openjpa.ConnectionURL"
value="jdbc:oracle:thin:@localhost:1521:xe" />
			<property name="openjpa.ConnectionDriverName"
value="oracle.jdbc.driver.OracleDriver" />


			<property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema" />
			<property name="openjpa.ConnectionUserName" value="integ"/> 
				<property name="openjpa.ConnectionPassword" value="integ"/> 
			<property name="openjpa.MetaDataRepository" value="Preload=true" />
			<property name="openjpa.Log"
				value="DefaultLevel=INFO, Runtime=TRACE, Tool=INFO, SQL=TRACE" />


		</properties>
	</persistence-unit>
</persistence>



Kindly assist me to get resolved from this error.
Thanks in advance



--
View this message in context: http://camel.465427.n5.nabble.com/Exception-A-Java-Database-Connectivity-JDBC-driver-or-data-source-class-name-must-be-specified-in-th-tp5759754.html
Sent from the Camel - Users mailing list archive at Nabble.com.