org.hibernate.HibernateException: Errors in named queries: selectall

Hibernate JIRA | VPC | 9 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

    [ANN-714] @NamedQuery always gives an Exception "unexpected token" no matter what query is used - Hibernate JIRA

    atlassian.net | 1 year ago
    org.hibernate.HibernateException: Errors in named queries: selectall
  2. 0

    @Entity @Table(name="CONTACT") @NamedQueries({ @NamedQuery(name = "selectall", query = "SELECT * FROM CONTACT") }) public class Contact { ---usual setter getters---- } @NamedQuery annotation always throws the following exception at the following line: SessionFactory sessionFactory = new AnnotationConfiguration().configure().buildSessionFactory(); The stack trace of the exception is as follows: <Fri Mar 21 15:14:22 EDT 2008> <Info> <org.hibernate.tool.hbm2ddl.TableMetadata> <BEA-000000> <table found: hibernatetutorial.contact> <Fri Mar 21 15:14:22 EDT 2008> <Info> <org.hibernate.tool.hbm2ddl.TableMetadata> <BEA-000000> <columns: [lastname, firstname, email, id]> <Fri Mar 21 15:14:22 EDT 2008> <Info> <org.hibernate.tool.hbm2ddl.TableMetadata> <BEA-000000> <foreign keys: []> <Fri Mar 21 15:14:22 EDT 2008> <Info> <org.hibernate.tool.hbm2ddl.TableMetadata> <BEA-000000> <indexes: []> <Fri Mar 21 15:14:22 EDT 2008> <Info> <org.hibernate.tool.hbm2ddl.SchemaUpdate> <BEA-000000> <schema update complete> <Fri Mar 21 15:14:22 EDT 2008> <Trace> <org.hibernate.connection.DriverManagerConnectionProvider> <BEA-000000> <returning connection to pool, pool size: 1> <Fri Mar 21 15:14:22 EDT 2008> <Debug> <org.hibernate.impl.SessionFactoryImpl> <BEA-000000> <Checking 1 named HQL queries> <Fri Mar 21 15:14:22 EDT 2008> <Debug> <org.hibernate.impl.SessionFactoryImpl> <BEA-000000> <Checking named query: selectall> <Fri Mar 21 15:14:22 EDT 2008> <Trace> <org.hibernate.engine.query.QueryPlanCache> <BEA-000000> <unable to locate HQL query plan in cache; generating (SELECT * FROM CONTACT)> <Fri Mar 21 15:14:22 EDT 2008> <Debug> <org.hibernate.hql.ast.QueryTranslatorImpl> <BEA-000000> <parse() - HQL: SELECT * FROM CONTACT> <Fri Mar 21 15:14:22 EDT 2008> <Error> <org.hibernate.hql.PARSER> <BEA-000000> <line 1:8: unexpected token: *> <Fri Mar 21 15:14:22 EDT 2008> <Debug> <org.hibernate.hql.ast.ErrorCounter> <BEA-000000> <line 1:8: unexpected token: *> org.hibernate.HibernateException: Errors in named queries: selectall at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:365) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1300) at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:859) at hib.FirstExample.main(FirstExample.java:18) <Fri Mar 21 15:14:22 EDT 2008> <Debug> <org.hibernate.hql.ast.AST> <BEA-000000> <--- HQL AST --- \-[QUERY] 'query' \-[SELECT_FROM] 'SELECT_FROM' \-[FROM] 'FROM' \-[RANGE] 'RANGE' \-[IDENT] 'CONTACT' > <Fri Mar 21 15:14:22 EDT 2008> <Debug> <org.hibernate.impl.SessionFactoryImpl> <BEA-000000> <Checking 0 named SQL queries> <Fri Mar 21 15:14:22 EDT 2008> <Error> <org.hibernate.impl.SessionFactoryImpl> <BEA-000000> <Error in named query: selectall>

    Hibernate JIRA | 9 years ago | VPC
    org.hibernate.HibernateException: Errors in named queries: selectall
  3. 0

    @Entity @Table(name="CONTACT") @NamedQueries({ @NamedQuery(name = "selectall", query = "SELECT * FROM CONTACT") }) public class Contact { ---usual setter getters---- } @NamedQuery annotation always throws the following exception at the following line: SessionFactory sessionFactory = new AnnotationConfiguration().configure().buildSessionFactory(); The stack trace of the exception is as follows: <Fri Mar 21 15:14:22 EDT 2008> <Info> <org.hibernate.tool.hbm2ddl.TableMetadata> <BEA-000000> <table found: hibernatetutorial.contact> <Fri Mar 21 15:14:22 EDT 2008> <Info> <org.hibernate.tool.hbm2ddl.TableMetadata> <BEA-000000> <columns: [lastname, firstname, email, id]> <Fri Mar 21 15:14:22 EDT 2008> <Info> <org.hibernate.tool.hbm2ddl.TableMetadata> <BEA-000000> <foreign keys: []> <Fri Mar 21 15:14:22 EDT 2008> <Info> <org.hibernate.tool.hbm2ddl.TableMetadata> <BEA-000000> <indexes: []> <Fri Mar 21 15:14:22 EDT 2008> <Info> <org.hibernate.tool.hbm2ddl.SchemaUpdate> <BEA-000000> <schema update complete> <Fri Mar 21 15:14:22 EDT 2008> <Trace> <org.hibernate.connection.DriverManagerConnectionProvider> <BEA-000000> <returning connection to pool, pool size: 1> <Fri Mar 21 15:14:22 EDT 2008> <Debug> <org.hibernate.impl.SessionFactoryImpl> <BEA-000000> <Checking 1 named HQL queries> <Fri Mar 21 15:14:22 EDT 2008> <Debug> <org.hibernate.impl.SessionFactoryImpl> <BEA-000000> <Checking named query: selectall> <Fri Mar 21 15:14:22 EDT 2008> <Trace> <org.hibernate.engine.query.QueryPlanCache> <BEA-000000> <unable to locate HQL query plan in cache; generating (SELECT * FROM CONTACT)> <Fri Mar 21 15:14:22 EDT 2008> <Debug> <org.hibernate.hql.ast.QueryTranslatorImpl> <BEA-000000> <parse() - HQL: SELECT * FROM CONTACT> <Fri Mar 21 15:14:22 EDT 2008> <Error> <org.hibernate.hql.PARSER> <BEA-000000> <line 1:8: unexpected token: *> <Fri Mar 21 15:14:22 EDT 2008> <Debug> <org.hibernate.hql.ast.ErrorCounter> <BEA-000000> <line 1:8: unexpected token: *> org.hibernate.HibernateException: Errors in named queries: selectall at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:365) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1300) at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:859) at hib.FirstExample.main(FirstExample.java:18) <Fri Mar 21 15:14:22 EDT 2008> <Debug> <org.hibernate.hql.ast.AST> <BEA-000000> <--- HQL AST --- \-[QUERY] 'query' \-[SELECT_FROM] 'SELECT_FROM' \-[FROM] 'FROM' \-[RANGE] 'RANGE' \-[IDENT] 'CONTACT' > <Fri Mar 21 15:14:22 EDT 2008> <Debug> <org.hibernate.impl.SessionFactoryImpl> <BEA-000000> <Checking 0 named SQL queries> <Fri Mar 21 15:14:22 EDT 2008> <Error> <org.hibernate.impl.SessionFactoryImpl> <BEA-000000> <Error in named query: selectall>

    Hibernate JIRA | 9 years ago | VPC
    org.hibernate.HibernateException: Errors in named queries: selectall
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    war file failed to deploy (Object Relational Mapping forum at Coderanch)

    coderanch.com | 10 months ago
    org.apache.catalina.LifecycleException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'guestController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private guest.GuestDao guest.GuestController.guestDao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'guestDao': Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/context/applicationContext-persistence.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: persistenceUnit] Unable to build EntityManagerFactory

    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.HibernateException

      Errors in named queries: selectall

      at org.hibernate.impl.SessionFactoryImpl.<init>()
    2. Hibernate
      SessionFactoryImpl.<init>
      1. org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:365)
      1 frame
    3. Hibernate
      AnnotationConfiguration.buildSessionFactory
      1. org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1300)
      2. org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:859)
      2 frames
    4. hib
      FirstExample.main
      1. hib.FirstExample.main(FirstExample.java:18)
      1 frame