org.hibernate.QueryException

could not resolve property: class of: andersen.hibernatetest.Concrete2 [SELECT p FROM andersen.hibernatetest.Concrete2 p WHERE TYPE(p) = Concrete2]

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web350

  • via Hibernate JIRA by Nikolas Andersen, 1 year ago
    could not resolve property: class of: andersen.hibernatetest.Concrete2 [SELECT p FROM andersen.hibernatetest.Concrete2 p WHERE TYPE(p) = Concrete2]*
  • via Hibernate JIRA by Nikolas Andersen, 1 year ago
    could not resolve property: class of: andersen.hibernatetest.Concrete2 [SELECT p FROM andersen.hibernatetest.Concrete2 p WHERE TYPE(p) = Concrete2]
  • via Hibernate JIRA by Nikolas Andersen, 1 year ago
    could not resolve property: class of: andersen.hibernatetest.Concrete2 [SELECT p FROM andersen.hibernatetest.Concrete2 p WHERE TYPE(p) = Concrete2]
  • Stack trace

    • org.hibernate.QueryException: could not resolve property: class of: andersen.hibernatetest.Concrete2 [SELECT p FROM andersen.hibernatetest.Concrete2 p WHERE TYPE(p) = Concrete2] at org.hibernate.QueryException.generateQueryException(QueryException.java:120) at org.hibernate.QueryException.wrapWithQueryString(QueryException.java:103) at org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:218) at org.hibernate.hql.internal.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:142) at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:115) at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:76) at org.hibernate.engine.query.spi.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:150) at org.hibernate.internal.NamedQueryRepository.checkNamedQueries(NamedQueryRepository.java:155) at org.hibernate.internal.SessionFactoryImpl.checkNamedQueries(SessionFactoryImpl.java:769) at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:484) at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:444) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:879) at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:58) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:55) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:39) at andersen.hibernatetest.PolyTest.initEntityManager(PolyTest.java:22) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192) Caused by: org.hibernate.QueryException: could not resolve property: class of: andersen.hibernatetest.Concrete2 at org.hibernate.persister.entity.AbstractPropertyMapping.propertyException(AbstractPropertyMapping.java:62) at org.hibernate.persister.entity.AbstractPropertyMapping.toType(AbstractPropertyMapping.java:56) at org.hibernate.persister.entity.AbstractEntityPersister.getSubclassPropertyTableNumber(AbstractEntityPersister.java:1770) at org.hibernate.persister.entity.BasicEntityPropertyMapping.toColumns(BasicEntityPropertyMapping.java:46) at org.hibernate.persister.entity.AbstractEntityPersister.toColumns(AbstractEntityPersister.java:1745) at org.hibernate.persister.entity.AbstractEntityPersister$3.getSqlFragment(AbstractEntityPersister.java:1822) at org.hibernate.hql.internal.ast.tree.FromElement$TypeDiscriminatorMetadataImpl.getSqlFragment(FromElement.java:472) at org.hibernate.hql.internal.ast.tree.MethodNode.typeDiscriminator(MethodNode.java:111) at org.hibernate.hql.internal.ast.tree.MethodNode.resolve(MethodNode.java:80) at org.hibernate.hql.internal.ast.HqlSqlWalker.processFunction(HqlSqlWalker.java:1074) at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.functionCall(HqlSqlBaseWalker.java:2740) at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.expr(HqlSqlBaseWalker.java:1358) at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.exprOrSubquery(HqlSqlBaseWalker.java:4710) at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.comparisonExpr(HqlSqlBaseWalker.java:4180) at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:2127) at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.whereClause(HqlSqlBaseWalker.java:810) at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:605) at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:309) at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:257) at org.hibernate.hql.internal.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:262) at org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:190) ... 29 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    17930 times, 6 days ago
    68 times, 4 weeks ago
    14 times, 4 weeks ago
    11 times, 4 months ago
    3 times, 4 months ago
    7 more bugmates