BaseService报错

Blade 未结 2 88
huangyongqin
huangyongqin 剑童 2024-11-08 18:33

BaseService的所有saveOrUpdate都报错请问怎么解决image.png

image.png

### Error updating database.  Cause: java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0).

### The error may exist in org/springblade/modules/develop/mapper/DatasourceMapper.java (best guess)

### The error may involve org.springblade.modules.develop.mapper.DatasourceMapper.insert-Inline

### The error occurred while setting parameters

### SQL: INSERT INTO blade_datasource (id, category, name, driver_class, url, username, password, sharding_config, remark, create_user, create_dept, create_time, update_user, update_time, status, is_deleted) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)

### Cause: java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0).

; Parameter index out of range (1 > number of parameters, which is 0).; nested exception is java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0).


2条回答
  • 2024-11-09 00:19

    有没有做过改动或者自定义了方法,用原版的blade框架试试能不能提交

    0 讨论(0)
  • 2024-11-11 15:27

    使用了shardingsphere,然后在log中出现了

    ShardingSphere-SQL                       : Actual SQL: fiery-eyes-master ::: INSERT INTO blade_datasource (id, category, name, driver_class, url, username, password, sharding_config, remark, create_user, create_dept, create_time, update_user, update_time, status, is_deleted) VALUES org.apache.shardingsphere.sharding.rewrite.token.pojo.ShardingInsertValuesToken@558a6948 ::: [1855874390046015489, 1, Test, com.mysql.cj.jdbc.Driver, 123, t, 1, , , 1123598821738675201, 1123598813738675201, 2024-11-11 15:25:09.722, 1123598821738675201, 2024-11-11 15:25:09.722, 1, 0]

    在sql中间出现了ShardingInsertValuesToken

    0 讨论(0)
提交回复