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 | 3 months ago
  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 | 3 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 ]
  2. 0

    JPQL IN clause with other parameter, using ordinal parameters

    Stack Overflow | 4 years ago | user1863307
    org.hibernate.QueryException: Named parameter does not appear in Query: 1 [FROM entity.Photo i WHERE i.User.idUser = ?1 AND i.idPhoto IN (:x20_, :x21_)] <java.lang.IllegalArgumentException: org.hibernate.QueryException: Named parameter does not appear in Query: 1 [FROM entity.Photo i WHERE i.User.idUser = ?1 AND i.idPhoto IN (:x20_, :x21_)]>java.lang.IllegalArgumentException: org.hibernate.QueryException: Named parameter does not appear in Query: 1 [FROM br.gov.sus.cadsus.entity.CadsusImagemFoto i WHERE i.cadsusFotografia.coSeqFotografia = ?1 AND i.coSeqImagem IN (:x20_, :x21_)]
  3. 0

    0013572: Maintain and print stacktraces when calls to setAdminMode and restoreAdminMode are unbalanced - Openbravo Issue Tracking System

    openbravo.com | 11 months ago
    org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [select ur from ADUserRoles ur where ur.userContact.id='0' and ur.active='Y' and ur.role.active='Y' order by ur.role.id asc]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    0013572: Maintain and print stacktraces when calls to setAdminMode and restoreAdminMode are unbalanced - Openbravo Issue Tracking System

    openbravo.com | 11 months ago
    org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [select ur from ADUserRoles ur where ur.userContact.id='0' and ur.active='Y' and ur.role.active='Y' order by ur.role.id asc]
  6. 0

    0013572: Maintain and print stacktraces when calls to setAdminMode and restoreAdminMode are unbalanced - Openbravo Issue Tracking System

    openbravo.com | 11 months ago
    org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [select ur from ADUserRoles ur where ur.userContact.id='0' and ur.active='Y' and ur.role.active='Y' order by ur.role.id asc]

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    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