java.lang.intArrayIndexOutOfBoundsException:4

Cause: java.lang.ArrayIndexOutOfBoundsException: 1; nested exception is com.ibat - fengbin2005 - ITeye技术网站
碰到Cause: java.lang.ArrayIndexOutOfBoundsException: 1; nested exception is mon.jdbc.exception.NestedSQLException 这个问题
原来是数据库中存在dbtrade,但是customInfo不存在,直接update导致的.
//A.存在付款时间,则表示已经统计过
if(dbtrade!=null && dbtrade.getPay_time()!=null){
//更新用户基本信息
fillCustomBaseInfo(trade,dbcustomInfo);
topApplicationDao.update("top.trade.updateCustom", dbcustomInfo);
return dbcustomI
&update id="updateCustom"&
update custom_info set
name=#name#,
state=#state#,
city=#city#
where xxx_nick=#xxx_nick# and nick=#nick#
这段代码的问题.
因为dbcustomInfo 为null 转化的时候报错导致
代码修改成问题解决
if(dbtrade!=null && dbtrade.getPay_time()!=null){
if(dbcustomInfo==null){
dbcustomInfo = createCustomByTrade(trade, dbcustomInfo, comUid, sid, comCacheTools);
return dbcustomI
//更新用户基本信息
fillCustomBaseInfo(trade,dbcustomInfo);
topApplicationDao.update("top.trade.updateCustom", dbcustomInfo);
return dbcustomI
=====================详细错误=====================
21:30:19.161 com.hupun.crmbatch.service.trade.TOPTradeImporter 更新用户信息统计失败!
org.springframework.jdbc.UncategorizedSQLException: SqlMapC uncategorized SQLException for SQL []; SQL state [null]; error code [0];
--- The error occurred while applying a parameter map.
--- Check the top.trade.updateCustom-InlineParameterMap.
--- Check the parameter mapping for the 'name' property.
--- Cause: java.lang.ArrayIndexOutOfBoundsException: 1; nested exception is mon.jdbc.exception.NestedSQLException:
--- The error occurred while applying a parameter map.
--- Check the top.trade.updateCustom-InlineParameterMap.
--- Check the parameter mapping for the 'name' property.
--- Cause: java.lang.ArrayIndexOutOfBoundsException: 1
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:203)
at org.springframework.orm.ibatis.SqlMapClientTemplate.update(SqlMapClientTemplate.java:378)
at com.hupun.crmbatch.dao.AbstractIbatisDaoSupport.update(AbstractIbatisDaoSupport.java:120)
at com.hupun.crmbatch.service.trade.TOPTradeImporter.updateCustomSummary(TOPTradeImporter.java:330)
at com.hupun.crmbatch.service.trade.TOPTradeImporter.store(TOPTradeImporter.java:133)
at com.hupun.crm.test.top.trade.TopTradeDownloadTest.testNotExistCustom(TopTradeDownloadTest.java:209)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at com.taobao.itest.core.statements.RunBeforeTestMethod.evaluate(RunBeforeTestMethod.java:54)
at com.taobao.itest.core.statements.RunAfterTestMethod.evaluate(RunAfterTestMethod.java:60)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
fengbin2005
浏览: 345334 次
[img][/img]大大
[*]案说法是否
[img][/img]用心创造滤镜
扫码下载App
汇聚2000万达人的兴趣社区下载即送20张免费照片冲印
扫码下载App
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!&&|&&
LOFTER精选
网易考拉推荐
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
b.发生错误的原因是数组索引超过了边界。 c.该错误消息是在Test类的main()方法(即Test.main)中发生的。 d.准确的说,该错误消息是在Test.java程序的第6行中发生的。
阅读(3141)|
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
历史上的今天
loftPermalink:'',
id:'fks_',
blogTitle:'Exception in thread \"main\" java.lang.ArrayIndexOutOfBoundsException at Test.main (Test.java:6)',
blogAbstract:' a.正在运行的main线程发生了错误。 b.发生错误的原因是数组索引超过了边界。 c.该错误消息是在Test类的main()方法(即Test.main)中发生的。 d.准确的说,该错误消息是在Test.java程序的第6行中发生的。',
blogTag:'',
blogUrl:'blog/static/',
isPublished:1,
istop:false,
modifyTime:0,
publishTime:3,
permalink:'blog/static/',
commentCount:0,
mainCommentCount:0,
recommendCount:1,
bsrk:-100,
publisherId:0,
recomBlogHome:false,
currentRecomBlog:false,
attachmentsFileIds:[],
groupInfo:{},
friendstatus:'none',
followstatus:'unFollow',
pubSucc:'',
visitorProvince:'',
visitorCity:'',
visitorNewUser:false,
postAddInfo:{},
mset:'000',
remindgoodnightblog:false,
isBlackVisitor:false,
isShowYodaoAd:false,
hostIntro:'',
hmcon:'0',
selfRecomBlogCount:'0',
lofter_single:''
{list a as x}
{if x.moveFrom=='wap'}
{elseif x.moveFrom=='iphone'}
{elseif x.moveFrom=='android'}
{elseif x.moveFrom=='mobile'}
${a.selfIntro|escape}{if great260}${suplement}{/if}
{list a as x}
推荐过这篇日志的人:
{list a as x}
{if !!b&&b.length>0}
他们还推荐了:
{list b as y}
转载记录:
{list d as x}
{list a as x}
{list a as x}
{list a as x}
{list a as x}
{if x_index>4}{break}{/if}
${fn2(x.publishTime,'yyyy-MM-dd HH:mm:ss')}
{list a as x}
{if !!(blogDetail.preBlogPermalink)}
{if !!(blogDetail.nextBlogPermalink)}
{list a as x}
{if defined('newslist')&&newslist.length>0}
{list newslist as x}
{if x_index>7}{break}{/if}
{list a as x}
{var first_option =}
{list x.voteDetailList as voteToOption}
{if voteToOption==1}
{if first_option==false},{/if}&&“${b[voteToOption_index]}”&&
{if (x.role!="-1") },“我是${c[x.role]}”&&{/if}
&&&&&&&&${fn1(x.voteTime)}
{if x.userName==''}{/if}
网易公司版权所有&&
{list x.l as y}
{if defined('wl')}
{list wl as x}{/list}

我要回帖

更多关于 java.lang.exception 的文章

 

随机推荐