org.hibernate.QueryException: Named parameter does not appear in Query: staffs141_ [select distinct cs.CAPPLAN_SET_ID, cs.CAPPLAN_SET_NAME, ce.capplan_edition_id, fs.forecast_site_id,fs.site_name, sg.STAFF_GROUP_ID, sg. STAFF_GROUP_NAME , st.staff_type_id, st.staff_type_name,ce.IS_WORKING_EDITION from CAPPLAN_SETS cs , forecast_sites fs, staff_types st, staff_groups sg, forecast_groups fg, capplan_editions ce, capplans cp, edition_status_master esm where fs.FORECAST_SITE_ID = sg.FORECAST_SITE_ID and sg.staff_type_id = st.staff_type_id and sg.STAFF_GROUP_ID = fg.STAFF_GROUP_ID and fg.CAPPLAN_SET_ID = cs.CAPPLAN_SET_ID and cs.CAPPLAN_SET_ID = cp.CAPPLAN_SET_ID and cp.CAPPLAN_ID = ce.CAPPLAN_ID and cs.IS_ACTIVE ='Y' and ce.IS_WORKING_EDITION = 'Y' and ce.EDITION_STATUS_ID = esm.EDITION_STATUS_ID and esm.EDITION_STATUS_NAME not in ('What-if', 'Contingency','New') AND ce.mapping_effective_date BETWEEN NVL(fs.effective_start_date,ce.mapping_effective_date) AND NVL(fs.effective_end_date,ce.mapping_effective_date) AND ce.mapping_effective_date BETWEEN NVL(sg.effective_start_date,ce.mapping_effective_date) AND NVL(sg.effective_end_date,ce.mapping_effective_date) AND ce.mapping_effective_date BETWEEN NVL(fg.effective_start_date,ce.mapping_effective_date) AND NVL(fg.effective_end_date,ce.mapping_effective_date) AND ce.mapping_effective_date BETWEEN NVL(st.effective_start_date,ce.mapping_effective_date) AND NVL(st.effective_end_date,ce.mapping_effective_date) AND cs.capplan_set_id in ( ? ? ? ? and fg.STAFF_GROUP_ID in ( ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? order by cs.CAPPLAN_SET_NAME,ce.capplan_edition_id desc, fs.site_name, st.staff_type_name ]

Hibernate JIRA | Nauman Bashir | 9 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    We are seeing intermittent Hibernate errors in our production environment (Web Logic Instances): Error 1: org.hibernate.QueryException: Named parameter does not appear in Query Error 2: java.lang.IllegalArgumentException: org.hibernate.QueryParameterException: could not locate named parameter [] The problem goes away after restarting the Web Logic instance. - We use Native SQL with Named Parameters - Database is Oracle 12c - Application Server: Web Logic 12c Example SQL Error: org.hibernate.QueryException: Named parameter does not appear in Query: staffs141_ [select distinct cs.CAPPLAN_SET_ID, cs.CAPPLAN_SET_NAME, ce.capplan_edition_id, fs.forecast_site_id,fs.site_name, sg.STAFF_GROUP_ID, sg. STAFF_GROUP_NAME , st.staff_type_id, st.staff_type_name,ce.IS_WORKING_EDITION from CAPPLAN_SETS cs , forecast_sites fs, staff_types st, staff_groups sg, forecast_groups fg, capplan_editions ce, capplans cp, edition_status_master esm where fs.FORECAST_SITE_ID = sg.FORECAST_SITE_ID and sg.staff_type_id = st.staff_type_id and sg.STAFF_GROUP_ID = fg.STAFF_GROUP_ID and fg.CAPPLAN_SET_ID = cs.CAPPLAN_SET_ID and cs.CAPPLAN_SET_ID = cp.CAPPLAN_SET_ID and cp.CAPPLAN_ID = ce.CAPPLAN_ID and cs.IS_ACTIVE ='Y' and ce.IS_WORKING_EDITION = 'Y' and ce.EDITION_STATUS_ID = esm.EDITION_STATUS_ID and esm.EDITION_STATUS_NAME not in ('What-if', 'Contingency','New') AND ce.mapping_effective_date BETWEEN NVL(fs.effective_start_date,ce.mapping_effective_date) AND NVL(fs.effective_end_date,ce.mapping_effective_date) AND ce.mapping_effective_date BETWEEN NVL(sg.effective_start_date,ce.mapping_effective_date) AND NVL(sg.effective_end_date,ce.mapping_effective_date) AND ce.mapping_effective_date BETWEEN NVL(fg.effective_start_date,ce.mapping_effective_date) AND NVL(fg.effective_end_date,ce.mapping_effective_date) AND ce.mapping_effective_date BETWEEN NVL(st.effective_start_date,ce.mapping_effective_date) AND NVL(st.effective_end_date,ce.mapping_effective_date) AND cs.capplan_set_id in ( ? ? ? ? and fg.STAFF_GROUP_ID in ( ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? order by cs.CAPPLAN_SET_NAME,ce.capplan_edition_id desc, fs.site_name, st.staff_type_name ] at org.hibernate.loader.custom.CustomLoader.getNamedParameterLocs(CustomLoader.java:379) at org.hibernate.loader.Loader.bindNamedParameters(Loader.java:1769) at org.hibernate.loader.Loader.bindParameterValues(Loader.java:1704) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259) at org.hibernate.loader.Loader.doList(Loader.java:2232) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2129) at org.hibernate.loader.Loader.list(Loader.java:2124) at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:312) at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1723) at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:165) at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:175)

    Hibernate JIRA | 9 months ago | Nauman Bashir
    org.hibernate.QueryException: Named parameter does not appear in Query: staffs141_ [select distinct cs.CAPPLAN_SET_ID, cs.CAPPLAN_SET_NAME, ce.capplan_edition_id, fs.forecast_site_id,fs.site_name, sg.STAFF_GROUP_ID, sg. STAFF_GROUP_NAME , st.staff_type_id, st.staff_type_name,ce.IS_WORKING_EDITION from CAPPLAN_SETS cs , forecast_sites fs, staff_types st, staff_groups sg, forecast_groups fg, capplan_editions ce, capplans cp, edition_status_master esm where fs.FORECAST_SITE_ID = sg.FORECAST_SITE_ID and sg.staff_type_id = st.staff_type_id and sg.STAFF_GROUP_ID = fg.STAFF_GROUP_ID and fg.CAPPLAN_SET_ID = cs.CAPPLAN_SET_ID and cs.CAPPLAN_SET_ID = cp.CAPPLAN_SET_ID and cp.CAPPLAN_ID = ce.CAPPLAN_ID and cs.IS_ACTIVE ='Y' and ce.IS_WORKING_EDITION = 'Y' and ce.EDITION_STATUS_ID = esm.EDITION_STATUS_ID and esm.EDITION_STATUS_NAME not in ('What-if', 'Contingency','New') AND ce.mapping_effective_date BETWEEN NVL(fs.effective_start_date,ce.mapping_effective_date) AND NVL(fs.effective_end_date,ce.mapping_effective_date) AND ce.mapping_effective_date BETWEEN NVL(sg.effective_start_date,ce.mapping_effective_date) AND NVL(sg.effective_end_date,ce.mapping_effective_date) AND ce.mapping_effective_date BETWEEN NVL(fg.effective_start_date,ce.mapping_effective_date) AND NVL(fg.effective_end_date,ce.mapping_effective_date) AND ce.mapping_effective_date BETWEEN NVL(st.effective_start_date,ce.mapping_effective_date) AND NVL(st.effective_end_date,ce.mapping_effective_date) AND cs.capplan_set_id in ( ? ? ? ? and fg.STAFF_GROUP_ID in ( ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? order by cs.CAPPLAN_SET_NAME,ce.capplan_edition_id desc, fs.site_name, st.staff_type_name ]

    Root Cause Analysis

    1. org.hibernate.QueryException

      Named parameter does not appear in Query: staffs141_ [select distinct cs.CAPPLAN_SET_ID, cs.CAPPLAN_SET_NAME, ce.capplan_edition_id, fs.forecast_site_id,fs.site_name, sg.STAFF_GROUP_ID, sg. STAFF_GROUP_NAME , st.staff_type_id, st.staff_type_name,ce.IS_WORKING_EDITION from CAPPLAN_SETS cs , forecast_sites fs, staff_types st, staff_groups sg, forecast_groups fg, capplan_editions ce, capplans cp, edition_status_master esm where fs.FORECAST_SITE_ID = sg.FORECAST_SITE_ID and sg.staff_type_id = st.staff_type_id and sg.STAFF_GROUP_ID = fg.STAFF_GROUP_ID and fg.CAPPLAN_SET_ID = cs.CAPPLAN_SET_ID and cs.CAPPLAN_SET_ID = cp.CAPPLAN_SET_ID and cp.CAPPLAN_ID = ce.CAPPLAN_ID and cs.IS_ACTIVE ='Y' and ce.IS_WORKING_EDITION = 'Y' and ce.EDITION_STATUS_ID = esm.EDITION_STATUS_ID and esm.EDITION_STATUS_NAME not in ('What-if', 'Contingency','New') AND ce.mapping_effective_date BETWEEN NVL(fs.effective_start_date,ce.mapping_effective_date) AND NVL(fs.effective_end_date,ce.mapping_effective_date) AND ce.mapping_effective_date BETWEEN NVL(sg.effective_start_date,ce.mapping_effective_date) AND NVL(sg.effective_end_date,ce.mapping_effective_date) AND ce.mapping_effective_date BETWEEN NVL(fg.effective_start_date,ce.mapping_effective_date) AND NVL(fg.effective_end_date,ce.mapping_effective_date) AND ce.mapping_effective_date BETWEEN NVL(st.effective_start_date,ce.mapping_effective_date) AND NVL(st.effective_end_date,ce.mapping_effective_date) AND cs.capplan_set_id in ( ? ? ? ? and fg.STAFF_GROUP_ID in ( ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? order by cs.CAPPLAN_SET_NAME,ce.capplan_edition_id desc, fs.site_name, st.staff_type_name ]

      at org.hibernate.loader.custom.CustomLoader.getNamedParameterLocs()
    2. Hibernate
      CustomLoader.list
      1. org.hibernate.loader.custom.CustomLoader.getNamedParameterLocs(CustomLoader.java:379)
      2. org.hibernate.loader.Loader.bindNamedParameters(Loader.java:1769)
      3. org.hibernate.loader.Loader.bindParameterValues(Loader.java:1704)
      4. org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
      5. org.hibernate.loader.Loader.doList(Loader.java:2232)
      6. org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2129)
      7. org.hibernate.loader.Loader.list(Loader.java:2124)
      8. org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:312)
      8 frames
    3. Hibernate
      SQLQueryImpl.list
      1. org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1723)
      2. org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:165)
      3. org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:175)
      3 frames