java.lang.IllegalArgumentException: Invalid filter-parameter name format

Hibernate JIRA | Tomas Hradec | 6 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Hi, I am getting exception when executing following code: {code} @Entity @FilterDef(name="personIsActiveFilter", defaultCondition="active = 1") public class Person { @Id Long id; String name; boolean active; } ... session.enableFilter("personIsActiveFilter"); session.createQuery("from Person p where p.name = ':abc'").list(); {code} Stack trace is the following: {code} java.lang.IllegalArgumentException: Invalid filter-parameter name format at org.hibernate.engine.LoadQueryInfluencers.parseFilterParameterName(LoadQueryInfluencers.java:162) at org.hibernate.engine.QueryParameters.processFilters(QueryParameters.java:485) at org.hibernate.engine.QueryParameters.processFilters(QueryParameters.java:458) at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1669) at org.hibernate.loader.Loader.doQuery(Loader.java:801) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274) at org.hibernate.loader.Loader.doList(Loader.java:2533) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276) at org.hibernate.loader.Loader.list(Loader.java:2271) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:452) at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363) at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102) {code} I can´t use named query parameter because whole where clause is built in another part of application.

    Hibernate JIRA | 6 years ago | Tomas Hradec
    java.lang.IllegalArgumentException: Invalid filter-parameter name format
  2. 0

    Hi, I am getting exception when executing following code: {code} @Entity @FilterDef(name="personIsActiveFilter", defaultCondition="active = 1") public class Person { @Id Long id; String name; boolean active; } ... session.enableFilter("personIsActiveFilter"); session.createQuery("from Person p where p.name = ':abc'").list(); {code} Stack trace is the following: {code} java.lang.IllegalArgumentException: Invalid filter-parameter name format at org.hibernate.engine.LoadQueryInfluencers.parseFilterParameterName(LoadQueryInfluencers.java:162) at org.hibernate.engine.QueryParameters.processFilters(QueryParameters.java:485) at org.hibernate.engine.QueryParameters.processFilters(QueryParameters.java:458) at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1669) at org.hibernate.loader.Loader.doQuery(Loader.java:801) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274) at org.hibernate.loader.Loader.doList(Loader.java:2533) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276) at org.hibernate.loader.Loader.list(Loader.java:2271) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:452) at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363) at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102) {code} I can´t use named query parameter because whole where clause is built in another part of application.

    Hibernate JIRA | 6 years ago | Tomas Hradec
    java.lang.IllegalArgumentException: Invalid filter-parameter name format
  3. 0

    On Oracle you can do this: SELECT object.ID FROM TABLE object FOR UPDATE OF object.ID giving you back the id and locking lines. But with Hibernate it's not working. Query q = session.createQuery("SELECT object.ID FROM TABLE object"); q.setLockMode("object",LockMode.UPGRADE); q.list(); This code generate the following error: Exception in thread "Thread-0" java.lang.IllegalArgumentException: alias not found: obj at org.hibernate.loader.hql.QueryLoader.applyLocks(QueryLoader.java:299) at org.hibernate.loader.Loader.preprocessSQL(Loader.java:189) at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1552) at org.hibernate.loader.Loader.doQuery(Loader.java:661) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224) at org.hibernate.loader.Loader.doList(Loader.java:2145) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029) at org.hibernate.loader.Loader.list(Loader.java:2024) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375) at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:308) at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:153) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1106) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) What's working actually : Query q = session.createQuery("SELECT object FROM TABLE object"); q.setLockMode("object",LockMode.UPGRADE); q.list();

    Hibernate JIRA | 1 decade ago | vision matford
    java.lang.IllegalArgumentException: alias not found: obj
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    On Oracle you can do this: SELECT object.ID FROM TABLE object FOR UPDATE OF object.ID giving you back the id and locking lines. But with Hibernate it's not working. Query q = session.createQuery("SELECT object.ID FROM TABLE object"); q.setLockMode("object",LockMode.UPGRADE); q.list(); This code generate the following error: Exception in thread "Thread-0" java.lang.IllegalArgumentException: alias not found: obj at org.hibernate.loader.hql.QueryLoader.applyLocks(QueryLoader.java:299) at org.hibernate.loader.Loader.preprocessSQL(Loader.java:189) at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1552) at org.hibernate.loader.Loader.doQuery(Loader.java:661) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224) at org.hibernate.loader.Loader.doList(Loader.java:2145) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029) at org.hibernate.loader.Loader.list(Loader.java:2024) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375) at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:308) at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:153) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1106) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) What's working actually : Query q = session.createQuery("SELECT object FROM TABLE object"); q.setLockMode("object",LockMode.UPGRADE); q.list();

    Hibernate JIRA | 1 decade ago | vision matford
    java.lang.IllegalArgumentException: alias not found: obj

    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. java.lang.IllegalArgumentException

      Invalid filter-parameter name format

      at org.hibernate.engine.LoadQueryInfluencers.parseFilterParameterName()
    2. Hibernate
      QueryLoader.list
      1. org.hibernate.engine.LoadQueryInfluencers.parseFilterParameterName(LoadQueryInfluencers.java:162)
      2. org.hibernate.engine.QueryParameters.processFilters(QueryParameters.java:485)
      3. org.hibernate.engine.QueryParameters.processFilters(QueryParameters.java:458)
      4. org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1669)
      5. org.hibernate.loader.Loader.doQuery(Loader.java:801)
      6. org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
      7. org.hibernate.loader.Loader.doList(Loader.java:2533)
      8. org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
      9. org.hibernate.loader.Loader.list(Loader.java:2271)
      10. org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:452)
      10 frames
    3. Hibernate HQL/JP-QL Parser
      QueryTranslatorImpl.list
      1. org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363)
      1 frame
    4. Hibernate
      QueryImpl.list
      1. org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
      2. org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268)
      3. org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
      3 frames