java.lang.ClassCastException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • The following delete gives ClassCastException Session s = openSession(); s.setCacheMode(CacheMode.IGNORE); Transaction t = s.beginTransaction(); s.createQuery("delete com.finantix.fxc.persistents.directory.breakdown.lim.bl.pom.impl.PAssetTypeBI").executeUpdate(); java.lang.ClassCastException at org.hibernate.hql.ast.FromElementFactory.createFromElement(FromElementFactory.java:410) at org.hibernate.hql.ast.FromElementFactory.createAndAddFromElement(FromElementFactory.java:388) at org.hibernate.hql.ast.FromElementFactory.addFromElement(FromElementFactory.java:79) at org.hibernate.hql.ast.FromClause.addFromElement(FromClause.java:67) at org.hibernate.hql.ast.HqlSqlWalker.createFromElement(HqlSqlWalker.java:221) at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElement(HqlSqlBaseWalker.java:2767) at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElementList(HqlSqlBaseWalker.java:2656) at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromClause(HqlSqlBaseWalker.java:582) at org.hibernate.hql.antlr.HqlSqlBaseWalker.deleteStatement(HqlSqlBaseWalker.java:319) at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:186) at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:191) at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:133) at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:86) at org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:429) at org.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:890) at org.hibernate.impl.SessionImpl.executeUpdate(SessionImpl.java:871) at org.hibernate.impl.QueryImpl.executeUpdate(QueryImpl.java:89) at
    via by Jessica Marchiori,
  • The following delete gives ClassCastException Session s = openSession(); s.setCacheMode(CacheMode.IGNORE); Transaction t = s.beginTransaction(); s.createQuery("delete com.finantix.fxc.persistents.directory.breakdown.lim.bl.pom.impl.PAssetTypeBI").executeUpdate(); java.lang.ClassCastException at org.hibernate.hql.ast.FromElementFactory.createFromElement(FromElementFactory.java:410) at org.hibernate.hql.ast.FromElementFactory.createAndAddFromElement(FromElementFactory.java:388) at org.hibernate.hql.ast.FromElementFactory.addFromElement(FromElementFactory.java:79) at org.hibernate.hql.ast.FromClause.addFromElement(FromClause.java:67) at org.hibernate.hql.ast.HqlSqlWalker.createFromElement(HqlSqlWalker.java:221) at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElement(HqlSqlBaseWalker.java:2767) at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElementList(HqlSqlBaseWalker.java:2656) at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromClause(HqlSqlBaseWalker.java:582) at org.hibernate.hql.antlr.HqlSqlBaseWalker.deleteStatement(HqlSqlBaseWalker.java:319) at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:186) at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:191) at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:133) at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:86) at org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:429) at org.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:890) at org.hibernate.impl.SessionImpl.executeUpdate(SessionImpl.java:871) at org.hibernate.impl.QueryImpl.executeUpdate(QueryImpl.java:89) at
    via by Jessica Marchiori,
    • java.lang.ClassCastException at org.hibernate.hql.ast.FromElementFactory.createFromElement(FromElementFactory.java:410) at org.hibernate.hql.ast.FromElementFactory.createAndAddFromElement(FromElementFactory.java:388) at org.hibernate.hql.ast.FromElementFactory.addFromElement(FromElementFactory.java:79) at org.hibernate.hql.ast.FromClause.addFromElement(FromClause.java:67) at org.hibernate.hql.ast.HqlSqlWalker.createFromElement(HqlSqlWalker.java:221) at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElement(HqlSqlBaseWalker.java:2767) at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElementList(HqlSqlBaseWalker.java:2656) at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromClause(HqlSqlBaseWalker.java:582) at org.hibernate.hql.antlr.HqlSqlBaseWalker.deleteStatement(HqlSqlBaseWalker.java:319) at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:186) at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:191) at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:133) at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:86) at org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:429) at org.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:890) at org.hibernate.impl.SessionImpl.executeUpdate(SessionImpl.java:871) at org.hibernate.impl.QueryImpl.executeUpdate(QueryImpl.java:89)
    No Bugmate found.