2022-04-03 13:51:05.343 INFO 14190 --- [rce-coordinator] .d.r.RelationalSnapshotChangeEventSource : Snapshot step 3 - Locking captured tables [dbo.Users]
2022-04-03 13:51:05.343 INFO 14190 --- [rce-coordinator] d.c.s.SqlServerSnapshotChangeEventSource : Setting locking timeout to 10 s
2022-04-03 13:51:05.344 DEBUG 14190 --- [rce-coordinator] c.m.s.jdbc.internals.SQLServerStatement : SQLServerStatement:3 created by (ConnectionID:2 ClientConnectionId: 4c2ec870-bbb3-4770-b4de-d72207e50092)
2022-04-03 13:51:05.344 TRACE 14190 --- [rce-coordinator] io.debezium.jdbc.JdbcConnection : executing 'SET LOCK_TIMEOUT 10000'
2022-04-03 13:51:05.344 DEBUG 14190 --- [rce-coordinator] c.m.s.jdbc.internals.SQLServerStatement : SQLServerStatement:3 Executing (not server cursor) SET LOCK_TIMEOUT 10000
2022-04-03 13:51:05.350 INFO 14190 --- [rce-coordinator] d.c.s.SqlServerSnapshotChangeEventSource : Executing schema locking
2022-04-03 13:51:05.350 DEBUG 14190 --- [rce-coordinator] c.m.s.jdbc.internals.SQLServerStatement : SQLServerStatement:4 created by (ConnectionID:2 ClientConnectionId: 4c2ec870-bbb3-4770-b4de-d72207e50092)
2022-04-03 13:51:05.352 WARN 14190 --- [rce-coordinator] .d.p.s.AbstractSnapshotChangeEventSource : Snapshot was interrupted before completion
2022-04-03 13:51:05.352 INFO 14190 --- [rce-coordinator] .d.p.s.AbstractSnapshotChangeEventSource : Snapshot - Final stage
2022-04-03 13:51:05.353 INFO 14190 --- [rce-coordinator] d.c.s.SqlServerSnapshotChangeEventSource : Removing locking timeout
2022-04-03 13:51:05.353 DEBUG 14190 --- [rce-coordinator] c.m.s.jdbc.internals.SQLServerStatement : SQLServerStatement:5 created by (ConnectionID:2 ClientConnectionId: 4c2ec870-bbb3-4770-b4de-d72207e50092)
2022-04-03 13:51:05.353 TRACE 14190 --- [rce-coordinator] io.debezium.jdbc.JdbcConnection : executing 'SET LOCK_TIMEOUT -1'
2022-04-03 13:51:05.353 DEBUG 14190 --- [rce-coordinator] c.m.s.jdbc.internals.SQLServerStatement : SQLServerStatement:5 Executing (not server cursor) SET LOCK_TIMEOUT -1
2022-04-03 13:51:05.356 WARN 14190 --- [rce-coordinator] i.d.p.ChangeEventSourceCoordinator : Change event source executor was interrupted
java.lang.InterruptedException: Interrupted while locking table dbo.Users
at io.debezium.connector.sqlserver.SqlServerSnapshotChangeEventSource.lockTablesForSchemaSnapshot(SqlServerSnapshotChangeEventSource.java:135) ~[debezium-connector-sqlserver-1.8.1.Final.jar!/:1.8.1.Final]
at io.debezium.relational.RelationalSnapshotChangeEventSource.doExecute(RelationalSnapshotChangeEventSource.java:106) ~[debezium-core-1.8.1.Final.jar!/:1.8.1.Final]
at io.debezium.pipeline.source.AbstractSnapshotChangeEventSource.execute(AbstractSnapshotChangeEventSource.java:76) ~[debezium-core-1.8.1.Final.jar!/:1.8.1.Final]
at io.debezium.pipeline.ChangeEventSourceCoordinator.doSnapshot(ChangeEventSourceCoordinator.java:153) ~[debezium-core-1.8.1.Final.jar!/:1.8.1.Final]
at io.debezium.connector.sqlserver.SqlServerChangeEventSourceCoordinator.executeChangeEventSources(SqlServerChangeEventSourceCoordinator.java:69) ~[debezium-connector-sqlserver-1.8.1.Final.jar!/:1.8.1.Final]
anyone had this issue? I got this during application startup. I assume it's a missing configuration on the database. but when i ran profiler, i dont errors. Is it suggesting debezium cannot obtain a lock?
Check if there be some code after submitting the engine to an ExecutorService. For example,
// Run the engine asynchronously ...
ExecutorService executor = Executors.newSingleThreadExecutor();
executor.execute(engine);
// Do something else or wait for a signal or an event
// YOU CAN WAITING FOREVER
while (!executor.awaitTermination(10, TimeUnit.SECONDS)) {
}
Related
I have this error while I have added addtional enity called User. When I run this program without the User classes its working fine. I am trying to add a logging to the app. I thibk this is a problem with H2Dialect. Can anyone help please ?
2022-11-04 17:25:46.838 INFO 23000 --- [ main] com.ag.chateer.ChateerApplication : Starting ChateerApplication using Java 17.0.2 on STORM936 with PID 23000 (E:\new-projects-2022-2023\chateer-app-react-spring\chateer-app-spring\target\classes started by Arek in E:\new-projects-2022-2023\chateer-app-react-spring\chateer-app-spring)
2022-11-04 17:25:46.840 INFO 23000 --- [ main] com.ag.chateer.ChateerApplication : No active profile set, falling back to 1 default profile: "default"
2022-11-04 17:25:47.450 INFO 23000 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2022-11-04 17:25:47.512 INFO 23000 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 51 ms. Found 2 JPA repository interfaces.
2022-11-04 17:25:48.160 INFO 23000 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2022-11-04 17:25:48.171 INFO 23000 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2022-11-04 17:25:48.172 INFO 23000 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.65]
2022-11-04 17:25:48.285 INFO 23000 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2022-11-04 17:25:48.286 INFO 23000 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1393 ms
2022-11-04 17:25:48.323 INFO 23000 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2022-11-04 17:25:48.578 INFO 23000 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2022-11-04 17:25:48.589 INFO 23000 --- [ main] o.s.b.a.h2.H2ConsoleAutoConfiguration : H2 console available at '/h2-console'. Database available at 'jdbc:h2:file:./chateer'
2022-11-04 17:25:48.822 INFO 23000 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
2022-11-04 17:25:48.875 INFO 23000 --- [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.6.10.Final
2022-11-04 17:25:49.031 INFO 23000 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
2022-11-04 17:25:49.137 INFO 23000 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
2022-11-04 17:25:49.683 WARN 23000 --- [ main] o.h.t.s.i.ExceptionHandlerLoggedImpl : GenerationTarget encountered exception accepting command : Error executing DDL "
create table user (
id integer generated by default as identity,
email varchar(255),
password varchar(255),
username varchar(255),
primary key (id)
)" via JDBC Statement
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "
create table user (
id integer generated by default as identity,
email varchar(255),
password varchar(255),
username varchar(255),
primary key (id)
)" via JDBC Statement
at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:67) ~[hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.applySqlString(AbstractSchemaMigrator.java:581) ~[hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.applySqlStrings(AbstractSchemaMigrator.java:526) ~[hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.createTable(AbstractSchemaMigrator.java:293) ~[hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.tool.schema.internal.GroupedSchemaMigratorImpl.performTablesMigration(GroupedSchemaMigratorImpl.java:74) ~[hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.performMigration(AbstractSchemaMigrator.java:220) ~[hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.doMigration(AbstractSchemaMigrator.java:123) ~[hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:196) ~[hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:85) ~[hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:335) ~[hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:471) ~[hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1498) ~[hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:58) ~[spring-orm-5.3.22.jar:5.3.22]
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:365) ~[spring-orm-5.3.22.jar:5.3.22]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409) ~[spring-orm-5.3.22.jar:5.3.22]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396) ~[spring-orm-5.3.22.jar:5.3.22]
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:341) ~[spring-orm-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1863) ~[spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800) ~[spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) ~[spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.22.jar:5.3.22]
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1154) ~[spring-context-5.3.22.jar:5.3.22]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:908) ~[spring-context-5.3.22.jar:5.3.22]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.22.jar:5.3.22]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147) ~[spring-boot-2.7.3.jar:2.7.3]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:734) ~[spring-boot-2.7.3.jar:2.7.3]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408) ~[spring-boot-2.7.3.jar:2.7.3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) ~[spring-boot-2.7.3.jar:2.7.3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306) ~[spring-boot-2.7.3.jar:2.7.3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295) ~[spring-boot-2.7.3.jar:2.7.3]
at com.ag.chateer.ChateerApplication.main(ChateerApplication.java:11) ~[classes/:na]
Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL statement "\000d\000a create table [*]user (\000d\000a id integer generated by default as identity,\000d\000a email varchar(255),\000d\000a password varchar(255),\000d\000a username varchar(255),\000d\000a primary key (id)\000d\000a )"; expected "identifier"; SQL statement:
create table user (
id integer generated by default as identity,
email varchar(255),
password varchar(255),
username varchar(255),
primary key (id)
) [42001-214]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:502) ~[h2-2.1.214.jar:2.1.214]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:477) ~[h2-2.1.214.jar:2.1.214]
at org.h2.message.DbException.getSyntaxError(DbException.java:261) ~[h2-2.1.214.jar:2.1.214]
at org.h2.command.Parser.readIdentifier(Parser.java:5656) ~[h2-2.1.214.jar:2.1.214]
at org.h2.command.Parser.readIdentifierWithSchema(Parser.java:5616) ~[h2-2.1.214.jar:2.1.214]
at org.h2.command.Parser.readIdentifierWithSchema(Parser.java:5645) ~[h2-2.1.214.jar:2.1.214]
at org.h2.command.Parser.parseCreateTable(Parser.java:9253) ~[h2-2.1.214.jar:2.1.214]
at org.h2.command.Parser.parseCreate(Parser.java:6784) ~[h2-2.1.214.jar:2.1.214]
at org.h2.command.Parser.parsePrepared(Parser.java:763) ~[h2-2.1.214.jar:2.1.214]
at org.h2.command.Parser.parse(Parser.java:689) ~[h2-2.1.214.jar:2.1.214]
at org.h2.command.Parser.parse(Parser.java:661) ~[h2-2.1.214.jar:2.1.214]
at org.h2.command.Parser.prepareCommand(Parser.java:569) ~[h2-2.1.214.jar:2.1.214]
at org.h2.engine.SessionLocal.prepareLocal(SessionLocal.java:631) ~[h2-2.1.214.jar:2.1.214]
at org.h2.engine.SessionLocal.prepareCommand(SessionLocal.java:554) ~[h2-2.1.214.jar:2.1.214]
at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1116) ~[h2-2.1.214.jar:2.1.214]
at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:237) ~[h2-2.1.214.jar:2.1.214]
at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:223) ~[h2-2.1.214.jar:2.1.214]
at com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:94) ~[HikariCP-4.0.3.jar:na]
at com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java) ~[HikariCP-4.0.3.jar:na]
at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:54) ~[hibernate-core-5.6.10.Final.jar:5.6.10.F.432)
2022-11-04 17:25:50.531 INFO 23000 --- [ main] c.c.socketio.SocketIOServer : Session store / pubsub factory used: MemoryStoreFactory (local session store only)
2022-11-04 17:25:50.823 INFO 23000 --- [ntLoopGroup-2-1] c.c.socketio.SocketIOServer : SocketIO server started at port: 8085
When I run this program without User, User Service and User Repo works fine.
enter image description hereI'm learning to use taos JDBC in myBatis project, and when I using the demo provide by TDengine. I met this problem unable to establish connection.
sql:insert into db1.t1(ts,temperature) values (now,23.23)
The exception was thrown while calling on execute this sql command.
I tried to run the sql in command line on the server , it is ok.
while ran on my windows client it failed.
Running env
server: TDengine 2.1.3.2 on ubuntu 18.4
client: window x64
taos-jdbcdriver:2.0.32
loginfo
2021-07-22 16:00:48.116 DEBUG 16276 --- [ main] c.t.e.m.m.T.dropSuperTable : ==> Preparing: drop table if exists temperature
2021-07-22 16:00:48.130 DEBUG 16276 --- [ main] c.t.e.m.m.T.dropSuperTable : ==> Parameters:
2021-07-22 16:00:48.139 DEBUG 16276 --- [ main] c.t.e.m.m.T.dropSuperTable : <== Updates: 0
2021-07-22 16:00:48.140 DEBUG 16276 --- [ main] c.t.e.m.m.T.createSuperTable : ==> Preparing: CREATE TABLE if not exists temperature(ts timestamp, temperature float) tags(location nchar(64), tbIndex int)
2021-07-22 16:00:48.141 DEBUG 16276 --- [ main] c.t.e.m.m.T.createSuperTable : ==> Parameters:
2021-07-22 16:00:48.161 DEBUG 16276 --- [ main] c.t.e.m.m.T.createSuperTable : <== Updates: 0
2021-07-22 16:00:48.163 DEBUG 16276 --- [ main] c.t.e.m.m.TemperatureMapper.createTable : ==> Preparing: create table ? using temperature tags( ?, ?)
2021-07-22 16:00:48.164 DEBUG 16276 --- [ main] c.t.e.m.m.TemperatureMapper.createTable : ==> Parameters: t0(String), 杭州(String), 0(Integer)
2021-07-22 16:00:48.226 DEBUG 16276 --- [ main] c.t.e.m.m.TemperatureMapper.createTable : <== Updates: 0
2021-07-22 16:00:48.227 DEBUG 16276 --- [ main] c.t.e.m.m.TemperatureMapper.createTable : ==> Preparing: create table ? using temperature tags( ?, ?)
2021-07-22 16:00:48.228 DEBUG 16276 --- [ main] c.t.e.m.m.TemperatureMapper.createTable : ==> Parameters: t1(String), 深圳(String), 1(Integer)
2021-07-22 16:00:48.242 DEBUG 16276 --- [ main] c.t.e.m.m.TemperatureMapper.createTable : <== Updates: 0
2021-07-22 16:00:48.243 DEBUG 16276 --- [ main] c.t.e.m.m.TemperatureMapper.createTable : ==> Preparing: create table ? using temperature tags( ?, ?)
2021-07-22 16:00:48.243 DEBUG 16276 --- [ main] c.t.e.m.m.TemperatureMapper.createTable : ==> Parameters: t2(String), 上海(String), 2(Integer)
2021-07-22 16:00:48.265 DEBUG 16276 --- [ main] c.t.e.m.m.TemperatureMapper.createTable : <== Updates: 0
2021-07-22 16:00:48.266 DEBUG 16276 --- [ main] c.t.e.m.m.TemperatureMapper.createTable : ==> Preparing: create table ? using temperature tags( ?, ?)
2021-07-22 16:00:48.266 DEBUG 16276 --- [ main] c.t.e.m.m.TemperatureMapper.createTable : ==> Parameters: t3(String), 上海(String), 3(Integer)
2021-07-22 16:00:48.286 DEBUG 16276 --- [ main] c.t.e.m.m.TemperatureMapper.createTable : <== Updates: 0
2021-07-22 16:00:48.287 DEBUG 16276 --- [ main] c.t.e.m.m.TemperatureMapper.createTable : ==> Preparing: create table ? using temperature tags( ?, ?)
2021-07-22 16:00:48.287 DEBUG 16276 --- [ main] c.t.e.m.m.TemperatureMapper.createTable : ==> Parameters: t4(String), 深圳(String), 4(Integer)
2021-07-22 16:00:48.301 DEBUG 16276 --- [ main] c.t.e.m.m.TemperatureMapper.createTable : <== Updates: 0
2021-07-22 16:00:48.302 DEBUG 16276 --- [ main] c.t.e.m.m.TemperatureMapper.createTable : ==> Preparing: create table ? using temperature tags( ?, ?)
2021-07-22 16:00:48.302 DEBUG 16276 --- [ main] c.t.e.m.m.TemperatureMapper.createTable : ==> Parameters: t5(String), 北京(String), 5(Integer)
2021-07-22 16:00:48.323 DEBUG 16276 --- [ main] c.t.e.m.m.TemperatureMapper.createTable : <== Updates: 0
2021-07-22 16:00:48.324 DEBUG 16276 --- [ main] c.t.e.m.m.TemperatureMapper.createTable : ==> Preparing: create table ? using temperature tags( ?, ?)
2021-07-22 16:00:48.324 DEBUG 16276 --- [ main] c.t.e.m.m.TemperatureMapper.createTable : ==> Parameters: t6(String), 杭州(String), 6(Integer)
2021-07-22 16:00:48.339 DEBUG 16276 --- [ main] c.t.e.m.m.TemperatureMapper.createTable : <== Updates: 0
2021-07-22 16:00:48.340 DEBUG 16276 --- [ main] c.t.e.m.m.TemperatureMapper.createTable : ==> Preparing: create table ? using temperature tags( ?, ?)
2021-07-22 16:00:48.341 DEBUG 16276 --- [ main] c.t.e.m.m.TemperatureMapper.createTable : ==> Parameters: t7(String), 深圳(String), 7(Integer)
2021-07-22 16:00:48.360 DEBUG 16276 --- [ main] c.t.e.m.m.TemperatureMapper.createTable : <== Updates: 0
2021-07-22 16:00:48.361 DEBUG 16276 --- [ main] c.t.e.m.m.TemperatureMapper.createTable : ==> Preparing: create table ? using temperature tags( ?, ?)
2021-07-22 16:00:48.361 DEBUG 16276 --- [ main] c.t.e.m.m.TemperatureMapper.createTable : ==> Parameters: t8(String), 深圳(String), 8(Integer)
2021-07-22 16:00:48.375 DEBUG 16276 --- [ main] c.t.e.m.m.TemperatureMapper.createTable : <== Updates: 0
2021-07-22 16:00:48.376 DEBUG 16276 --- [ main] c.t.e.m.m.TemperatureMapper.createTable : ==> Preparing: create table ? using temperature tags( ?, ?)
2021-07-22 16:00:48.376 DEBUG 16276 --- [ main] c.t.e.m.m.TemperatureMapper.createTable : ==> Parameters: t9(String), 北京(String), 9(Integer)
2021-07-22 16:00:48.403 DEBUG 16276 --- [ main] c.t.e.m.m.TemperatureMapper.createTable : <== Updates: 0
2021-07-22 16:00:48.423 DEBUG 16276 --- [ main] c.t.e.m.m.TemperatureMapper.insertOne : ==> Preparing: insert into t0(ts, temperature) values(?, ?)
2021-07-22 16:00:48.423 DEBUG 16276 --- [ main] c.t.e.m.m.TemperatureMapper.insertOne : ==> Parameters: 2020-11-11 00:00:00.0(Timestamp), 3.1568499(Float)
2021-07-22 16:00:57.045 DEBUG 16276 --- [ main] c.t.e.m.m.T.dropSuperTable : ==> Preparing: drop table if exists temperature
2021-07-22 16:00:57.045 DEBUG 16276 --- [ main] c.t.e.m.m.T.dropSuperTable : ==> Parameters:
2021-07-22 16:00:57.071 DEBUG 16276 --- [ main] c.t.e.m.m.T.dropSuperTable : <== Updates: 0
org.apache.ibatis.exceptions.PersistenceException:
### Error updating database. Cause: java.sql.SQLException: TDengine ERROR (8000000b): Unable to establish connection
### The error may exist in com/taosdata/example/mybatisplusdemo/mapper/TemperatureMapper.java (best guess)
### The error may involve com.taosdata.example.mybatisplusdemo.mapper.TemperatureMapper.insertOne-Inline
### The error occurred while setting parameters
### SQL: insert into t0(ts, temperature) values(?, ?)
### Cause: java.sql.SQLException: TDengine ERROR (8000000b): Unable to establish connection
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:199)
at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:184)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:433)
at com.sun.proxy.$Proxy63.insert(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:278)
at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:58)
at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:62)
at com.sun.proxy.$Proxy78.insertOne(Unknown Source)
at com.taosdata.example.mybatisplusdemo.mapper.TemperatureMapperTest.before(TemperatureMapperTest.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:251)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:221)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
Caused by: java.sql.SQLException: TDengine ERROR (8000000b): Unable to establish connection
at com.taosdata.jdbc.TSDBError.createSQLException(TSDBError.java:73)
at com.taosdata.jdbc.TSDBJNIConnector.executeQuery(TSDBJNIConnector.java:123)
at com.taosdata.jdbc.TSDBStatement.execute(TSDBStatement.java:85)
at com.taosdata.jdbc.TSDBPreparedStatement.execute(TSDBPreparedStatement.java:266)
at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44)
at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59)
at com.sun.proxy.$Proxy89.execute(Unknown Source)
at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:47)
at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:63)
at com.sun.proxy.$Proxy88.update(Unknown Source)
at com.baomidou.mybatisplus.core.executor.MybatisSimpleExecutor.doUpdate(MybatisSimpleExecutor.java:54)
at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117)
at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:76)
at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:197)
... 41 more
enter image description here
I have tried this demo on my pc. it worked correctly.
unable to establish connection
this exception is always cause by network problem. but from you log info, it seemed that you can access to the TDengine.It is hard to say what caused this.
I advise that you can open the debug flag, and try to figure out what going on there.
you follow these steps to debug you TDengine and read the debug log
which normally is very useful.
for windows
{TDengine_home}/cfg/tao.cfg
add "debugFlag 135", Then run your demo code again and read your client log on
{TDengine_home}/log/taoslog.*
find your sql and you can find the error
The exception logs show that the error happened during statement.execute. You should have successfully created a connection object (e.g., createConnection).
at com.taosdata.jdbc.TSDBStatement.execute(TSDBStatement.java:85)
Did you use IP instead of hostname in your URL? Please use hostname since Tdengine latest versions require hostname. It may fail silently during creating connection and cause some weird problems.
Some other causes may be here in Tdengine FAQ.
2. When encoutered with the error " Unable to establish connection ", what can I do?
I'm currently running a DDL Script using the Liquibase Java API. The whole script and the corresponding changeSet is exceuted successfully. However, after this execution Liquibase throws a LockException.
The ERROR LOG is as follows,
21713 [main] DEBUG liquibase.ext.mssql.database.MSSQLDatabase - Executing Statement: ALTER
TABLE [dbo].[VALIDATIONEXECUTORS] CHECK CONSTRAINT [FK_MSTAPPTYPE_VLDTNEXCUTORS]
21713 [main] INFO liquibase.executor.jvm.JdbcExecutor - ALTER TABLE [dbo].[VALIDATIONEXECUTORS]
CHECK CONSTRAINT [FK_MSTAPPTYPE_VLDTNEXCUTORS]
21715 [main] DEBUG liquibase.executor.jvm.JdbcExecutor - 0 row(s) affected
21715 [main] DEBUG liquibase.ext.mssql.database.MSSQLDatabase - Executing Statement: COMMIT
21715 [main] INFO liquibase.executor.jvm.JdbcExecutor - COMMIT
21735 [main] DEBUG liquibase.executor.jvm.JdbcExecutor - -1 row(s) affected
21735 [main] INFO liquibase.changelog.ChangeSet - SQL in file
E:\\LQBASE\\LiquibaseDemo\\src\\main\\resources\\db\\changelog\\ddl\\DBSchema.sql executed
21737 [main] INFO liquibase.changelog.ChangeSet - ChangeSet
src/main/resources/db/changelog/ddl_changelog.xml::Create_DB::skini ran successfully in 18064ms
21738 [main] INFO liquibase.executor.jvm.JdbcExecutor - select schema_name()
21739 [main] INFO liquibase.executor.jvm.JdbcExecutor - SELECT MAX(ORDEREXECUTED) FROM
IND_DEV.DATABASECHANGELOG
21742 [main] INFO liquibase.executor.jvm.JdbcExecutor - select schema_name()
21744 [main] DEBUG liquibase.executor.jvm.JdbcExecutor - Release Database Lock
21745 [main] INFO liquibase.executor.jvm.JdbcExecutor - select schema_name()
21747 [main] DEBUG liquibase.executor.jvm.JdbcExecutor - UPDATE IND_DEV.DATABASECHANGELOGLOCK
SET LOCKED = 0, LOCKEDBY = NULL, LOCKGRANTED = NULL WHERE ID = 1
21749 [main] INFO liquibase.executor.jvm.JdbcExecutor - select schema_name()
**21751 [main] INFO liquibase.lockservice.StandardLockService - Successfully released change log
lock
21752 [main] ERROR liquibase.Liquibase - Could not release lock
liquibase.exception.LockException: liquibase.exception.DatabaseException: Error executing SQL
UPDATE IND_DEV.DATABASECHANGELOGLOCK SET LOCKED = 0, LOCKEDBY = NULL, LOCKGRANTED = NULL WHERE
ID = 1: Invalid object name 'IND_DEV.DATABASECHANGELOGLOCK'.**
at liquibase.lockservice.StandardLockService.releaseLock(StandardLockService.java:357)
at liquibase.Liquibase.update(Liquibase.java:206)
at liquibase.Liquibase.update(Liquibase.java:179)
at liquibase.Liquibase.update(Liquibase.java:175)
at liquibase.Liquibase.update(Liquibase.java:168)
at
com.sk.liquibase.LiquibaseDemo.LiquibaseConfig.createManageIDDatabase(LiquibaseConfig.java:34)
at com.sk.liquibase.LiquibaseDemo.App.main(App.java:12)
**Caused by: liquibase.exception.DatabaseException: Error executing SQL UPDATE
IND_DEV.DATABASECHANGELOGLOCK SET LOCKED = 0, LOCKEDBY = NULL, LOCKGRANTED = NULL WHERE ID = 1:
Invalid object name 'IND_DEV.DATABASECHANGELOGLOCK'.**
According to the error, IND_DEV (which is the DB username) is somehow being appended to the DATABASECHANGELOGLOCK table. Does anyone have any idea what the issue could be?
Sometimes if the update application is abruptly stopped, then the lock remains stuck. Possibly due to a killed liquibase process not releasing its lock
Then running
UPDATE DATABASECHANGELOGLOCK SET LOCKED=0, LOCKGRANTED=null, LOCKEDBY=null;
against the database helps.
Or you can simply drop the DATABASECHANGELOGLOCK table, it will be recreated. or whatever changeloglock name you have configured.
I have Spring boot 2 applications, when I am firing a select query, before actual query runs one validation query "SELECT 1" is being called because of DB pool wants to validate if the pooled connection is alive or not,
"Select 1" is also taking long time, what can be done to improve performance, of course disabling "Select 1" validation is not a good idea
2019-10-01 20:54:43.352 DEBUG 15196 --- [nio-8081-exec-1] org.hibernate.SQL :
/* SELECT
MY Hibernate Query
2019-10-01 20:54:43.354 DEBUG 15196 --- [nio-8081-exec-1] c.m.s.jdbc.internals.SQLServerStatement : SQLServerStatement:7 created by (ConnectionID:1 ClientConnectionId: 5494adca-2bef-4403-bcb6-713b676df4fd)
2019-10-01 20:54:43.354 DEBUG 15196 --- [nio-8081-exec-1] c.m.s.jdbc.internals.SQLServerStatement : SQLServerStatement:7 Executing (not server cursor) SELECT 1
2019-10-01 20:54:43.612 DEBUG 15196 --- [nio-8081-exec-1] c.m.s.jdbc.internals.SQLServerResultSet : SQLServerResultSet:7 created by (SQLServerStatement:7)
2019-10-01 20:54:43.647 DEBUG 15196 --- [nio-8081-exec-1] c.m.s.jdbc.internals.SQLServerStatement : SQLServerPreparedStatement:8 created by (ConnectionID:1 ClientConnectionId: 5494adca-2bef-4403-bcb6-713b676df4fd)
2019-10-01 20:54:43.740 TRACE 15196 --- [nio-8081-exec-1] o.h.type.descriptor.sql.BasicBinder : binding parameter [1] as [VARCHAR] - [US]
2019-10-01 20:54:43.766 DEBUG 15196 --- [nio-8081-exec-1] c.m.s.jdbc.internals.SQLServerStatement : SQLServerPreparedStatement:8: calling sp_executesql: SQL:/* SELECT c.shippingZone.currency.isoName FROM Country c WHERE c.id = :countryCode */ select currency2_.ISO_NAME as col_0_0_ from TBL_COUNTRY country0_ left outer join TBL_SHIPPING_ZONE_COUNTRY country0_1_ on country0_.ID=country0_1_.COUNTRY_ID cross join TBL_SHIPPING_ZONES shippingzo1_ cross join TBL_CURRENCIES currency2_ where country0_1_.SHIPPING_ZONE_ID=shippingzo1_.ID and shippingzo1_.CURRENCY_ID=currency2_.ID and country0_.ID=#P0
2019-10-01 20:54:44.029 DEBUG 15196 --- [nio-8081-exec-1] c.m.s.jdbc.internals.SQLServerResultSet : SQLServerResultSet:8 created by (SQLServerPreparedStatement:8)
2019-10-01 20:54:44.043 DEBUG 15196 --- [nio-8081-exec-1] org.hibernate.loader.Loader : Result set row: 0
2019-10-01 20:54:44.044 DEBUG 15196 --- [nio-8081-exec-1] org.hibernate.loader.Loader : Result row:
I would like to understand why I would be getting the following exception when "transacted" is set on a route.
errorHandler(deadLetterChannel("activemq:EXCEPTION")
.useOriginalMessage()
.maximumRedeliveries(1));
from("activemq:TRIGGER").routeId("Trigger")
.transacted()
.bean("helloService")
.to("log:out");
I would like for any exceptions that are being thrown to be sent to an EXCEPTION queue. It is my understanding that "transacted" needs to be set to make the route a transaction. When I remove the configuration I don't get the exception below.
Exception is created when string for Hello class is set to larger then 5 characters.
Example code:
https://github.com/zachariahyoung/docker-camel
2015-12-03 21:59:26.706 WARN 9900 --- [nsumer[TRIGGER]] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 22001, SQLState: 22001
2015-12-03 21:59:26.706 ERROR 9900 --- [nsumer[TRIGGER]] o.h.engine.jdbc.spi.SqlExceptionHelper : Value too long for column "TEXT VARCHAR(5)": "'sdsfasdfasdf' (12)"; SQL statement:
insert into hello (id, text) values (null, ?) [22001-190]
2015-12-03 21:59:26.707 WARN 9900 --- [nsumer[TRIGGER]] o.a.c.s.spi.TransactionErrorHandler : Transaction rollback (0x7e2bd5e6) redelivered(true) for (MessageId: ID:CHARLA-49686-1449193952655-71:1:1:1:1 on ExchangeId: ID-CHARLA-63325-1449200820961-0-37) caught: Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: Transaction marked as rollbackOnly
2015-12-03 21:59:26.708 WARN 9900 --- [nsumer[TRIGGER]] o.a.c.c.jms.EndpointMessageListener : Execution of JMS message listener failed. Caused by: [org.apache.camel.RuntimeCamelException - org.springframework.transaction.TransactionSystemException: Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: Transaction marked as rollbackOnly]
org.apache.camel.RuntimeCamelException: org.springframework.transaction.TransactionSystemException: Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: Transaction marked as rollbackOnly
at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1642) ~[camel-core-2.16.0.jar:2.16.0]
at org.apache.camel.component.jms.EndpointMessageListener$EndpointMessageListenerAsyncCallback.done(EndpointMessageListener.java:186) ~[camel-jms-2.15.3.jar:2.15.3]
at org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:107) ~[camel-jms-2.15.3.jar:2.15.3]
at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:746) ~[spring-jms-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:684) ~[spring-jms-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:651) ~[spring-jms-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:315) [spring-jms-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:233) [spring-jms-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1150) [spring-jms-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1142) [spring-jms-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:1039) [spring-jms-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_45]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
Caused by: org.springframework.transaction.TransactionSystemException: Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: Transaction marked as rollbackOnly
at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:526) ~[spring-orm-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:761) ~[spring-tx-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:730) ~[spring-tx-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:150) ~[spring-tx-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.apache.camel.spring.spi.TransactionErrorHandler.doInTransactionTemplate(TransactionErrorHandler.java:174) ~[camel-spring-2.16.0.jar:2.16.0]
at org.apache.camel.spring.spi.TransactionErrorHandler.processInTransaction(TransactionErrorHandler.java:134) ~[camel-spring-2.16.0.jar:2.16.0]
at org.apache.camel.spring.spi.TransactionErrorHandler.process(TransactionErrorHandler.java:103) ~[camel-spring-2.16.0.jar:2.16.0]
at org.apache.camel.spring.spi.TransactionErrorHandler.process(TransactionErrorHandler.java:112) ~[camel-spring-2.16.0.jar:2.16.0]
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190) ~[camel-core-2.16.0.jar:2.16.0]
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190) ~[camel-core-2.16.0.jar:2.16.0]
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:109) ~[camel-core-2.16.0.jar:2.16.0]
at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:87) ~[camel-core-2.16.0.jar:2.16.0]
at org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:103) ~[camel-jms-2.15.3.jar:2.15.3]
... 11 common frames omitted
Caused by: javax.persistence.RollbackException: Transaction marked as rollbackOnly
at org.hibernate.jpa.internal.TransactionImpl.commit(TransactionImpl.java:74) ~[hibernate-entitymanager-4.3.11.Final.jar:4.3.11.Final]
at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:517) ~[spring-orm-4.2.3.RELEASE.jar:4.2.3.RELEASE]
... 23 common frames omitted
Exception is thrown because camel is propagating rollback. If you call this route from another, camel will rollback that route too. You must catch exception which marked route as rollback and tell camel to only mark this route as rollback. Before .transacted() add:
.onException(Exception.class).markRollbackOnlyLast().end()