camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Errors when executing ETL Example. Changed derby datasource to mysql
Date Sat, 13 Oct 2012 09:38:43 GMT
On Sat, Oct 13, 2012 at 6:33 AM, dbboon99 <ksubramanian@liquidhub.com> wrote:
> 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.
>

The error above tells you its the jdbc uri you have configured above is invalid.
You would need to check the mysql documentation how to setup this.


> 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.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
View raw message