ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 陈抒 <csfreeb...@gmail.com>
Subject Re: How to correct the time out problem?
Date Wed, 12 May 2010 01:31:21 GMT
After adding ?autoReconnect=true,I got the following error message.


[Level:ERROR] [Time:2010-05-10 22:30:27,103] [Thread: pool-1-thread-1]
[Class:PortageService] [Method:?] [Line:?]
Throwable in ResultFileHandler.run:
### Error updating database.  Cause: java.lang.NullPointerException
### The error may exist in iBATIS3/Xml/user.map.xml
### The error may involve iBATIS3.Xml.UserMapper.addMailRequest
### The error occurred while executing an update
### Cause: java.lang.NullPointerException
org.apache.ibatis.exceptions.IbatisException:
### Error updating database.  Cause: java.lang.NullPointerException
### The error may exist in iBATIS3/Xml/user.map.xml
### The error may involve iBATIS3.Xml.UserMapper.addMailRequest
### The error occurred while executing an update
### Cause: java.lang.NullPointerException
        at
org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:8)
        at
org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:100)
        at
org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:87)
        at freebird.business.MailManager.addMailRequest(MailManager.java:18)
        at
freebird.helper.MailHelper.sendMailRequestToUser(MailHelper.java:68)
        at
com.exactor.cn.portageservice.ResultFileHandler.handleCorrectResultFile(ResultFileHandler.java:99)
        at
com.exactor.cn.portageservice.ResultFileHandler.run(ResultFileHandler.java:123)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
        at freebird.business.Email.getReceiverList(Email.java:105)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.apache.ibatis.reflection.invoker.MethodInvoker.invoke(MethodInvoker.java:22)
        at
org.apache.ibatis.reflection.wrapper.BeanWrapper.getBeanProperty(BeanWrapper.java:133)
        at
org.apache.ibatis.reflection.wrapper.BeanWrapper.get(BeanWrapper.java:27)
        at
org.apache.ibatis.reflection.MetaObject.getValue(MetaObject.java:103)
        at
org.apache.ibatis.builder.xml.dynamic.DynamicContext.<init>(DynamicContext.java:29)
        at
org.apache.ibatis.builder.xml.dynamic.DynamicSqlSource.getBoundSql(DynamicSqlSource.java:21)
        at
org.apache.ibatis.mapping.MappedStatement.getBoundSql(MappedStatement.java:198)
        at
org.apache.ibatis.executor.statement.BaseStatementHandler.<init>(BaseStatementHandler.java:45)
        at
org.apache.ibatis.executor.statement.PreparedStatementHandler.<init>(PreparedStatementHandler.java:16)
        at
org.apache.ibatis.executor.statement.RoutingStatementHandler.<init>(RoutingStatementHandler.java:27)
        at
org.apache.ibatis.session.Configuration.newStatementHandler(Configuration.java:226)
        at
org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:27)
        at
org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:72)
        at
org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:43)
        at
org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:98)
        ... 8 more

陈抒
Best regards
http://blog.csdn.net/sheismylife


On Mon, May 10, 2010 at 12:03 AM, Martin Ellis <martin@ellis.name> wrote:

> On 9 May 2010 07:43, 陈抒 <csfreebird@gmail.com> wrote:
> > You should consider either expiring and/or testing
> > connection validity before use in your application, increasing the server
> > configured values for client timeouts, or using the Connector/J
> connection
> > property 'autoReconnect=true' to avoid this problem.
>
> The error message you've posted lists three ways to correct the problem.
>
> The third is probably the easiest to try, it's a one line change: just add
> ?autoReconnect=true to your JDBC URI.
>
> Martin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
> For additional commands, e-mail: user-java-help@ibatis.apache.org
>
>

Mime
View raw message