String index out of range: 0

在struts中实现客户登陆的功能的时候,数据库中已经存在表格,且javaEE与数据库的连接没错的情况下出现一下的错误提示
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
出现这个问题是因为在表中出现了为空的字段,当查询的数据库字段值为空字符窜的时候,会报这种错误,
猜测这是因为hibernate某种奇怪的设定的原因
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
解决方案
1、在数据库中将字段默认值为null,或者将为null的字段填写完整,我在遇到的这个问题的时候是因为在表中的user-state未填写,所以出现了以上的错误提示

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
这是一个维护版本,主要是bug修复: ** Bug * [MNG-4840] - Prerequisites is not working on m3 * [MNG-4913] - [regression] User properties override equally named POM properties of transitive dependencies * [MNG-4915] - Versions in pom.xml are not checked for invalid characters * [MNG-4918] - MavenProject#clone() doubles active profiles * [MNG-4919] - Plugin execution contributed by lifecycle mapping gets lost when same goal is bound multiple times * [MNG-4923] - [regression] java.lang.ClassNotFoundException: org.apache.maven.artifact.ArtifactStatus * [MNG-4925] - Mismanagement of container lookup realm can cause type incompatibilities for plugins looking up components by string * [MNG-4933] - With a resource directory as . maven raise an java.lang.StringIndexOutOfBoundsException:217 * [MNG-4941] - PluginDescriptorBuilder doesn't populate expression/default-value fields for mojo parameters * [MNG-4952] - [regression] RELEASE field of repository metadata is not updated upon repeated deployments * [MNG-4955] - [regression] Outdated remote snapshots are preferred over locally installed snapshots * [MNG-4960] - [regression] Make-like reactor mode does not build selected project when resuming from one of its prerequisites * [MNG-4966] - Preserve double slashes in the scm connection url - identifies absolute repository paths for mercurial ** Improvement * [MNG-4912] - Use of raw type should be Comparable<ArtifactVersion> * [MNG-4916] - Poor ProjectBuilder.build performance for projects with unresolvable extension plugins * [MNG-4922] - ExecutionEvent give on the exception encountered (when having mojoFailed) * [MNG-4926] - ExecutionEvent give on the exception encountered (when having projectFailed , forkedProjectFailed) * [MNG-4944] - Include JRE vendor in version info * [MNG-4950] - Javadoc improvements to DefaultSettingsWriter/Reader * [MNG-4953] - Issue a warning when a system-scope dependency refers to the project basedir ** New Feature * [MNG-4936] - Allow to better monitor and adjust a Maven build during CI * [MNG-4937] - Allow the platform scripts to avoid loading mavenrc content ** Task * [MNG-4945] - Remove mergeId from public POM * [MNG-4957] - Emit validation warning when project version uses irregular SNAPSHOT version string * [MNG-4959] - Update default plugin versions

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值