Hi

I am trying to execute the ETL example shipped with Camel 2.10.1. I executed
the derby default configuration and it worked fine. However while changing
the database to mysql, I get the below error.
[mel.example.etl.CustomerEntity] ultPollingConsumerPollStrategy WARN 
Consumer
Consumer[jpa://org.apache.camel.example.etl.CustomerEntity?consumeDelete=false&consumeLockEntity=false&delay=3000]
could not poll endpoint:
Endpoint[jpa://org.apache.camel.example.etl.CustomerEntity?consumeDelete=false&consumeLockEntity=false&delay=3000]
caused by: Could not open JPA EntityManager for transaction; nested
exception is <openjpa-2.2.0-r422266:1244990 nonfatal general error>
org.apache.openjpa.persistence.PersistenceException: There were errors
initializing your configuration: <openjpa-2.2.0-r422266:1244990 fatal user
error> org.apache.openjpa.util.UserException: A connection could not be
obtained for driver class "com.mysql.jdbc.Driver" and URL
"jdbc:mysql://127.0.0.1:3306/test;create=false".  You may have specified an
invalid URL.

I have the mysql jar in the classpath. I am able to connect to the test
database via a standalone java program. 

Following is the entry from persistence.xml.

                <properties>
                        <property name="javax.persistence.jdbc.driver"
value="com.mysql.jdbc.Driver" />
                        <property name="javax.persistence.jdbc.url"
value="jdbc:mysql://127.0.0.1:3306/test;create=false" />
                        <property name="javax.persistence.jdbc.user" 
value="root" />
                        <property name="javax.persistence.jdbc.password" 
value="root" />
            
                        <property name="eclipselink.ddl-generation"
value="drop-and-create-tables" />
                        <property name="eclipselink.ddl-generation.output-mode" 
value="database"
/>
                        
                        
                        
                </properties>

I had changed the following in the camel-context.xml as shown below

        
        <bean id="jpaAdapter"
class="org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter">
            <property name="databasePlatform"
value="org.apache.openjpa.jdbc.sql.MySQLDictionary" />
            <property name="database" value="MYSQL"/>
        </bean>

Can someone please point me to what I am doing wrong here?





--
View this message in context: 
http://camel.465427.n5.nabble.com/Errors-when-executing-ETL-Example-Changed-derby-datasource-to-mysql-tp5720985.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to