[ http://issues.apache.org/jira/browse/IBATIS-152?page=comments#action_12313566 ]
David Winterbottom commented on IBATIS-152: ------------------------------------------- Hi Sven, I have tried the examples 5 and 6. I did not attempt example 4 because of the Comment by Ken Katsma [17/May/05 01:13 PM]. Ken as this was commented as that example 4 was dynamic SQL and not refcursors. I have attached the code that I have used, and output. I am using an unchanged iBATIS_DBL-2.1.0.565.zip I have no problems using the refcursor with a oracle pl/sql function (5) and oracle pl/sql procedure (6) until I include the log4j jar file. Is there a problem with how I am configuring log4j. From the Developer guide all I required is the Jakarta Commons Logging and the log4j jar file. > NullPointer Exception thrown in GeneralStatement.executeQueryWithCallback > when using Log4j > ------------------------------------------------------------------------------------------ > > Key: IBATIS-152 > URL: http://issues.apache.org/jira/browse/IBATIS-152 > Project: iBatis for Java > Type: Bug > Components: SQL Maps > Versions: 2.1.1 > Environment: Windows XP, Java 1.3 > Reporter: David Winterbottom > Attachments: RefCursor.zip > > Hi, > I am trying to follow the supplied test for IBATIS-53 (Oracle ref cursors). > I have found that running the supplied test (number 6) with log4j-1.2.9.jar > on > the classpath causes a NullPointerException. > The stack trace and output is: > DEBUG [main] - Created connection 3235124. > DEBUG [main] - {conn-100000} Connection > DEBUG [main] - {pstm-100001} PreparedStatement: { ? = call > mis_extract.mgr_case_temp.FindCases } > DEBUG [main] - {pstm-100001} Parameters: [] > DEBUG [main] - {pstm-100001} Types: [] > DEBUG [main] - {rset-100002} ResultSet > DEBUG [main] - Returned connection 3235124 to pool. > com.ibatis.common.jdbc.exception.NestedSQLException: > --- The error occurred in com/kinnect/mis/datamodel/sql/CaseToExtract.xml. > --- The error occurred while applying a parameter map. > --- Check the output. > --- Check the output parameters (retrieval of output parameters failed). > --- Cause: java.lang.NullPointerException > Caused by: java.lang.NullPointerException > at > com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:184) > at > com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForObject(GeneralStatement.java:100) > at > com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:561) > at > com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:536) > at > com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject(SqlMapSessionImpl.java:97) > at > com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForObject(SqlMapClientImpl.java:69) > at com.kinnect.mis.MISExtract.readCasesToExtract(MISExtract.java:233) > at com.kinnect.mis.MISExtract.main(MISExtract.java:64) > Caused by: > java.lang.NullPointerException > at java.lang.reflect.Method.invoke(Native Method) > at > com.ibatis.common.jdbc.logging.ResultSetLogProxy.invoke(ResultSetLogProxy.java:47) > at $Proxy2.close(Unknown Source) > at > com.ibatis.sqlmap.engine.execution.SqlExecutor.closeResultSet(SqlExecutor.java:392) > at > com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQueryProcedure(SqlExecutor.java:298) > at > com.ibatis.sqlmap.engine.mapping.statement.ProcedureStatement.sqlExecuteQuery(ProcedureStatement.java:34) > at > com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:169) > at > com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForObject(GeneralStatement.java:100) > at > com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:561) > at > com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:536) > at > com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject(SqlMapSessionImpl.java:97) > at > com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForObject(SqlMapClientImpl.java:69) > at com.kinnect.mis.MISExtract.readCasesToExtract(MISExtract.java:233) > at com.kinnect.mis.MISExtract.main(MISExtract.java:64) > Is there a known problem with log4j with IBatis ? > Is this a problem for RefCursors only ? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira