MyBatis version

3.3.1

Database vendor and version

SQL Server 2014

Test case or example project

Immutable POJO's with java.util.Date variables which are initialized using constructors.

Steps to reproduce

Use constructors, select expects java.sql.TimeStamp and doesn't work with java.util.Date

Expected result

Create an object with valid dates

Actual result

Throws exception saying constructor not found with given signature.

Comment From: jeffgbutler

Try adding the @AutomapConstructor annotation to the constructor.

Comment From: kazuki43zoo

@jeffgbutler Thanks for your comment!! @AutomapConstructor works fine!!

Comment From: sahil-ag

Sorry for the late reply - While @AutomapConstructor does work, I cant edit class code. So, for now I am using javaType="java.util.Date" typeHandler="org.apache.ibatis.type.DateTypeHandler"

Comment From: kazuki43zoo

This issue fix via #1277 (3.5.0).