Inner class type handler is not handled correctly within maps -------------------------------------------------------------
Key: IBATIS-367 URL: http://issues.apache.org/jira/browse/IBATIS-367 Project: iBatis for Java Issue Type: Bug Components: SQL Maps Affects Versions: 2.2.0 Environment: Windows XP, Eclipse 3.1.2. Reporter: Christian Poitras Attachments: innererror.zip When an enum is created as an inner class and is passed as a parameter of a java.util.Map, the TypeHandler associated with the enum is not found resulting in a NullPointerException in UnknownTypeHandler. com.ibatis.dao.client.DaoException: Failed to queryForList - id [Protocol.getProtocolListByType], parameterObject [{protocolType=CellCulture, project=Project Oid: 1 Id: Transcription genique }]. Cause: com.ibatis.common.jdbc.exception.NestedSQLException: --- The error occurred in ca/qc/ircm/proteus/persistence/dao/sqlmap/sql/Protocol.xml. --- The error occurred while applying a parameter map. --- Check the Protocol.getProtocolListByType-InlineParameterMap. --- Check the parameter mapping for the 'protocolType' property. --- Cause: java.lang.NullPointerException Caused by: java.lang.NullPointerException at com.ibatis.dao.client.template.SqlMapDaoTemplate.queryForList(SqlMapDaoTemplate.java:284) at ca.qc.ircm.proteus.persistence.dao.sqlmap.ProtocolSqlMapDao.getProtocolListByType(ProtocolSqlMapDao.java:84) 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:585) at com.ibatis.dao.engine.impl.DaoProxy.invoke(DaoProxy.java:72) at $Proxy8.getProtocolListByType(Unknown Source) at ca.qc.ircm.proteus.persistence.service.ProtocolService.getCellCultureProtocolList(ProtocolService.java:122) at ca.qc.ircm.proteus.webview.action.biologist.ExploreResultsAction.init(ExploreResultsAction.java:134) 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:585) at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:276) at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:196) at ca.qc.ircm.proteus.webview.action.NDCSetterAction.execute(NDCSetterAction.java:65) at ca.qc.ircm.proteus.webview.action.LocaleSetterAction.execute(LocaleSetterAction.java:74) at ca.qc.ircm.proteus.webview.action.CheckProjectAction.execute(CheckProjectAction.java:78) at ca.qc.ircm.proteus.webview.action.biologist.VerifyGuestDispatchAction.execute(VerifyGuestDispatchAction.java:51) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164) at ca.qc.ircm.proteus.webview.servlet.ProteusServlet.process(ProteusServlet.java:52) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Caused by: com.ibatis.common.jdbc.exception.NestedSQLException: --- The error occurred in ca/qc/ircm/proteus/persistence/dao/sqlmap/sql/Protocol.xml. --- The error occurred while applying a parameter map. --- Check the Protocol.getProtocolListByType-InlineParameterMap. --- Check the parameter mapping for the 'protocolType' property. --- Cause: java.lang.NullPointerException Caused by: 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 com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClientImpl.java:95) at com.ibatis.dao.client.template.SqlMapDaoTemplate.queryForList(SqlMapDaoTemplate.java:282) ... 40 more Caused by: java.lang.NullPointerException at com.ibatis.sqlmap.engine.type.UnknownTypeHandler.setParameter(UnknownTypeHandler.java:70) at com.ibatis.sqlmap.engine.mapping.parameter.BasicParameterMap.setParameter(BasicParameterMap.java:165) at com.ibatis.sqlmap.engine.mapping.parameter.BasicParameterMap.setParameters(BasicParameterMap.java:125) at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:181) at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteQuery(GeneralStatement.java:205) at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:173) ... 46 more -- 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