java.lang.ClassCastException: org.hibernate.hql.ast.HqlToken cannot be cast to antlr.Token

liferay.com | 4 months ago
  1. 0

    org.hibernate.hql.ast.HqlToken cannot be cast to antlr.Token - Forums | Liferay

    liferay.com | 8 months ago
    java.lang.ClassCastException: org.hibernate.hql.ast.HqlToken cannot be cast to antlr.Token
  2. 0

    org.hibernate.hql.ast.HqlToken cannot be cast to antlr.Token - Forums

    liferay.com | 4 months ago
    java.lang.ClassCastException: org.hibernate.hql.ast.HqlToken cannot be cast to antlr.Token
  3. 0

    db:: 3.18::jboss-4.2.3.GA throws java.util.ConcurrentModificationException when trying to deploy services ax

    hivmr.com | 11 months ago
    java.lang.ClassCastException: org.hibernate.hql.ast.HqlToken cannot be cast to antlr.Token
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    db:: 2.77::org.hibernate.internal.SessionFactoryImpl cannot be cast to org.hibernate.SessionFactory d3

    hivmr.com | 8 months ago
    java.lang.ClassCastException: org.hibernate.hql.ast.HqlToken cannot be cast to antlr.Token
  6. 0

    When I run an Integration test (org.springframework.osgi.test.AbstractConfigurableBundleCreatorTests) that test one of my Dao I get the following exception: java.lang.ClassCastException: org.hibernate.hql.ast.HqlToken cannot be cast to antlr.Token at antlr.CharScanner.makeToken(CharScanner.java:173) at org.hibernate.hql.ast.HqlLexer.makeToken(HqlLexer.java:39) at org.hibernate.hql.antlr.HqlBaseLexer.mIDENT(HqlBaseLexer.java:580) at org.hibernate.hql.antlr.HqlBaseLexer.nextToken(HqlBaseLexer.java:264) at antlr.TokenBuffer.fill(TokenBuffer.java:69) at antlr.TokenBuffer.LA(TokenBuffer.java:80) at antlr.LLkParser.LA(LLkParser.java:52) at org.hibernate.hql.antlr.HqlBaseParser.statement(HqlBaseParser.java:139) at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:248) at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:157) at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:111) at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:77) at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:56) at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72) at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133) at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112) at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1623) at org.springframework.orm.hibernate3.HibernateTemplate$39.doInHibernate(HibernateTemplate.java:1148) at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:419) at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374) at org.springframework.orm.hibernate3.HibernateTemplate.bulkUpdate(HibernateTemplate.java:1146) at org.springframework.orm.hibernate3.HibernateTemplate.bulkUpdate(HibernateTemplate.java:1138) If I add : "DynamicImport-Package : * " in the manifest of antlr my Integration test ends with success. The line that throw the ClassCastException is : Token tok = (Token)tokenObjectClass.newInstance(); in antlr.CharScanner. And tokenObjectClass is created by in antlr.Utils: ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader(); contextClassLoader.loadClass(name)

    SpringSource Issue Tracker | 8 years ago | Andrei Stefan (c)
    java.lang.ClassCastException: org.hibernate.hql.ast.HqlToken cannot be cast to antlr.Token

    2 unregistered visitors
    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.ClassCastException

      org.hibernate.hql.ast.HqlToken cannot be cast to antlr.Token

      at antlr.CharScanner.makeToken()
    2. Antlr
      CharScanner.makeToken
      1. antlr.CharScanner.makeToken(CharScanner.java:173)
      1 frame
    3. Hibernate HQL/JP-QL Parser
      HqlLexer.makeToken
      1. org.hibernate.hql.ast.HqlLexer.makeToken(HqlLexer.java:62)
      1 frame
    4. Hibernate
      HqlBaseLexer.nextToken
      1. org.hibernate.hql.antlr.HqlBaseLexer.mIDENT(HqlBaseLexer.java:599)
      2. org.hibernate.hql.antlr.HqlBaseLexer.nextToken(HqlBaseLexer.java:270)
      2 frames
    5. Antlr
      LLkParser.LA
      1. antlr.TokenBuffer.fill(TokenBuffer.java:69)
      2. antlr.TokenBuffer.LA(TokenBuffer.java:80)
      3. antlr.LLkParser.LA(LLkParser.java:52)
      3 frames
    6. Hibernate
      HqlBaseParser.statement
      1. org.hibernate.hql.antlr.HqlBaseParser.statement(HqlBaseParser.java:141)
      1 frame
    7. Hibernate HQL/JP-QL Parser
      QueryTranslatorImpl.compile
      1. org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:274)
      2. org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:182)
      3. org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:136)
      3 frames
    8. Hibernate
      SessionImpl.createQuery
      1. org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:101)
      2. org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:80)
      3. org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:98)
      4. org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:156)
      5. org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:135)
      6. org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1760)
      6 frames