[jira] Issue Comment Edited: (IBATIS-464) iBatis throws a NPE when performing a sub-select in a resultMap.

2009-05-18 Thread LindsayW (JIRA)

[ 
https://issues.apache.org/jira/browse/IBATIS-464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12709676#action_12709676
 ] 

LindsayW edited comment on IBATIS-464 at 5/18/09 6:39 PM:
--

Thank you Kai Grabfelder.  i didn't notice i lost some part of stacktrace.
here is the completed log.

Thanks and apologize for having left out the log.

Log:
com.mobile.servicechange.util.ServiceChangeException: SqlMapClient operation; 
uncategorized SQLException for SQL []; SQL state [null]; error code [0];   
--- The error occurred in /SCMS_SqlMap.xml.  
--- The error occurred while applying a result map.  
--- Check the SCMS.ReceiveItemListResultMap.  
--- Check the result mapping for the 'scmsChngWoVoList' property.  
--- Cause: java.lang.NullPointerException; nested exception is 
com.ibatis.common.jdbc.exception.NestedSQLException:   
--- The error occurred in /SCMS_SqlMap.xml.  
--- The error occurred while applying a result map.  
--- Check the SCMS.ReceiveItemListResultMap.  
--- Check the result mapping for the 'scmsChngWoVoList' property.  
--- Cause: java.lang.NullPointerException
at 
com.mobile.servicechange.service.impl.ReceiveServiceImpl.getReceiveItemList(ReceiveServiceImpl.java:142)
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 $Proxy2025.getReceiveItemList(Unknown Source)
at 
com.mobile.servicechange.main.ReceiveThreadImpl.run(ReceiveThreadImpl.java:148)
at 
com.mobile.servicechange.main.ReceiveThreadImpl.call(ReceiveThreadImpl.java:489)
at 
com.mobile.servicechange.main.ReceiveHandlerImpl.activate(ReceiveHandlerImpl.java:369)
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.remoting.support.RemoteInvocationTraceInterceptor.invoke(RemoteInvocationTraceInterceptor.java:68)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
at 
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
at $Proxy2027.activate(Unknown Source)
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 
com.caucho.hessian.server.HessianSkeleton.invoke(HessianSkeleton.java:188)
at 
org.springframework.remoting.caucho.HessianServiceExporter.handleRequest(HessianServiceExporter.java:87)
at 
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
at 
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:717)
at 
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:658)
at 
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:392)
at 
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:357)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Ser

[jira] Issue Comment Edited: (IBATIS-464) iBatis throws a NPE when performing a sub-select in a resultMap.

2009-05-18 Thread LindsayW (JIRA)

[ 
https://issues.apache.org/jira/browse/IBATIS-464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12709676#action_12709676
 ] 

LindsayW edited comment on IBATIS-464 at 5/18/09 6:39 PM:
--

Thank you Kai Grabfelder.  i didn't notice i lost some part of the stacktrace.
here is the completed log.

Thanks and apologize for having left out the log.

Log:
com.mobile.servicechange.util.ServiceChangeException: SqlMapClient operation; 
uncategorized SQLException for SQL []; SQL state [null]; error code [0];   
--- The error occurred in /SCMS_SqlMap.xml.  
--- The error occurred while applying a result map.  
--- Check the SCMS.ReceiveItemListResultMap.  
--- Check the result mapping for the 'scmsChngWoVoList' property.  
--- Cause: java.lang.NullPointerException; nested exception is 
com.ibatis.common.jdbc.exception.NestedSQLException:   
--- The error occurred in /SCMS_SqlMap.xml.  
--- The error occurred while applying a result map.  
--- Check the SCMS.ReceiveItemListResultMap.  
--- Check the result mapping for the 'scmsChngWoVoList' property.  
--- Cause: java.lang.NullPointerException
at 
com.mobile.servicechange.service.impl.ReceiveServiceImpl.getReceiveItemList(ReceiveServiceImpl.java:142)
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 $Proxy2025.getReceiveItemList(Unknown Source)
at 
com.mobile.servicechange.main.ReceiveThreadImpl.run(ReceiveThreadImpl.java:148)
at 
com.mobile.servicechange.main.ReceiveThreadImpl.call(ReceiveThreadImpl.java:489)
at 
com.mobile.servicechange.main.ReceiveHandlerImpl.activate(ReceiveHandlerImpl.java:369)
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.remoting.support.RemoteInvocationTraceInterceptor.invoke(RemoteInvocationTraceInterceptor.java:68)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
at 
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
at $Proxy2027.activate(Unknown Source)
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 
com.caucho.hessian.server.HessianSkeleton.invoke(HessianSkeleton.java:188)
at 
org.springframework.remoting.caucho.HessianServiceExporter.handleRequest(HessianServiceExporter.java:87)
at 
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
at 
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:717)
at 
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:658)
at 
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:392)
at 
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:357)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run

[jira] Issue Comment Edited: (IBATIS-464) iBatis throws a NPE when performing a sub-select in a resultMap.

2009-05-15 Thread LindsayW (JIRA)

[ 
https://issues.apache.org/jira/browse/IBATIS-464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12709676#action_12709676
 ] 

LindsayW edited comment on IBATIS-464 at 5/15/09 2:51 AM:
--

Thanks and apologize for having left out the log.

Log:
com.mobile.scms.servicechange.util.ServiceChangeException: SqlMapClient 
operation; uncategorized SQLException for SQL []; SQL state [null]; error code 
[0];   
--- The error occurred in /SqlMap.xml.  
--- The error occurred while applying a result map.  
--- Check the SCMS.ReceiveItemListResultMap.  
--- Check the result mapping for the 'scmsChngWoVoList' property.  
--- Cause: java.lang.NullPointerException; nested exception is 
com.ibatis.common.jdbc.exception.NestedSQLException:   
--- The error occurred in /SqlMap.xml.  
--- The error occurred while applying a result map.  
--- Check the SCMS.ReceiveItemListResultMap.  
--- Check the result mapping for the 'scmsChngWoVoList' property.  
--- Cause: java.lang.NullPointerException
at 
com.mobile.scms.servicechange.service.impl.ReceiveServiceImpl.getReceiveItemList(ReceiveServiceImpl.java:142)
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 $Proxy183.getReceiveItemList(Unknown Source)
at 
com.mobile.scms.servicechange.main.action.MultipleModificationAction.getChrgTypeGExpenseListByReceiveId(MultipleModificationAction.java:2765)
at 
com.mobile.scms.servicechange.main.action.MultipleModificationAction.submit(MultipleModificationAction.java:638)
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.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274)
at 
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194)
at 
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
at 
com.mobile.scms.servicechange.servlet.MyActionServlet.process(MyActionServlet.java:59)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1077)
at 
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
at 
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at com.mobile.scms.sso.web.AuthenticationFilter.doFilter(Unknown Source)
at 
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at 
weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:334)
at 
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063)
at 
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)
at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)
at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
at 
com.mobile.scms.servicechange.servlet.MyActionServlet.process(MyActionServlet.java:59)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
weblogic.se

[jira] Issue Comment Edited: (IBATIS-464) iBatis throws a NPE when performing a sub-select in a resultMap.

2009-05-14 Thread Kai Grabfelder (JIRA)

[ 
https://issues.apache.org/jira/browse/IBATIS-464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12709510#action_12709510
 ] 

Kai Grabfelder edited comment on IBATIS-464 at 5/14/09 11:30 AM:
-

What do you mean with similar error message? Please post a stacktrace. 
Furthermore you should use inject the datasource into the 
sqlmapclientfactorybean. There should be no need for you to have a datasource 
in your DAOs

  was (Author: kaig):
what do you mean oyu get similar error message? Please post a stacktrace. 
Furthermore you should use inject the datasource into the 
sqlmapclientfactorybean. There should be no need for you to have a datasource 
in your DAOs
  
> iBatis throws a NPE when performing a sub-select in a resultMap.
> 
>
> Key: IBATIS-464
> URL: https://issues.apache.org/jira/browse/IBATIS-464
> Project: iBatis for Java
>  Issue Type: Bug
>  Components: SQL Maps
>Affects Versions: 2.2.0, 2.3.0
> Environment: WinXP, Java 1.5, originally discovered when moving to 
> Spring 2.0.6 (spring-ibatis depends on ibatis 2.3.0)
>Reporter: Mitchell L. Waters III
>Priority: Blocker
>
> iBatis throws a NullPointerException when performing a sub-select in a 
> resultMap. 
> For some foo record in the DB, there are a variable number of comments. 
> iBatis allows the user to return an object that contains the information from 
> the foo table and return the list/array/collection of related items (comments 
> in this example) from a separate table that relate to the foo record, using a 
> resultMap like what is listed below.
> 
>   
>   
>/>
> 
> This works without a hitch in iBatis 2.1.7. However when you attempt to do 
> the same in iBatis 2.2.0 or 2.3.0, you get a NPE (stack trace to follow). 
> Digging in a bit, it seems that the session returned to do the SessionScope 
> that is returned for the sub-select is different than that used to run the 
> original select (different than the behavior in 2.1.7) and that the 
> transaction/transaction manager for the new SessionScope object is null. It 
> ends up throwing when it attempts to start a new transaction for the 
> sub-select. 
> I originally saw this problem when updating my application to use Spring 
> 2.0.6 (which uses iBatis 2.3.0 as a dependency of the spring-ibatis module), 
> but upon further investigation I was able to isolate it to being in the 
> ibatis-sqlmap module. I've since set up our project to use Spring 2.0.6 with 
> an older version (2.1.7) of iBatis, and this works fine. While testing the 
> problem, we tested iBatis 2.1.7, 2.2.0 and 2.3.0 with both Spring 1.2.9 and 
> 2.0.6, and we only experience the problem with iBatis 2.2.0 and 2.3.0.
> Hopefully, this will be fixed but until then we will be sticking with 2.1.7.
> Thank you,
> Mitch Waters
> org.springframework.jdbc.UncategorizedSQLException: SqlMapClient operation; 
> uncategorized SQLException for SQL []; SQL state [null]; error code [0];   
> --- The error occurred in test.xml.  
> --- The error occurred while applying a result map.  
> --- Check the complexResult.  
> --- Check the result mapping for the 'roles' property.  
> --- Cause: java.lang.NullPointerException; nested exception is 
> com.ibatis.common.jdbc.exception.NestedSQLException:   
> --- The error occurred in test.xml.  
> --- The error occurred while applying a result map.  
> --- Check the complexResult.  
> --- Check the result mapping for the 'roles' property.  
> --- Cause: java.lang.NullPointerException
> Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:   
> --- The error occurred in test.xml.  
> --- The error occurred while applying a result map.  
> --- Check the complexResult.  
> --- Check the result mapping for the 'roles' property.  
> --- Cause: java.lang.NullPointerException
>   at 
> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:188)
>   at 
> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForList(GeneralStatement.java:123)
>   at 
> com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:615)
>   at 
> com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:589)
>   at 
> com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:118)
>   at 
> org.springframework.orm.ibatis.SqlMapClientTemplate$3.doInSqlMapClient(SqlMapClientTemplate.java:269)
>   at 
> org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:194)
>   at 
> org.springframework.orm.ibatis.SqlMapClientTemplate.executeWithListResult(SqlMapClientTemplate.java:220)
>   at 
> org.springfr