camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dermoritz <>
Subject camel-jpa “no transaction is in progress”
Date Tue, 20 Sep 2016 05:54:44 GMT
i am trying to write an entity to database with camel jpa component. The
problem is that i get

    javax.persistence.TransactionRequiredException: no transaction is in
    	at org.hibernate.internal.SessionImpl.doFlush(
    	at org.hibernate.internal.SessionImpl.flush(

The persistent unit is parsed fin and the table is created. Here ist

I created a test to write one entity:


Since there is no real way to start and end a transaction in camel semantic
i think the problem is related to setup?

I also tried to add ``.transacted()`` to the route. This yields ``No bean
could be found in the registry of type: PlatformTransactionManager``
Then i added this line to setup method:

and this again yields ``javax.persistence.TransactionRequiredException: no
transaction is in progress``.

i am not sure what to configure on JpaComponent and what to bind into the

I also debugged a bit. I checked the fields in JpaProducer where
``entityManager.flush()`` is throwing the exception:
trasactionTemplate is set "PRPAGATION_REQUIRED,ISOLATION_DEFAULT" with
correct JpaTransactionManager.

So how to get JPA-component working?

(my code is based on this:
and i also posted the question here:

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message