hibernet 报错 java.lang.StringIndexOutOfBoundsException: String index out of range: 0 处理方法  数据表字段为char导致,修改为VARCHAR. 建表时不要使用char类型,为null就会报以上错误…
使用命令 java -jar springBoot.jar  启动项目,结果报错如下: Exception at java.lang.String.substring(String.java:) at org.springframework.boot.loader.jar.JarFile.createJarFileFromDirectoryEntry(JarFile.java:) at org.springframework.boot.loader.jar.JarFile.createJarFi…
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'apiLogMapper' defined in file : Invocation of init method failed; nested exception is tk.mybatis.mapper.MapperException: tk.mybatis.mapper.MapperException: java.l…
有一个sql用union拼接的如下: select id,(**还有很多字段**),'' as NewName from tb1 union select id,(**还有很多字段**),name as NewName from tb2 union select id,(**还有很多字段**),name as NewName from tb3 tb1表中不存在这个字段所以用'' as NewNametb2,tb3中有这了个字段是varchar的查询以一直报错:StringIndexOutOfBo…
springBoot+Druid+Mybatis :启动错误描述 Error parsing SQL Mapper Configuration. Cause: java.lang.StringIndexOutOfBoundsException: String index out of range: -37 1.UnsatisfiedDependencyException 可能原因之一,这个项目目录有中文: 1.项目目录有文件夹是中文 2.项目所属的层级内外层级有中文 解决简易:将整个项目复制到纯…
java.sql.SQLException: Parameter index out of range (3 > number of parameters, which is 2). java.sql.SQLException: Parameter index out of range (3 > number of parameters, which is 2). at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1056)…
1.错误描述 [ERROR:]2015-05-05 16:35:50,664 [异常拦截] org.hibernate.exception.GenericJDBCException: error executing work at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:54) at org.hibernate.engine.…
java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0). at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1056) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957) at com.mysql.jdbc.SQLError.…
开发的时候 遇到 java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0 这个异常有时候会有,有时候正常 不太好捕捉 猜测 已经把数据给了list,然后让主线程去显示:接着后台继续获取数据.那也许有可能主线程还是没刷新完,后台又把新数据给过来了 所以 猜测 是刷新头部出现的问题 也就是 news.clear(); news.addAll(0, refreshNewData); newsAdapter.notifyDataSe…
1.错误描述 java.sql.SQLException:Column Index out of range,0<1 2.错误原因 try { Class.forName("com.mysql.jdbc.Driver"); Connection conn = null; Statement stat = null; ResultSet rs = null; try { conn = DriverManager.getConnection("jdbc:mysql://lo…