ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andrew.kitc...@kattare.com
Subject Re: Locale problems?
Date Wed, 21 Mar 2007 12:24:33 GMT
OK - i'll have a look later today. One other interesting thing is this -
if I remove the lastLogin column from the query and the resultMap I get
this error - which seems to show that lastLogin is a red herring:

====

com.ibatis.dao.client.DaoException: Failed to execute queryForObject -
id [getUserByEmailAddress], parameterObject [<emailaddress removed>]. 
Cause: com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in
uk/co/toydreams/shop/persistence/sqlmapdao/sql/User.xml.
--- The error occurred while applying a result map.
--- Check the User.userResult.
--- Check the result mapping for the 'activated' property.
--- Cause: com.ibatis.common.exception.NestedRuntimeException: Error
setting properties of 'BaseObject [107, null, null, null]'.  Cause:
java.text.ParseException: Unparseable date: "1975-01-15"
Caused by: java.text.ParseException: Unparseable date: "1975-01-15"
Caused by: com.ibatis.common.exception.NestedRuntimeException: Error
setting properties of 'BaseObject [107, null, null, null]'.  Cause:
java.text.ParseException: Unparseable date: "1975-01-15"
Caused by: java.text.ParseException: Unparseable date: "1975-01-15"
Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in
uk/co/toydreams/shop/persistence/sqlmapdao/sql/User.xml.
--- The error occurred while applying a result map.
--- Check the User.userResult.
--- Check the result mapping for the 'activated' property.
--- Cause: com.ibatis.common.exception.NestedRuntimeException: Error
setting properties of 'BaseObject [107, null, null, null]'.  Cause:
java.text.ParseException: Unparseable date: "1975-01-15"
Caused by: java.text.ParseException: Unparseable date: "1975-01-15"
Caused by: com.ibatis.common.exception.NestedRuntimeException: Error
setting properties of 'BaseObject [107, null, null, null]'.  Cause:
java.text.ParseException: Unparseable date: "1975-01-15"
Caused by: java.text.ParseException: Unparseable date: "1975-01-15"
	com.ibatis.dao.client.template.SqlMapDaoTemplate.queryForObject(SqlMapDaoTemplate.java:153)
	uk.co.toydreams.shop.persistence.sqlmapdao.UserSqlMapDao.getUserByEmailAddress(UserSqlMapDao.java:37)
	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	java.lang.reflect.Method.invoke(Method.java:585)
	com.ibatis.dao.engine.impl.DaoProxy.invoke(DaoProxy.java:61)
	$Proxy11.getUserByEmailAddress(Unknown Source)
	uk.co.toydreams.shop.service.UserService.getUserByEmailAddress(UserService.java:59)
	uk.co.toydreams.shop.actions.user.UserActivateAction.execute(UserActivateAction.java:64)
	org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
	org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
	org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
	org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

====

What could cause this? The resultMap isn't the cause as the same error
occurs if I use resultClass and map directly to my java object instead.

Thanks, Andrew






Quoting Graeme J Sweeney <ibatis.user@gjsweeney.com>:

> On Wed, 21 Mar 2007, andrew.kitchen@kattare.com wrote:
>
> > I think the two errors are unconnected. The unparseable 'date'
> shown is
> > from the dob column not the lastLogin column. I think that is a red
> > herring. I have no idea why 'lastLogin' is causing an issue as
> well.
>
> The value is from the dob column but iBatis, according to the error,
> is
> assigning it to the lastLogin paramater (?).
>
> I would turn on all the logging and check what java.sql.* is sending
> and
> receiving.
>
> Something like this in log4j:
>
> log4j.logger.java.sql.Connection=DEBUG
> log4j.logger.java.sql.Statement=DEBUG
> log4j.logger.java.sql.PreparedStatement=DEBUG
> log4j.logger.java.sql.ResultSet=DEBUG
>
> Can you confirm both servers are running the same MySQL version?
> Check for another MySQL connector on the classpath.
>
> --
> Graeme -
>


Mime
View raw message