I am persisting data into SQL Server using openJPA in camel route.
I have defined my configuration in persistence.xml as below

        <persistence-unit name="camel" transaction-type="RESOURCE_LOCAL">
        
<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
                <properties>
                <property name="openjpa.ConnectionURL"
value="jdbc:sqlserver://10.10.10.156:1433;databaseName=XYZ;instanceName=SQLEXPRESS;"/>
                <property name="openjpa.jdbc.DBDictionary"
value="org.apache.openjpa.jdbc.sql.SQLServerDictionary"/>
                <property name="openjpa.ConnectionDriverName"
value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
                <property name="openjpa.ConnectionUserName" value="user1"/>
                <property name="openjpa.ConnectionPassword" value="test123"/>
                <property name="openjpa.Log" value="Enhance=TRACE,SQL=TRACE"/> 
                <property name="openjpa.jdbc.SynchronizeMappings" value="true"/>
                </properties>
        </persistence-unit>

I am putting this persistence.xml inside META-INF folder and bundling it
into one JAR file.

I am putting my camel-cotext.xml directly into deploy folder of ServiceMix
(it is not part of JAR file). In my camel-context.xml, I am refering this
persistence-unit.
But when I am trying to persist data, I am getting following error

Could not open JPA EntityManager for transaction; nested exception is
&lt;openjpa-2.2.0-r422266:1244990 fatal user error>
org.apache.openjpa.persistence.ArgumentException: A JDBC Driver or
DataSource class name must be specified in the ConnectionDriverName
property. Available properties in configuration are
"org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl@b4699c27"

Can someone help me on this.

Thanks & regards,
Abhi



--
View this message in context: 
http://camel.465427.n5.nabble.com/Issue-with-persisting-data-using-openJPA-tp5734379.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to