Setting query parameters of type Date or Calendar fails

[] [] [] [] []

  1. Missing print parameters after upgradeSymptom After an upgrade from an SAP start release 4.7 or below to SAP ECC 6.0 or higher, the default settings for the user-specific print parameters for the ABAP list print are...

Symptom

You use a setParameter method call of the javax.persistence.Query API
to bind a parameter of type java.util.Date or java.util.Calendar.
Although you specify the TemporalType correctly, you get an IllegalArgumentException stating that the types of the parameter value to set and the type of the parameter in the query don’t match.
Other terms

JPA
Reason and Prerequisites

TemporalTypes are handled incorrectly in the SAP JPA implementation.
Solution

The problem is solved in 7.11 SP2 and later.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Leave a Comment