Community
Participate
Working Groups
>We get a (There is no English translation for this message.) for session.log(SessionLog.WARNING, SessionLog.SQL, "named_argument_not_found_in_query_parameters", new Object[]{field}); defined in TraceLocalizationResource >This is the place for FINE, FINER, FINEST - not WARNING { "named_argument_not_found_in_query_parameters", "Missing Query parameter for named argument: {0} 'null' will be substituted." }, >see bug # 325167 [EL Finest]: 2010-09-13 17:08:02.105--UnitOfWork(14463035)--Thread(Thread[main,5,main])--Execute query DataModifyQuery(sql="UPDATE DPAR_SCPROCUNIT SET STATE = 1, PENDINGSTATE = 1, ALU_VERSION = 4 WHERE ((PROCUNIT_ID = 47) AND (ALU_VERSION = 3) AND (PROCUNIT_ID IN (SELECT PROCUNIT_ID FROM #DPAR_SPROCUNIT)))") [EL Finer]: 2010-09-13 17:08:02.105--ClientSession(28441588)--Connection(27427682)--Thread(Thread[main,5,main])--begin transaction [EL Warning]: 2010-09-13 17:08:02.105--ClientSession(28441588)--Thread(Thread[main,5,main])--named_argument_not_found_in_query_parameters (There is no English translation for this message.) [EL Fine]: 2010-09-13 17:08:02.105--ClientSession(28441588)--Connection(27427682)--Thread(Thread[main,5,main])--UPDATE DPAR_SCPROCUNIT SET STATE = 1, PENDINGSTATE = 1, ALU_VERSION = 4 WHERE ((PROCUNIT_ID = 47) AND (ALU_VERSION = 3) AND (PROCUNIT_ID IN (SELECT PROCUNIT_ID FROM ?)))
[EL Warning]: 2010-09-14 14:51:03.222--ClientSession(20337504)--Thread(Thread[main,5,main])--named_argument_not_found_in_query_parameters (There is no English translation for this message.) <fixed message for bug# 325170 below> [EL Warning]: 2010-09-14 15:16:02.052--ClientSession(20796783)--Thread(Thread[main,5,main])--Missing Query parameter for named argument: DPAR_SPROCUNIT null will be substituted.
Created attachment 178865 [details] CallQueryMechanism native named argument warning in wrong resource >Use case is pre rev # 8100 private void nativeQuery() { Query aQuery = null; int version = 3; StringBuffer aBuffer = new StringBuffer(); aBuffer.append("UPDATE DPAR_SCPROCUNIT SET STATE = 1, PENDINGSTATE = 1, ALU_VERSION = "); aBuffer.append(version + 1); aBuffer.append(" WHERE ((PROCUNIT_ID = 47) AND (ALU_VERSION = "); aBuffer.append(version); aBuffer.append(") AND (PROCUNIT_ID IN "); aBuffer.append("(SELECT PROCUNIT_ID FROM #DPAR_SPROCUNIT)))"); try { aQuery = getEntityManager().createNativeQuery(aBuffer.toString()); // Convert to delegate when on EE container - otherwise just return same EE EM setEntityManager(JpaHelper.getEntityManager(getEntityManager())); JpaHelper.getDatabaseQuery(aQuery).setIsUserDefined(false); // If container managed TX - do not begin/end as SE if(JpaHelper.isEclipseLink(entityManagerFactory)) { getEntityManager().getTransaction().begin(); } aQuery.executeUpdate(); if(JpaHelper.isEclipseLink(entityManagerFactory)) { getEntityManager().getTransaction().commit(); } } catch (Exception e) { e.printStackTrace(); } }
>See SVN rev # 8185(minus CallQueryMechanism prelim change for parent bug # 325167) https://fisheye2.atlassian.com/changelog/eclipselink/?cs=8185
>This was resolved in the 2.1 stream previously by wrapping the id in a WarningLocalization.buildMessage() - no 2.1 backport necessary
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink