Camel
  1. Camel
  2. CAMEL-4734

Consolidate the database vendors in our unit tests

    Details

    • Type: Task Task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.8.3
    • Fix Version/s: 2.11.0
    • Component/s: None
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      At present, we use HSQL, H2 and Derby in our unit tests (for historically reasons).
      We should consolidate this and go ahead with Derby because of the issues we had with CAMEL-3371 and CAMEL-4726.

        Activity

        Hide
        Christian Müller added a comment -

        Committed r1210085 to switch from HSQL to Derby in camel-spring

        Show
        Christian Müller added a comment - Committed r1210085 to switch from HSQL to Derby in camel-spring
        Hide
        Claus Ibsen added a comment -

        There is also embedded usage of DB in tests/camel-itest
        And as well in tests/camel-itest-osgi
        Maybe they are using HSQLDB as well.

        Show
        Claus Ibsen added a comment - There is also embedded usage of DB in tests/camel-itest And as well in tests/camel-itest-osgi Maybe they are using HSQLDB as well.
        Hide
        Christian Müller added a comment -

        Committed r1226088 to switch from HSQL and H2 to Derby in camel-sql

        Show
        Christian Müller added a comment - Committed r1226088 to switch from HSQL and H2 to Derby in camel-sql
        Hide
        Christian Müller added a comment -

        Committed r1226150 to switch from HSQL to Derby in camel-jdbc

        Show
        Christian Müller added a comment - Committed r1226150 to switch from HSQL to Derby in camel-jdbc
        Hide
        Christian Müller added a comment -

        Committed with revision 1228329 (trunk) and 1228396 (camel-2.9.x branch) to switch from HSQL to Derby in camel-itest

        Show
        Christian Müller added a comment - Committed with revision 1228329 (trunk) and 1228396 (camel-2.9.x branch) to switch from HSQL to Derby in camel-itest
        Hide
        Claus Ibsen added a comment -

        Christian did you get them all fixed now?

        Show
        Claus Ibsen added a comment - Christian did you get them all fixed now?
        Hide
        Christian Müller added a comment -

        There are still places where we use HSQL (we don't have any dependencies to H2):

        • camel-bam:
        • I plan to change the "EclipseLink HSQL profile" to an "EclipseLink Derby profile"
        • I plan to change the "OpenJPA HSQLDB profile" to an "OpenJPA Derby profile"
        • camel-example-bam
        • camel-example-etl
        • I plan to change the "EclipseLink HSQL profile" to an "EclipseLink Derby profile"
        • I plan to change the "OpenJPA HSQLDB profile" to an "OpenJPA Derby profile"
        • I plan to change the "Hibernate HSQLDB profile" to an "Hibernate Derby profile"
        • camel-example-tracer

        I need a bit more time to work on this. Busy days...

        Show
        Christian Müller added a comment - There are still places where we use HSQL (we don't have any dependencies to H2): camel-bam: I plan to change the "EclipseLink HSQL profile" to an "EclipseLink Derby profile" I plan to change the "OpenJPA HSQLDB profile" to an "OpenJPA Derby profile" camel-example-bam camel-example-etl I plan to change the "EclipseLink HSQL profile" to an "EclipseLink Derby profile" I plan to change the "OpenJPA HSQLDB profile" to an "OpenJPA Derby profile" I plan to change the "Hibernate HSQLDB profile" to an "Hibernate Derby profile" camel-example-tracer I need a bit more time to work on this. Busy days...
        Hide
        Claus Ibsen added a comment -

        Any update on this?

        Show
        Claus Ibsen added a comment - Any update on this?
        Hide
        Christian Müller added a comment -

        camel-example-etl and camel-example-tracer still using HSQLDB. I will work on this in the next days, but this is not a blocker for 2.10. Because of this, I will move this issue to 2.11.

        Show
        Christian Müller added a comment - camel-example-etl and camel-example-tracer still using HSQLDB. I will work on this in the next days, but this is not a blocker for 2.10. Because of this, I will move this issue to 2.11.
        Hide
        Christian Müller added a comment -

        If I switch to derby in camel-example-tracer, I got the following exception (this still happens after upgrading to Hibernate 3.6.6-Final).
        I think it's related to HHH-7264 and block this issue (it's not a show stopper for a new release):

        2012-06-03 18:47:08,819 [read #3 - Split] ERROR JDBCExceptionReporter          - Java exception: 'A truncation error was encountered trying to shrink CLOB '<stream-value>' to length 255.: org.apache.derby.iapi.services.io.DerbyIOException'.
        2012-06-03 18:47:08,822 [read #3 - Split] ERROR DefaultTraceEventHandler       - Error processing trace event (original Exchange will continue): Exchange[Message: TraceEventMessage[ID-christian-muellers-macbook-pro-fritz-box-50339-1338742006733-0-4] on node: bean://quoteService?method=quote]
        org.springframework.orm.jpa.JpaSystemException: org.hibernate.exception.GenericJDBCException: could not insert: [org.apache.camel.processor.interceptor.jpa.JpaTraceEventMessage]; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not insert: [org.apache.camel.processor.interceptor.jpa.JpaTraceEventMessage]
        	at org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:321)[spring-orm-3.0.7.RELEASE.jar:3.0.7.RELEASE]
        	at org.springframework.orm.jpa.DefaultJpaDialect.translateExceptionIfPossible(DefaultJpaDialect.java:120)[spring-orm-3.0.7.RELEASE.jar:3.0.7.RELEASE]
        	at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:213)[spring-tx-3.0.7.RELEASE.jar:3.0.7.RELEASE]
        	at org.springframework.orm.jpa.JpaAccessor.translateIfNecessary(JpaAccessor.java:152)[spring-orm-3.0.7.RELEASE.jar:3.0.7.RELEASE]
        	at org.springframework.orm.jpa.JpaTemplate.execute(JpaTemplate.java:188)[spring-orm-3.0.7.RELEASE.jar:3.0.7.RELEASE]
        	at org.springframework.orm.jpa.JpaTemplate.execute(JpaTemplate.java:146)[spring-orm-3.0.7.RELEASE.jar:3.0.7.RELEASE]
        	at org.apache.camel.component.jpa.JpaTemplateTransactionStrategy$1.doInTransaction(JpaTemplateTransactionStrategy.java:80)[camel-jpa-2.10-SNAPSHOT.jar:2.10-SNAPSHOT]
        	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)[spring-tx-3.0.7.RELEASE.jar:3.0.7.RELEASE]
        	at org.apache.camel.component.jpa.JpaTemplateTransactionStrategy.execute(JpaTemplateTransactionStrategy.java:78)[camel-jpa-2.10-SNAPSHOT.jar:2.10-SNAPSHOT]
        	at org.apache.camel.component.jpa.JpaProducer.process(JpaProducer.java:50)[camel-jpa-2.10-SNAPSHOT.jar:2.10-SNAPSHOT]
        	at org.apache.camel.processor.interceptor.DefaultTraceEventHandler.traceExchange(DefaultTraceEventHandler.java:117)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT]
        	at org.apache.camel.processor.interceptor.TraceInterceptor.traceExchange(TraceInterceptor.java:291)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT]
        	at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:151)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT]
        	at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT]
        	at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:333)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT]
        	at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:223)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT]
        	at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT]
        	at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT]
        	at org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:303)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT]
        	at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT]
        	at org.apache.camel.processor.Pipeline.process(Pipeline.java:117)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT]
        	at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT]
        	at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT]
        	at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:333)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT]
        	at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:223)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT]
        	at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT]
        	at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT]
        	at org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT]
        	at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT]
        	at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:99)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT]
        	at org.apache.camel.processor.MulticastProcessor.doProcessParallel(MulticastProcessor.java:715)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT]
        	at org.apache.camel.processor.MulticastProcessor.access$200(MulticastProcessor.java:80)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT]
        	at org.apache.camel.processor.MulticastProcessor$1.call(MulticastProcessor.java:297)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT]
        	at org.apache.camel.processor.MulticastProcessor$1.call(MulticastProcessor.java:282)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT]
        	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_31]
        	at java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_31]
        	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_31]
        	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_31]
        	at java.lang.Thread.run(Thread.java:680)[:1.6.0_31]
        
        Show
        Christian Müller added a comment - If I switch to derby in camel-example-tracer, I got the following exception (this still happens after upgrading to Hibernate 3.6.6-Final). I think it's related to HHH-7264 and block this issue (it's not a show stopper for a new release): 2012-06-03 18:47:08,819 [read #3 - Split] ERROR JDBCExceptionReporter - Java exception: 'A truncation error was encountered trying to shrink CLOB '<stream-value>' to length 255.: org.apache.derby.iapi.services.io.DerbyIOException'. 2012-06-03 18:47:08,822 [read #3 - Split] ERROR DefaultTraceEventHandler - Error processing trace event (original Exchange will continue ): Exchange[Message: TraceEventMessage[ID-christian-muellers-macbook-pro-fritz-box-50339-1338742006733-0-4] on node: bean: //quoteService?method=quote] org.springframework.orm.jpa.JpaSystemException: org.hibernate.exception.GenericJDBCException: could not insert: [org.apache.camel.processor.interceptor.jpa.JpaTraceEventMessage]; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not insert: [org.apache.camel.processor.interceptor.jpa.JpaTraceEventMessage] at org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:321)[spring-orm-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.orm.jpa.DefaultJpaDialect.translateExceptionIfPossible(DefaultJpaDialect.java:120)[spring-orm-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:213)[spring-tx-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.orm.jpa.JpaAccessor.translateIfNecessary(JpaAccessor.java:152)[spring-orm-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.orm.jpa.JpaTemplate.execute(JpaTemplate.java:188)[spring-orm-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.orm.jpa.JpaTemplate.execute(JpaTemplate.java:146)[spring-orm-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.apache.camel.component.jpa.JpaTemplateTransactionStrategy$1.doInTransaction(JpaTemplateTransactionStrategy.java:80)[camel-jpa-2.10-SNAPSHOT.jar:2.10-SNAPSHOT] at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)[spring-tx-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.apache.camel.component.jpa.JpaTemplateTransactionStrategy.execute(JpaTemplateTransactionStrategy.java:78)[camel-jpa-2.10-SNAPSHOT.jar:2.10-SNAPSHOT] at org.apache.camel.component.jpa.JpaProducer.process(JpaProducer.java:50)[camel-jpa-2.10-SNAPSHOT.jar:2.10-SNAPSHOT] at org.apache.camel.processor.interceptor.DefaultTraceEventHandler.traceExchange(DefaultTraceEventHandler.java:117)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT] at org.apache.camel.processor.interceptor.TraceInterceptor.traceExchange(TraceInterceptor.java:291)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT] at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:151)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT] at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT] at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:333)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT] at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:223)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT] at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT] at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT] at org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:303)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT] at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT] at org.apache.camel.processor.Pipeline.process(Pipeline.java:117)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT] at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT] at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT] at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:333)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT] at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:223)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT] at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT] at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT] at org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT] at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT] at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:99)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT] at org.apache.camel.processor.MulticastProcessor.doProcessParallel(MulticastProcessor.java:715)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT] at org.apache.camel.processor.MulticastProcessor.access$200(MulticastProcessor.java:80)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT] at org.apache.camel.processor.MulticastProcessor$1.call(MulticastProcessor.java:297)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT] at org.apache.camel.processor.MulticastProcessor$1.call(MulticastProcessor.java:282)[camel-core-2.10-SNAPSHOT.jar:2.10-SNAPSHOT] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_31] at java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_31] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_31] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_31] at java.lang. Thread .run( Thread .java:680)[:1.6.0_31]
        Hide
        Christian Müller added a comment -

        camel-example-tracer is the last module which use a different database than HSQLDB.

        Show
        Christian Müller added a comment - camel-example-tracer is the last module which use a different database than HSQLDB.
        Hide
        Claus Ibsen added a comment -

        So you almost got them all now?

        Show
        Claus Ibsen added a comment - So you almost got them all now?
        Hide
        Christian Müller added a comment -

        From now, we only use Derby as database in our unit tests...

        Show
        Christian Müller added a comment - From now, we only use Derby as database in our unit tests...

          People

          • Assignee:
            Christian Müller
            Reporter:
            Christian Müller
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development