java.lang.StringIndexOutOfBoundsException: String index out of range: -1

hhccbb520 2009-03-16 09:51:41
select n.net_name,
a.var_code,
a.var_name,
c.agentid,
c.getvalue,
c.areaid,
c.billingcyclid
from ai_var_def a, cim_agent_busi c, agent_b_netinfo n
where to_char(c.itemid) = ltrim(a.var_code, 'U')
and n.net_id = c.agentid;
上面的sql在数据库中执行虽然执行有点慢,但是数据能查询得到,并且没有任何报错,但是在java程序中就出现java.lang.StringIndexOutOfBoundsException: String index out of range: -1的错误。
...全文
471 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
ks_reny 2009-03-16
  • 打赏
  • 举报
回复
[Quote=引用楼主 hhccbb520 的帖子:]
select n.net_name,
a.var_code,
a.var_name,
c.agentid,
c.getvalue,
c.areaid,
c.billingcyclid
from ai_var_def a, cim_agent_busi c, agent_b_netinfo n
where to_char(c.itemid) = ltrim(a.var_code, 'U')
and n.net_id = c.agentid;
上面的sql在数据库中执行虽然执行有点慢,但是数据能查询得到,并且没有任何报错,但是在java程序中就出现java.lang.StringI…
[/Quote]
ltrim函數貌似只有一個參數而已.
dawugui 2009-03-16
  • 打赏
  • 举报
回复
oracle语句,貌似没写对.
htl258_Tony 2009-03-16
  • 打赏
  • 举报
回复
select n.net_name,
a.var_code,
a.var_name,
c.agentid,
c.getvalue,
c.areaid,
c.billingcyclid
from ai_var_def a, cim_agent_busi c, agent_b_netinfo n
where to_char(c.itemid) = ltrim(a.var_code, 'U') and n.net_id = c.agentid;
这个能查到数据?
这是一个维护版本,主要是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 * [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

22,299

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server 疑难问题
社区管理员
  • 疑难问题社区
  • 尘觉
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧