高分求救,queryForPaginatedList错误?Lazy loading错误?

savagewang1978 2006-04-10 06:53:12
<settings
cacheModelsEnabled="true"
enhancementEnabled="true"
lazyLoadingEnabled="true"
errorTracingEnabled="true"
maxRequests="60"
maxSessions="20"
maxTransactions="10"
useStatementNamespaces="true"/>

为什么使用SqlMapClientTemplate.queryForPaginatedList还有报如下错误:
org.springframework.dao.InvalidDataAccessApiUsageException: SqlMapClient needs to have DataSource to allow for lazy loading - specify SqlMapClientFactoryBean's 'dataSource' property
at org.springframework.orm.ibatis.SqlMapClientTemplate.queryForPaginatedList(SqlMapClientTemplate.java:280)
at test.dataaccess.DhaInfoDAOImpl.findLw0InfoList(DhaInfoDAOImpl.java:79)
at test.business.DhaInfoBLOImpl.findLw0InfoList(DhaInfoBLOImpl.java:51)
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:324)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
at $Proxy5.findLw0InfoList(Unknown Source)
at test.action.Lw02Action.execute(Lw02Action.java:77)
...全文
137 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
天外流星 2006-04-10
  • 打赏
  • 举报
回复
这可是有点奇怪了,望高手出来指点,不知你查询语句写得对不对?

67,515

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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