openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Georgi Naplatanov <go...@oles.biz>
Subject strange warning after upgrade OpenJPA from 1.2.0 to 2.0.1
Date Mon, 27 Sep 2010 11:53:44 GMT
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

Mime
View raw message