Hi Eric.

You are right. I replaced OpenJPA 2.0.1 with 2.1.0-snapshot and warning message is gone.

Thank you.

Best regards
Georgi

Eric Charles wrote:
Hi,
May be related to this thread?
http://markmail.org/message/u3flgv3yux7djg6i
Tks,
Eric


On 27/09/2010 13:53, Georgi Naplatanov wrote:
Hello list.

I have following warning after upgrading of OpenJPA From 1.2.0 to 2.0.1

6509 OpenCmsJPAPool WARN [main] openjpa.Runtime - Supplied user parameters "[1, 2, 3]" do not match expected parameters "[1, 3]" for the prepared query "PreparedQuery: [SELECT T_CmsDAOGroups, T_CmsDAOGroupUsers FROM CmsDAOGroups T_CmsDAOGroups, CmsDAOGroupUsers T_CmsDAOGroupUsers WHERE T_CmsDAOGroupUsers.m_userId=?1 AND T_CmsDAOGroups.m_groupId=T_CmsDAOGroupUsers.m_groupId AND T_CmsDAOGroups.m_groupOu LIKE ?2 AND T_CmsDAOGroups.m_groupFlags >= ?3 ORDER BY T_CmsDAOGroups.m_groupOu, T_CmsDAOGroups.m_groupName] --> [SELECT t1.group_id, t0.group_id, t0.user_id, t1.group_ou, t1.group_name FROM public.cms_groupusers t0, public.cms_groups t1 WHERE (t0.user_id = ? AND t1.group_id = t0.group_id AND t1.group_ou LIKE ? ESCAPE '\\' AND t1.group_flags >= ?) ORDER BY t1.group_ou ASC, t1.group_name ASC]".

I checked and query parameters type match.

It is the java code :

        Query q = .............. ;

            q.setParameter(1, userId.toString()); // string
            q.setParameter(2, ouFqnParam); // string
            q.setParameter(3, I_CmsPrincipal.FLAG_GROUP_ROLE); // int

What is wrong ?

TIA

Best regards
Georgi


Reply via email to