ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brandon Goodin" <brandon.goo...@gmail.com>
Subject Re: Complex Properties problem
Date Sun, 14 Jan 2007 23:28:52 GMT
I would recommend you turn on the iBATIS logging and take a look at the SQL
that is being executed and the parameters being passed in at the time of
failure. It appears to be a problem with the SQL being executed for the
author property to be populated with a User object.

Brandon

On 1/14/07, Witold Bołt <ja@houp.info> wrote:
>
> Hi!
>
> I'm developing a simple Web app with Spring (2.0) and iBatis (2.2), and
> ... got one strange problem with so called complex properties.
>
> What I did was basically following the Developer guide (as on page 34,
> current stable version), and did:
>
> <sqlMap namespace="foo">
>      <resultMap id="User" class="foo.bar.User">
>          <result property="id" column="id"  />
>          <result property="login" column="login" />
>      </resultMap>
>
>      <resultMap id="Article" class="foo.bar.Article">
>          <result property="id" column="id"  />
>          <result property="author" column="user_id" select="getUser"/>
>          <result property="title" column="title"  />
>      </resultMap>
>
>      <select id="getUser" parameterClass="int"  resultMap="User">
>         SELECT id,login FROM user WHERE id = #value#
>      </select>
>
>      <select id="getArticle" parameterClass="int" resultMap="Article">
>         SELECT id,user_id,title FROM object WHERE id = #value#
>      </select>
> </sqlMap>
>
>
> User and Article classes are simple JavaBeans. Everything works without
> the select="getUser" in Article. I can get a selected User and Article.
> But I can not get them together. (I know that I could change this and do
> a select from two tables with some joins, but that is not the case - I
> want it the way it is.)
>
> When the code is used as it's shown here, the first SQL statment is
> passed to the database (MySQL 5), and the second is not. Instead a Null
> Pointer Exception arise:
>
> com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred in /org/kolor/cms/data/dao/ibatis/jcms-client.xml.
> --- The error occurred while applying a result map.
> --- Check the jcms-client.Article.
> --- Check the result mapping for the 'author' 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.executeQueryForObject
> (GeneralStatement.java:104)
>         at
> com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(
> SqlMapExecutorDelegate.java:566)
>         at
> com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(
> SqlMapExecutorDelegate.java:541)
>         at
> com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject(
> SqlMapSessionImpl.java:106)
>         at
> org.springframework.orm.ibatis.SqlMapClientTemplate$1.doInSqlMapClient(
> SqlMapClientTemplate.java:243)
>         at
> org.springframework.orm.ibatis.SqlMapClientTemplate.execute(
> SqlMapClientTemplate.java:193)
>         at
> org.springframework.orm.ibatis.SqlMapClientTemplate.queryForObject(
> SqlMapClientTemplate.java:241)
>         at
> org.kolor.cms.data.dao.ibatis.IbatisClientDao.getArticle(
> IbatisClientDao.java:18)
>         at
> org.kolor.cms.controler.ShowItemController.handleRequestInternal(
> ShowItemController.java:54)
> ...
>
> (full log info and stack trace in attachment).
>
> I'm sure that database is working well. The JDBC data source comes from
> the server (Apache Geronimo) database pool (and it's invoked through
> JNDI). And as I said - I can invoke getUser(1) alone, and getArticle(1)
> when this 'complex property' is removed.
>
> I've tried running in different modes with and without lazy init,
> enchencments modes and so on.
>
> How you got any idea what is wrong?
>
> If you need any more code I can send it here.
>
> Greetings,
> -me.
>
> --
> --==--==----------------------
>    Witold Bołt ::  ja@houp.info
> gsm#660316053 :: www.houp.info
>
>
> 2007-01-14 22:12:37,703 DEBUG [
> org.springframework.web.servlet.DispatcherServlet] - Testing handler map [
> org.springframework.web.servlet.handler.SimpleUrlHandlerMapping@5d7a8d] in
> DispatcherServlet with name 'jkolorcms'
> 2007-01-14 22:12:37,703 DEBUG [
> org.springframework.web.servlet.handler.SimpleUrlHandlerMapping] - Looking
> up handler for [/1]
> 2007-01-14 22:12:37,718 DEBUG [
> org.springframework.web.servlet.DispatcherServlet] - Testing handler
> adapter [
> org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter@a456bb]
> 2007-01-14 22:12:37,718 DEBUG [
> org.springframework.web.servlet.DispatcherServlet] - Testing handler
> adapter [
> org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter@2b3223]
> 2007-01-14 22:12:37,718 DEBUG [
> org.springframework.web.servlet.DispatcherServlet] - Last-Modified value
> for [/jKolorCMS/article/1] is [-1]
> 2007-01-14 22:12:37,734 DEBUG [
> org.springframework.web.servlet.DispatcherServlet] - DispatcherServlet
> with name 'jkolorcms' received request for [/jKolorCMS/article/1]
> 2007-01-14 22:12:37,750 DEBUG [
> org.springframework.web.servlet.DispatcherServlet] - Bound request context
> to thread: org.apache.catalina.connector.RequestFacade@e6f7a
> 2007-01-14 22:12:37,765 DEBUG [
> org.springframework.web.servlet.DispatcherServlet] - Testing handler
> adapter [
> org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter@a456bb]
> 2007-01-14 22:12:37,765 DEBUG [
> org.springframework.web.servlet.DispatcherServlet] - Testing handler
> adapter [
> org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter@2b3223]
> 2007-01-14 22:12:37,765 DEBUG [
> org.springframework.orm.ibatis.SqlMapClientTemplate] - Opened
> SqlMapSession [com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl@10e08e1]
> for iBATIS operation
> 2007-01-14 22:12:37,796 DEBUG [
> org.springframework.jdbc.datasource.DataSourceUtils] - Fetching JDBC
> Connection from DataSource
> 2007-01-14 22:12:37,812 DEBUG [java.sql.Connection] - {conn-100000}
> Connection
> 2007-01-14 22:12:37,812 DEBUG [
> org.springframework.orm.ibatis.SqlMapClientTemplate] - Obtained JDBC
> Connection [org.tranql.connector.jdbc.ConnectionHandle@be675c] for iBATIS
> operation
> 2007-01-14 22:12:37,843 DEBUG [java.sql.Connection] - {conn-100000}
> Preparing Statement:       SELECT id,user_id,title,summary,body,date FROM
> object WHERE id = ? AND deleted = 'false'
> 2007-01-14 22:12:40,453 DEBUG [java.sql.PreparedStatement] - {pstm-100001}
> Executing Statement:       SELECT id,user_id,title,summary,body,date FROM
> object WHERE id = ? AND deleted = 'false'
> 2007-01-14 22:12:40,468 DEBUG [java.sql.PreparedStatement] - {pstm-100001}
> Parameters: [1]
> 2007-01-14 22:12:40,468 DEBUG [java.sql.PreparedStatement] - {pstm-100001}
> Types: [java.lang.Integer]
> 2007-01-14 22:12:40,953 DEBUG [java.sql.ResultSet] - {rset-100002}
> ResultSet
> 2007-01-14 22:12:41,031 DEBUG [
> org.springframework.beans.factory.xml.PluggableSchemaResolver] - Loading
> schema mappings from [META-INF/spring.schemas]
> 2007-01-14 22:12:41,031 DEBUG [
> org.springframework.beans.factory.xml.PluggableSchemaResolver] - Loaded
> schema mappings: {
> http://www.springframework.org/schema/aop/spring-aop-2.0.xsd=org/springframework/aop/config/spring-aop-2.0.xsd,
>
> http://www.springframework.org/schema/util/spring-util.xsd=org/springframework/beans/factory/xml/spring-util-2.0.xsd,
>
> http://www.springframework.org/schema/util/spring-util-2.0.xsd=org/springframework/beans/factory/xml/spring-util-2.0.xsd,
>
> http://www.springframework.org/schema/jee/spring-jee.xsd=org/springframework/ejb/config/spring-jee-2.0.xsd,
>
> http://www.springframework.org/schema/beans/spring-beans.xsd=org/springframework/beans/factory/xml/spring-beans-2.0.xsd,
>
> http://www.springframework.org/schema/lang/spring-lang-2.0.xsd=org/springframework/scripting/config/spring-lang-2.0.xsd,
>
> http://www.springframework.org/schema/tx/spring-tx-2.0.xsd=org/springframework/transaction/config/spring-tx-2.0.xsd,
>
> http://www.springframework.org/schema/lang/spring-lang.xsd=org/springframework/scripting/config/spring-lang-2.0.xsd,
>
> http://www.springframework.org/schema/tool/spring-tool.xsd=org/springframework/beans/factory/xml/spring-tool-2.0.xsd,
>
> http://www.springframework.org/schema/aop/spring-aop.xsd=org/springframework/aop/config/spring-aop-2.0.xsd,
>
> http://www.springframework.org/schema/tx/spring-tx.xsd=org/springframework/transaction/config/spring-tx-2.0.xsd,
>
> http://www.springframework.org/schema/tool/spring-tool-2.0.xsd=org/springframework/beans/factory/xml/spring-tool-2.0.xsd,
>
> http://www.springframework.org/schema/jee/spring-jee-2.0.xsd=org/springframework/ejb/config/spring-jee-2.0.xsd,
>
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd=org/springframework/beans/factory/xml/spring-beans-2.0.xsd
> }
> 2007-01-14 22:12:41,046 INFO [
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loading
> XML bean definitions from class path resource
> [org/springframework/jdbc/support/sql-error-codes.xml]
> 2007-01-14 22:12:41,046 DEBUG [
> org.springframework.beans.factory.xml.DefaultDocumentLoader] - Using JAXP
> provider [org.apache.xerces.jaxp.DocumentBuilderFactoryImpl]
> 2007-01-14 22:12:41,062 DEBUG [
> org.springframework.beans.factory.xml.BeansDtdResolver] - Found beans DTD
> [http://www.springframework.org/dtd/spring-beans-2.0.dtd] in classpath:
> spring-beans-2.0.dtd
> 2007-01-14 22:12:41,078 DEBUG [
> org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver] -
> Loaded mappings [{
> http://www.springframework.org/schema/p=org.springframework.beans.factory.xml.SimplePropertyNamespaceHandler,
>
> http://www.springframework.org/schema/lang=org.springframework.scripting.config.LangNamespaceHandler,
>
> http://www.springframework.org/schema/jee=org.springframework.ejb.config.JeeNamespaceHandler,
>
> http://www.springframework.org/schema/aop=org.springframework.aop.config.AopNamespaceHandler,
>
> http://www.springframework.org/schema/util=org.springframework.beans.factory.xml.UtilNamespaceHandler,
>
> http://www.springframework.org/schema/tx=org.springframework.transaction.config.TxNamespaceHandler}
> ]
> 2007-01-14 22:12:41,078 DEBUG [org.springframework.util.ClassUtils] -
> Class [groovy.lang.GroovyObject] or one of its dependencies is not
> present: java.lang.ClassNotFoundException: groovy.lang.GroovyObject in
> classloader default/jKolorCMSEAR_jKolorCMS.war/1.0/car
> 2007-01-14 22:12:41,093 DEBUG [org.springframework.util.ClassUtils] -
> Class [org.jruby.IRuby] or one of its dependencies is not present:
> java.lang.ClassNotFoundException: org.jruby.IRuby in classloader
> default/jKolorCMSEAR_jKolorCMS.war/1.0/car
> 2007-01-14 22:12:41,093 DEBUG [org.springframework.util.ClassUtils] -
> Class [bsh.Interpreter] or one of its dependencies is not present:
> java.lang.ClassNotFoundException: bsh.Interpreter in classloader
> default/jKolorCMSEAR_jKolorCMS.war/1.0/car
> 2007-01-14 22:12:41,093 DEBUG [
> org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader]
> - Loading bean definitions
> 2007-01-14 22:12:41,109 DEBUG [
> org.springframework.beans.factory.support.DefaultListableBeanFactory] -
> Creating shared instance of singleton bean 'DB2'
> 2007-01-14 22:12:41,109 DEBUG [
> org.springframework.beans.factory.support.DefaultListableBeanFactory] -
> Creating instance of bean 'DB2' with merged definition [Root bean: class [
> org.springframework.jdbc.support.SQLErrorCodes]; scope=singleton;
> abstract=false; lazyInit=false; autowireCandidate=true; autowireMode=0;
> dependencyCheck=0; factoryBeanName=null; factoryMethodName=null;
> initMethodName=null; destroyMethodName=null; defined in class path resource
> [org/springframework/jdbc/support/sql-error-codes.xml]]
> 2007-01-14 22:12:41,125 DEBUG [
> org.springframework.beans.factory.support.DefaultListableBeanFactory] -
> Eagerly caching bean 'DB2' to allow for resolving potential circular
> references
> 2007-01-14 22:12:41,140 DEBUG [
> org.springframework.beans.factory.support.DefaultListableBeanFactory] -
> Creating shared instance of singleton bean 'Derby'
> 2007-01-14 22:12:41,140 DEBUG [
> org.springframework.beans.factory.support.DefaultListableBeanFactory] -
> Creating instance of bean 'Derby' with merged definition [Root bean: class [
> org.springframework.jdbc.support.SQLErrorCodes]; scope=singleton;
> abstract=false; lazyInit=false; autowireCandidate=true; autowireMode=0;
> dependencyCheck=0; factoryBeanName=null; factoryMethodName=null;
> initMethodName=null; destroyMethodName=null; defined in class path resource
> [org/springframework/jdbc/support/sql-error-codes.xml]]
> 2007-01-14 22:12:41,140 DEBUG [
> org.springframework.beans.factory.support.DefaultListableBeanFactory] -
> Eagerly caching bean 'Derby' to allow for resolving potential circular
> references
> 2007-01-14 22:12:41,156 DEBUG [
> org.springframework.beans.factory.support.DefaultListableBeanFactory] -
> Creating shared instance of singleton bean 'HSQL'
> 2007-01-14 22:12:41,156 DEBUG [
> org.springframework.beans.factory.support.DefaultListableBeanFactory] -
> Creating instance of bean 'HSQL' with merged definition [Root bean: class [
> org.springframework.jdbc.support.SQLErrorCodes]; scope=singleton;
> abstract=false; lazyInit=false; autowireCandidate=true; autowireMode=0;
> dependencyCheck=0; factoryBeanName=null; factoryMethodName=null;
> initMethodName=null; destroyMethodName=null; defined in class path resource
> [org/springframework/jdbc/support/sql-error-codes.xml]]
> 2007-01-14 22:12:41,156 DEBUG [
> org.springframework.beans.factory.support.DefaultListableBeanFactory] -
> Eagerly caching bean 'HSQL' to allow for resolving potential circular
> references
> 2007-01-14 22:12:41,171 DEBUG [
> org.springframework.beans.factory.support.DefaultListableBeanFactory] -
> Creating shared instance of singleton bean 'Informix'
> 2007-01-14 22:12:41,171 DEBUG [
> org.springframework.beans.factory.support.DefaultListableBeanFactory] -
> Creating instance of bean 'Informix' with merged definition [Root bean:
> class [org.springframework.jdbc.support.SQLErrorCodes]; scope=singleton;
> abstract=false; lazyInit=false; autowireCandidate=true; autowireMode=0;
> dependencyCheck=0; factoryBeanName=null; factoryMethodName=null;
> initMethodName=null; destroyMethodName=null; defined in class path resource
> [org/springframework/jdbc/support/sql-error-codes.xml]]
> 2007-01-14 22:12:41,171 DEBUG [
> org.springframework.beans.factory.support.DefaultListableBeanFactory] -
> Eagerly caching bean 'Informix' to allow for resolving potential circular
> references
> 2007-01-14 22:12:41,171 DEBUG [
> org.springframework.beans.factory.support.DefaultListableBeanFactory] -
> Creating shared instance of singleton bean 'MS-SQL'
> 2007-01-14 22:12:41,171 DEBUG [
> org.springframework.beans.factory.support.DefaultListableBeanFactory] -
> Creating instance of bean 'MS-SQL' with merged definition [Root bean: class
> [org.springframework.jdbc.support.SQLErrorCodes]; scope=singleton;
> abstract=false; lazyInit=false; autowireCandidate=true; autowireMode=0;
> dependencyCheck=0; factoryBeanName=null; factoryMethodName=null;
> initMethodName=null; destroyMethodName=null; defined in class path resource
> [org/springframework/jdbc/support/sql-error-codes.xml]]
> 2007-01-14 22:12:41,187 DEBUG [
> org.springframework.beans.factory.support.DefaultListableBeanFactory] -
> Eagerly caching bean 'MS-SQL' to allow for resolving potential circular
> references
> 2007-01-14 22:12:41,187 DEBUG [
> org.springframework.beans.factory.support.DefaultListableBeanFactory] -
> Creating shared instance of singleton bean 'MySQL'
> 2007-01-14 22:12:41,187 DEBUG [
> org.springframework.beans.factory.support.DefaultListableBeanFactory] -
> Creating instance of bean 'MySQL' with merged definition [Root bean: class [
> org.springframework.jdbc.support.SQLErrorCodes]; scope=singleton;
> abstract=false; lazyInit=false; autowireCandidate=true; autowireMode=0;
> dependencyCheck=0; factoryBeanName=null; factoryMethodName=null;
> initMethodName=null; destroyMethodName=null; defined in class path resource
> [org/springframework/jdbc/support/sql-error-codes.xml]]
> 2007-01-14 22:12:41,187 DEBUG [
> org.springframework.beans.factory.support.DefaultListableBeanFactory] -
> Eagerly caching bean 'MySQL' to allow for resolving potential circular
> references
> 2007-01-14 22:12:41,203 DEBUG [
> org.springframework.beans.factory.support.DefaultListableBeanFactory] -
> Creating shared instance of singleton bean 'Oracle'
> 2007-01-14 22:12:41,203 DEBUG [
> org.springframework.beans.factory.support.DefaultListableBeanFactory] -
> Creating instance of bean 'Oracle' with merged definition [Root bean: class
> [org.springframework.jdbc.support.SQLErrorCodes]; scope=singleton;
> abstract=false; lazyInit=false; autowireCandidate=true; autowireMode=0;
> dependencyCheck=0; factoryBeanName=null; factoryMethodName=null;
> initMethodName=null; destroyMethodName=null; defined in class path resource
> [org/springframework/jdbc/support/sql-error-codes.xml]]
> 2007-01-14 22:12:41,203 DEBUG [
> org.springframework.beans.factory.support.DefaultListableBeanFactory] -
> Eagerly caching bean 'Oracle' to allow for resolving potential circular
> references
> 2007-01-14 22:12:41,203 DEBUG [
> org.springframework.beans.factory.support.DefaultListableBeanFactory] -
> Creating shared instance of singleton bean 'PostgreSQL'
> 2007-01-14 22:12:41,203 DEBUG [
> org.springframework.beans.factory.support.DefaultListableBeanFactory] -
> Creating instance of bean 'PostgreSQL' with merged definition [Root bean:
> class [org.springframework.jdbc.support.SQLErrorCodes]; scope=singleton;
> abstract=false; lazyInit=false; autowireCandidate=true; autowireMode=0;
> dependencyCheck=0; factoryBeanName=null; factoryMethodName=null;
> initMethodName=null; destroyMethodName=null; defined in class path resource
> [org/springframework/jdbc/support/sql-error-codes.xml]]
> 2007-01-14 22:12:41,218 DEBUG [
> org.springframework.beans.factory.support.DefaultListableBeanFactory] -
> Eagerly caching bean 'PostgreSQL' to allow for resolving potential circular
> references
> 2007-01-14 22:12:41,218 DEBUG [
> org.springframework.beans.factory.support.DefaultListableBeanFactory] -
> Creating shared instance of singleton bean 'Sybase'
> 2007-01-14 22:12:41,218 DEBUG [
> org.springframework.beans.factory.support.DefaultListableBeanFactory] -
> Creating instance of bean 'Sybase' with merged definition [Root bean: class
> [org.springframework.jdbc.support.SQLErrorCodes]; scope=singleton;
> abstract=false; lazyInit=false; autowireCandidate=true; autowireMode=0;
> dependencyCheck=0; factoryBeanName=null; factoryMethodName=null;
> initMethodName=null; destroyMethodName=null; defined in class path resource
> [org/springframework/jdbc/support/sql-error-codes.xml]]
> 2007-01-14 22:12:41,218 DEBUG [
> org.springframework.beans.factory.support.DefaultListableBeanFactory] -
> Eagerly caching bean 'Sybase' to allow for resolving potential circular
> references
> 2007-01-14 22:12:41,234 INFO [
> org.springframework.jdbc.support.SQLErrorCodesFactory] - SQLErrorCodes
> loaded: [DB2, Derby, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL,
> Sybase]
> 2007-01-14 22:12:41,234 DEBUG [
> org.springframework.jdbc.support.SQLErrorCodesFactory] - Looking up
> default SQLErrorCodes for DataSource [
> org.tranql.connector.jdbc.DataSource@d5064b]
> 2007-01-14 22:12:41,250 DEBUG [
> org.springframework.jdbc.datasource.DataSourceUtils] - Fetching JDBC
> Connection from DataSource
> 2007-01-14 22:12:41,265 DEBUG [
> org.springframework.jdbc.datasource.DataSourceUtils] - Returning JDBC
> Connection to DataSource
> 2007-01-14 22:12:41,265 DEBUG [
> org.springframework.jdbc.support.SQLErrorCodesFactory] - Database product
> name cached for DataSource [org.tranql.connector.jdbc.DataSource@d5064b]:
> name is 'MySQL'
> 2007-01-14 22:12:41,265 DEBUG [
> org.springframework.jdbc.support.SQLErrorCodesFactory] - SQL error codes
> for 'MySQL' found
> 2007-01-14 22:12:41,265 DEBUG [
> org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator] -
> Unable to translate SQLException with Error code '0', will now try the
> fallback translator
> 2007-01-14 22:12:41,265 DEBUG [
> org.springframework.jdbc.datasource.DataSourceUtils] - Returning JDBC
> Connection to DataSource
> 2007-01-14 22:12:41,281 DEBUG [
> org.springframework.web.servlet.DispatcherServlet] - Cleared thread-bound
> request context: org.apache.catalina.connector.RequestFacade@e6f7a
> 2007-01-14 22:12:41,281 DEBUG [
> org.springframework.web.servlet.DispatcherServlet] - Could not complete
> request
> org.springframework.jdbc.UncategorizedSQLException: SqlMapClient
> operation; uncategorized SQLException for SQL []; SQL state [null]; error
> code [0];
> --- The error occurred in /org/kolor/cms/data/dao/ibatis/jcms-client.xml.
> --- The error occurred while applying a result map.
> --- Check the jcms-client.Article.
> --- Check the result mapping for the 'author' property.
> --- Cause: java.lang.NullPointerException; nested exception is
> com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred in /org/kolor/cms/data/dao/ibatis/jcms-client.xml.
> --- The error occurred while applying a result map.
> --- Check the jcms-client.Article.
> --- Check the result mapping for the 'author' property.
> --- Cause: java.lang.NullPointerException
> Caused by:
> com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred in /org/kolor/cms/data/dao/ibatis/jcms-client.xml.
> --- The error occurred while applying a result map.
> --- Check the jcms-client.Article.
> --- Check the result mapping for the 'author' 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.executeQueryForObject
> (GeneralStatement.java:104)
>     at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject
> (SqlMapExecutorDelegate.java:566)
>     at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject
> (SqlMapExecutorDelegate.java:541)
>     at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject(
> SqlMapSessionImpl.java:106)
>     at
> org.springframework.orm.ibatis.SqlMapClientTemplate$1.doInSqlMapClient(
> SqlMapClientTemplate.java:243)
>     at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(
> SqlMapClientTemplate.java:193)
>     at org.springframework.orm.ibatis.SqlMapClientTemplate.queryForObject(
> SqlMapClientTemplate.java:241)
>     at org.kolor.cms.data.dao.ibatis.IbatisClientDao.getArticle(
> IbatisClientDao.java:18)
>     at org.kolor.cms.controler.ShowItemController.handleRequestInternal(
> ShowItemController.java:54)
>     at
> org.springframework.web.servlet.mvc.AbstractController.handleRequest(
> AbstractController.java:153)
>     at
> org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(
> SimpleControllerHandlerAdapter.java:45)
>     at org.springframework.web.servlet.DispatcherServlet.doDispatch(
> DispatcherServlet.java:820)
>     at org.springframework.web.servlet.DispatcherServlet.doService(
> DispatcherServlet.java:755)
>     at org.springframework.web.servlet.FrameworkServlet.processRequest(
> FrameworkServlet.java:396)
>     at org.springframework.web.servlet.FrameworkServlet.doGet(
> FrameworkServlet.java:350)
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
>     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.geronimo.tomcat.valve.DefaultSubjectValve.invoke(
> DefaultSubjectValve.java:56)
>     at
> org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke
> (GeronimoStandardContext.java:342)
>     at org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(
> GeronimoBeforeAfterValve.java:31)
>     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.valves.AccessLogValve.invoke(
> AccessLogValve.java:541)
>     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:667)
>     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(Unknown Source)
> Caused by: java.lang.NullPointerException
>     at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.endTransaction
> (SqlMapExecutorDelegate.java:782)
>     at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.endTransaction(
> SqlMapSessionImpl.java:176)
>     at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.endTransaction(
> SqlMapClientImpl.java:154)
>     at
> com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.autoEndTransaction(
> SqlMapExecutorDelegate.java:883)
>     at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject
> (SqlMapExecutorDelegate.java:573)
>     at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject
> (SqlMapExecutorDelegate.java:541)
>     at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject(
> SqlMapSessionImpl.java:106)
>     at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForObject(
> SqlMapClientImpl.java:83)
>     at
> com.ibatis.sqlmap.engine.mapping.result.loader.ResultLoader.getResult(
> ResultLoader.java:77)
>     at
> com.ibatis.sqlmap.engine.mapping.result.loader.ResultLoader.loadResult(
> ResultLoader.java:59)
>     at
> com.ibatis.sqlmap.engine.mapping.result.BasicResultMap.getNestedSelectMappingValue
> (BasicResultMap.java:502)
>     at com.ibatis.sqlmap.engine.mapping.result.BasicResultMap.getResults(
> BasicResultMap.java:340)
>     at com.ibatis.sqlmap.engine.execution.SqlExecutor.handleResults(
> SqlExecutor.java:381)
>     at
> com.ibatis.sqlmap.engine.execution.SqlExecutor.handleMultipleResults(
> SqlExecutor.java:301)
>     at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(
> SqlExecutor.java:190)
>     at
> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteQuery
> (GeneralStatement.java:205)
>     at
> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback
> (GeneralStatement.java:173)
>     ... 35 more
> 2007-01-14 22:12:41,296 DEBUG [
> org.springframework.web.context.support.XmlWebApplicationContext] -
> Publishing event in context [WebApplicationContext for namespace
> 'jkolorcms-servlet']: ServletRequestHandledEvent:
> url=[/jKolorCMS/article/1]; client=[127.0.0.1]; method=[GET];
> servlet=[jkolorcms]; session=[null]; user=[null]; time=[3562ms];
> status=[failed: org.springframework.jdbc.UncategorizedSQLException:
> SqlMapClient operation; uncategorized SQLException for SQL []; SQL state
> [null]; error code [0];
> --- The error occurred in /org/kolor/cms/data/dao/ibatis/jcms-client.xml.
> --- The error occurred while applying a result map.
> --- Check the jcms-client.Article.
> --- Check the result mapping for the 'author' property.
> --- Cause: java.lang.NullPointerException; nested exception is
> com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred in /org/kolor/cms/data/dao/ibatis/jcms-client.xml.
> --- The error occurred while applying a result map.
> --- Check the jcms-client.Article.
> --- Check the result mapping for the 'author' property.
> --- Cause: java.lang.NullPointerException]
> 2007-01-14 22:12:41,296 ERROR [org.apache.catalina.core.ContainerBase.[Geronimo].[localhost].[/jKolorCMS].[jkolorcms]]
> - Servlet.service() for servlet jkolorcms threw exception
> com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred in /org/kolor/cms/data/dao/ibatis/jcms-client.xml.
> --- The error occurred while applying a result map.
> --- Check the jcms-client.Article.
> --- Check the result mapping for the 'author' 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.executeQueryForObject
> (GeneralStatement.java:104)
>     at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject
> (SqlMapExecutorDelegate.java:566)
>     at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject
> (SqlMapExecutorDelegate.java:541)
>     at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject(
> SqlMapSessionImpl.java:106)
>     at
> org.springframework.orm.ibatis.SqlMapClientTemplate$1.doInSqlMapClient(
> SqlMapClientTemplate.java:243)
>     at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(
> SqlMapClientTemplate.java:193)
>     at org.springframework.orm.ibatis.SqlMapClientTemplate.queryForObject(
> SqlMapClientTemplate.java:241)
>     at org.kolor.cms.data.dao.ibatis.IbatisClientDao.getArticle(
> IbatisClientDao.java:18)
>     at org.kolor.cms.controler.ShowItemController.handleRequestInternal(
> ShowItemController.java:54)
>     at
> org.springframework.web.servlet.mvc.AbstractController.handleRequest(
> AbstractController.java:153)
>     at
> org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(
> SimpleControllerHandlerAdapter.java:45)
>     at org.springframework.web.servlet.DispatcherServlet.doDispatch(
> DispatcherServlet.java:820)
>     at org.springframework.web.servlet.DispatcherServlet.doService(
> DispatcherServlet.java:755)
>     at org.springframework.web.servlet.FrameworkServlet.processRequest(
> FrameworkServlet.java:396)
>     at org.springframework.web.servlet.FrameworkServlet.doGet(
> FrameworkServlet.java:350)
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
>     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.geronimo.tomcat.valve.DefaultSubjectValve.invoke(
> DefaultSubjectValve.java:56)
>     at
> org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke
> (GeronimoStandardContext.java:342)
>     at org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(
> GeronimoBeforeAfterValve.java:31)
>     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.valves.AccessLogValve.invoke(
> AccessLogValve.java:541)
>     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:667)
>     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(Unknown Source)
> Caused by: java.lang.NullPointerException
>     at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.endTransaction
> (SqlMapExecutorDelegate.java:782)
>     at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.endTransaction(
> SqlMapSessionImpl.java:176)
>     at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.endTransaction(
> SqlMapClientImpl.java:154)
>     at
> com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.autoEndTransaction(
> SqlMapExecutorDelegate.java:883)
>     at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject
> (SqlMapExecutorDelegate.java:573)
>     at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject
> (SqlMapExecutorDelegate.java:541)
>     at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject(
> SqlMapSessionImpl.java:106)
>     at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForObject(
> SqlMapClientImpl.java:83)
>     at
> com.ibatis.sqlmap.engine.mapping.result.loader.ResultLoader.getResult(
> ResultLoader.java:77)
>     at
> com.ibatis.sqlmap.engine.mapping.result.loader.ResultLoader.loadResult(
> ResultLoader.java:59)
>     at
> com.ibatis.sqlmap.engine.mapping.result.BasicResultMap.getNestedSelectMappingValue
> (BasicResultMap.java:502)
>     at com.ibatis.sqlmap.engine.mapping.result.BasicResultMap.getResults(
> BasicResultMap.java:340)
>     at com.ibatis.sqlmap.engine.execution.SqlExecutor.handleResults(
> SqlExecutor.java:381)
>     at
> com.ibatis.sqlmap.engine.execution.SqlExecutor.handleMultipleResults(
> SqlExecutor.java:301)
>     at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(
> SqlExecutor.java:190)
>     at
> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteQuery
> (GeneralStatement.java:205)
>     at
> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback
> (GeneralStatement.java:173)
>     ... 35 more
>
>
>
Mime
View raw message