ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zsolt Koppany" <zkoppanyl...@intland.com>
Subject RE: Strange NullPointerException
Date Tue, 06 Mar 2007 18:25:43 GMT
I know what causes the problem.

trackerItemDto.modifiedAt is java.util.Date but the value stored into
trackerItemDto.modifiedAt is a sub-class of java.util.Date.

How can I fix the issue.

I use ibatis-2.1.7.597.

Zsolt 

> -----Original Message-----
> From: Grigoras, Vasile [mailto:vgrigoras@Infomedics.com]
> Sent: Tuesday, March 06, 2007 4:03 PM
> To: user-java@ibatis.apache.org
> Subject: RE: Strange NullPointerException
> 
> Is it this just a typo?
>   modified_by=#modifier.id#
> 
> 
> -----Original Message-----
> From: Zsolt Koppany [mailto:zkoppanylist@intland.com]
> Sent: Tuesday, March 06, 2007 6:20 AM
> To: user-java@ibatis.apache.org
> Subject: Strange NullPointerException
> 
> 
> Hi,
> 
> I use ibatis-2.1.7.597 and get a NPE (attached to the end) for the block
> below:
> 
>   <update id="updateTrackerItemAsModified"
> parameterClass="trackerItemDto">
> 	UPDATE task SET indexed=NULL
> 	  	<isNotNull property="modifiedAt">
> 			,modified_at=#modifiedAt#
> 	  	</isNotNull>
> 	  	<isNotNull property="modifier">
> 			,modified_by=#modifier.id#
> 	  	</isNotNull>
> 	  	<isNotNull property="noOfAttachments">
> 	  		,nr_of_attachments=#noOfAttachments#
> 	  	</isNotNull>
> 		WHERE
> 		  id = #id#
>   </update>
> 
> How is that possible?
> 
> 2007-03-06 01:59:59,391 ERROR dao.impl.ScmChangeSetDaoImpl     - iBATIS
> exception [DefaultQuartzScheduler_Worker-2]
> com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred while applying a parameter map.
> --- Check the updateTrackerItemAsModified-InlineParameterMap.
> --- Check the parameter mapping for the 'modifiedAt' property.
> --- Cause: java.lang.NullPointerException
> Caused by: java.lang.NullPointerException
> 	at
> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(
> Ge
> neralStatement.java:94)
> 	at
> com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.update(SqlMapExecutor
> De
> legate.java:500)
> 	at
> com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.update(SqlMapSessionImpl.j
> av
> a:85)
> 	at
> com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.update(SqlMapClientImpl.jav
> a:
> 62)
> 	at
> cv.persistence.util.SqlMapClientWrapper.update(SqlMapClientWrapper.java:36
> 4)
> 	at
> cv.persistence.dao.impl.ScmChangeSetDaoImpl.create(ScmChangeSetDaoImpl.jav
> a:
> 136)
> 	at
> cv.manager.ScmProjectManager$1PersistorScmChangeLogHandler.persist(ScmProj
> ec
> tManager.java:360)
> 	at
> cv.manager.ScmProjectManager.scanChangeLog(ScmProjectManager.java:391)
> 	at
> cv.servlet.admin.ProjectSync.synychronizeWithScm(ProjectSync.java:131)
> 	at cv.servlet.admin.ProjectSync.projectSync(ProjectSync.java:162)
> 	at cv.servlet.build.AntBuilder.build(AntBuilder.java:90)
> 	at
> cv.servlet.build.BackgroundBuildTimerTask.process(BackgroundBuildTimerTask
> .j
> ava:95)
> 	at
> cv.servlet.build.BackgroundBuildTimerTask.execute(BackgroundBuildTimerTask
> .j
> ava:49)
> 	at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
> 	at
> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:5
> 20
> )
> Caused by: java.lang.NullPointerException
> 
> Zsolt
> 
> Zsolt



Mime
View raw message