我在mybaits项目中使用tdengine,并使用Taos-jdbc的restful连接器来操作DB。在我使用alter尝试修改表的列之前,一切都会进行。然后我遇到一个错误,即“无效变量”,错误跟踪日志如下所示:
错误(2303):无效变量在com.taosdata.jdbc.TSDBError.createSQLException(TSDBError.java:71) at com.taosdata.jdbc.TSDBError.createSQLException(TSDBError.java:58) at com.taosdata.jdbc.rs.RestfulStatement.getAffectedRows(RestfulStatement.java:134) at com.taosdata.jdbc.rs.RestfulStatement.executeOneUpdate(RestfulStatement.java:125) at com.taosdata.jdbc.rs.RestfulStatement.execute(RestfulStatement.java:82) at com.taosdata.jdbc.rs.RestfulPreparedStatementcom.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44) at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java) 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( sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl )java.lang.reflect.Method.invoke(Method.java:498) at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:64) at com.sun.Proxy(DelegatingMethodAccessorImpl.java:43)$Proxy211更新(未知来源) org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:50) at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117) at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:76) at sun.reflectsun.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.Invocation.proceed(Invocation.java:49) at com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor.intercept(MybatisPlusInterceptor.java:106) at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:62) at com.sun.proxyorg.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:194) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native方法的.$Proxy210.update(未知源)在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:427) 85
但是,发生了错误,但已将列正确添加到表中。我不知道这是怎么回事,有人能帮我吗?
发布于 2022-02-26 17:06:28
您可以将jdbc更新为最新版本。这是因为TDengine服务器的"alter命令“返回值并不像我期望的那样。这个问题已经解决了。
https://stackoverflow.com/questions/69151564
复制相似问题