Hi,

I recently discovered that the JPA consumer only logs WARN when failing to 
populate an entity class (in my specific case, an exception occurred since an 
unexpected null couldn’t be mapped to an int).

If I understand it correctly, the JPA consumer uses a LoggingExceptionHandler. 
Is there a simple way of configuring it to log exceptions as ERROR instead of 
WARN as default?

I use Camel 3.4 and my route is configured in a Java class which extends 
EndpointRouteBuilder:
from(jpa(MyEntity.class.getName())
    .consumeDelete(false)
    .query(QUERY)
    .delay(300000))
    .transacted()
    // …

Some JPA component configuration is also made in jboss-camel-context.xml:
<bean id="jpa" class="org.apache.camel.component.jpa.JpaComponent">
    <property name="entityManagerFactory" ref="entityManagerFactory" />
    <property name="transactionManager" ref="txManager" />
</bean>

Regards,
Calle

Reply via email to