i'm using phoenix combine with jdbcTemplate to insert data to Hbase.
- Phoenix4.7.0
- Hbase 1.1.2
One of the column(id) in the table is generated monotonically with a sequence,in general,i use "jdbcTemplate.execute(sql)" method to insert data. For example , "upsert into table(row id) values( "row"," NEXT VALUE FOR table.id_sequence" )" The second column(id) is generated Automatically with a sequence. it's fine.But when i use "jdbcTemplate.batchUpdate" method ,the same sql to batchInsert,there's something wrong with it.
Caused by: org.apache.phoenix.exception.BatchUpdateExecution: ERROR 1106 (XCL06): Exception while executing batch.
at org.apache.phoenix.jdbc.PhoenixStatement.executeBatch(PhoenixStatement.java:1226)
at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
at org.springframework.jdbc.core.JdbcTemplate$4.doInPreparedStatement(JdbcTemplate.java:905)
at org.springframework.jdbc.core.JdbcTemplate$4.doInPreparedStatement(JdbcTemplate.java:890)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:589)
... 45 more
Caused by: org.apache.phoenix.schema.TypeMismatchException: ERROR 203 (22005): Type mismatch. BIGINT and VARCHAR for NEXT VALUE FOR AQMDATA_ALL.id_sequence
How can i fix it?