3 Replies Latest reply on Jul 18, 2008 8:16 AM by jaikiran pai

    QuerySyntaxException class is not mapped

    Kenneth René Sánchez Sánchez Newbie

      Hi,

      I have a jar file (acad.jar) than contain TemaIcfes Entity:

      package co.academico.entidades;

      import java.io.Serializable;
      import javax.persistence.Entity;
      import javax.persistence.Id;
      import javax.persistence.Table;
      import javax.persistence.GeneratedValue;

      import org.jboss.seam.annotations.Name;

      @Entity
      @Name("TemaIcfes")
      @Table(name = "temas_icfes")
      public class TemaIcfes implements Serializable{

      @Id
      @GeneratedValue
      private short tema;
      private String descripcion_tema;

      public short getTema(){
      return tema;
      }

      public void setTema(short tema){
      this.tema = tema;
      }

      public String getDescripcion_tema(){
      return descripcion_tema;
      }

      public void setDescripcion_tema(String descripcion_tema){
      this.descripcion_tema = descripcion_tema;
      }
      }


      The problem is that when I use it in another application through an EJB shows the following error:

      Exception during request processing: Caused by javax.el.ELException with message: "javax.ejb.EJBTransactionRolledbackException: org.hibernate.hql.ast.QuerySyntaxException: TemaIcfes is not mapped [SELECT a FROM TemaIcfes a ORDER BY tema]"

      Classes:

      HacerMantenimiento.java:

      package co.academico.admin;

      import java.util.List;
      import co.academico.entidades.TemaIcfes;
      import javax.ejb.Local;

      @Local
      public interface HacerMantenimiento{

      public void crear(TemaIcfes tema);
      public List consultarTemaIcfes();
      public void modificar(TemaIcfes tema);
      public void listar();
      public void eliminar(TemaIcfes tema);

      public void destroy();
      }

      HacerMantenimientoEJB.java:

      package co.academico.admin;

      import static org.jboss.seam.ScopeType.SESSION;
      import java.util.List;
      import co.academico.entidades.TemaIcfes;
      import org.jboss.seam.annotations.Destroy;
      import org.jboss.seam.annotations.Name;
      import org.jboss.seam.annotations.Scope;
      import org.jboss.seam.annotations.datamodel.DataModel;
      import javax.ejb.Remove;
      import javax.ejb.Stateful;
      import javax.persistence.EntityManager;
      import javax.persistence.PersistenceContext;

      @Stateful
      @Scope(SESSION)
      @Name("hacerMantenimiento")
      public class HacerMantenimientoEJB implements HacerMantenimientoTemaIcfes{

      @PersistenceContext
      private EntityManager em;

      @DataModel
      private List temasIcfes;

      public void crear(TemaIcfes tema){
      em.persist(tema);
      }

      public List consultarTemaIcfes(){
      temasIcfes = em.createQuery
      ("SELECT a "+
      "FROM TemaIcfes a "+
      "ORDER BY tema").getResultList();
      return temasIcfes;
      }

      public void modificar(TemaIcfes tema){
      em.merge(tema);
      em.flush();
      }

      public void listar(){}

      public void eliminar(TemaIcfes tema){
      em.remove(tema);
      }

      @Remove @Destroy
      public void destroy(){}
      }


      home.xhtml:

      <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
      xmlns:s="http://jboss.com/products/seam/taglib"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:rich="http://richfaces.org/rich"
      template="layout/template.xhtml">

      <ui:define name="body">

      <h:messages globalOnly="true" styleClass="message"/>

      <rich:panel>

      <h:outputText
      value="No existen temas registrados"
      rendered="#{temasIcfes != null and temasIcfes.rowCount==0}"/>

      <h:dataTable id="temasIcfes"
      value="#{temasIcfes}"
      var="tema"
      rendered="#{temasIcfes.rowCount>0}"
      style=" width : 377px;">

      <h:column>
      <f:facet name="header">Codigo</f:facet>
      #{tema.tema}
      </h:column>
      <h:column>
      <f:facet name="header">Descripcion</f:facet>
      #{tema.descripcion_tema}
      </h:column>
      </h:dataTable>

      </rich:panel>

      </ui:define>
      </ui:composition>

      pages.xml:

      ...
      <page view-id="/home.xhtml" action="#{hacerMantenimiento.consultarTemaIcfes}">


      <redirect view-id="/main.xhtml"/>


      ...

      What is the problem?
      They could help to solve this problem please?

        • 1. Re: QuerySyntaxException class is not mapped
          jaikiran pai Master

          Please post the entire logs you see on the console. Which version of JBoss and Java do you use?

          P.S: While posting the logs or xml content or code, remember to wrap it in a code block using the Code button in the message editor window and please hit the Preview button to make sure your post is correctly formatted

          • 2. Re: QuerySyntaxException class is not mapped
            Kenneth René Sánchez Sánchez Newbie

            Version of JAVA: jdk 1.5
            Version of JBoss: 4.2.0.GA
            Version of seam: 2.0.1.GA

            LOGS:
            -------

            Exception during request processing:
            Caused by javax.el.ELException with message: "javax.ejb.EJBTransactionRolledbackException: org.hibernate.hql.ast.QuerySyntaxException: TemaIcfes is not mapped [SELECT a FROM TemaIcfes a ORDER BY tema]"

            org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:333)
            org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:342)
            org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
            org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
            org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
            org.jboss.seam.core.Expressions$2.invoke(Expressions.java:173)
            org.jboss.seam.navigation.Page.preRender(Page.java:264)
            org.jboss.seam.navigation.Pages.preRender(Pages.java:309)
            org.jboss.seam.jsf.SeamPhaseListener.preRenderPage(SeamPhaseListener.java:549)
            org.jboss.seam.jsf.SeamPhaseListener.beforeRenderResponse(SeamPhaseListener.java:460)
            org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:144)
            org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:114)
            com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
            com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
            javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
            org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
            org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
            org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
            org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
            org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
            org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
            org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
            org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
            org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
            org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
            org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
            org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
            org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
            org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
            org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
            org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
            org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
            org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
            org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
            org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
            org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
            org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
            org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
            java.lang.Thread.run(Thread.java:595)

            ------------
            Caused by javax.ejb.EJBTransactionRolledbackException with message: "org.hibernate.hql.ast.QuerySyntaxException: TemaIcfes is not mapped [SELECT a FROM TemaIcfes a ORDER BY tema]"

            org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:87)
            org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
            org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
            org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
            org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
            org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
            org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
            org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
            org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
            org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:106)
            org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
            org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
            org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
            org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
            org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
            org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:204)
            org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:100)
            $Proxy232.consultarTemaIcfes(Unknown Source)
            sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            java.lang.reflect.Method.invoke(Method.java:585)
            org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
            org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
            org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76)
            org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
            org.jboss.seam.ejb.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:41)
            org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
            org.jboss.seam.core.SynchronizationInterceptor.aroundInvoke(SynchronizationInterceptor.java:32)
            org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
            org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
            org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)
            org.javassist.tmp.java.lang.Object_$$_javassist_1.consultarTemaIcfes(Object_$$_javassist_1.java)
            sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            java.lang.reflect.Method.invoke(Method.java:585)
            org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:329)
            org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:342)
            org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
            org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
            org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
            org.jboss.seam.core.Expressions$2.invoke(Expressions.java:173)
            org.jboss.seam.navigation.Page.preRender(Page.java:264)
            org.jboss.seam.navigation.Pages.preRender(Pages.java:309)
            org.jboss.seam.jsf.SeamPhaseListener.preRenderPage(SeamPhaseListener.java:549)
            org.jboss.seam.jsf.SeamPhaseListener.beforeRenderResponse(SeamPhaseListener.java:460)
            org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:144)
            org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:114)
            com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
            com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
            javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
            org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
            org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
            org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
            org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
            org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
            org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
            org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
            org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
            org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
            org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
            org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
            org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
            org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
            org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
            org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
            org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
            org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
            org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
            org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
            org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
            org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
            org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
            org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
            java.lang.Thread.run(Thread.java:595)

            -------------
            Caused by java.lang.IllegalArgumentException with message: "org.hibernate.hql.ast.QuerySyntaxException: TemaIcfes is not mapped [SELECT a FROM TemaIcfes a ORDER BY tema]"

            org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:616)
            org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:95)
            org.jboss.ejb3.entity.TransactionScopedEntityManager.createQuery(TransactionScopedEntityManager.java:134)
            org.jboss.seam.persistence.EntityManagerProxy.createQuery(EntityManagerProxy.java:79)
            co.edu.uis.academico.prueba.HacerMantenimientoTemaIcfesEJB.consultarTemaIcfes(HacerMantenimientoTemaIcfesEJB.java:34)
            sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            java.lang.reflect.Method.invoke(Method.java:585)
            org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
            org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
            org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:44)
            org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
            org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
            org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
            org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
            org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
            org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
            org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
            org.jboss.seam.persistence.EntityManagerProxyInterceptor.aroundInvoke(EntityManagerProxyInterceptor.java:26)
            org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
            org.jboss.seam.persistence.HibernateSessionProxyInterceptor.aroundInvoke(HibernateSessionProxyInterceptor.java:27)
            org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
            org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
            org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:50)
            sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            java.lang.reflect.Method.invoke(Method.java:585)
            org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
            org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
            org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
            org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:57)
            org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
            org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
            org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
            org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
            org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
            org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
            org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
            org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
            org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
            org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
            org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
            org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
            org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
            org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:106)
            org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
            org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
            org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
            org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
            org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
            org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:204)
            org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:100)
            $Proxy232.consultarTemaIcfes(Unknown Source)
            sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            java.lang.reflect.Method.invoke(Method.java:585)
            org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
            org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
            org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76)
            org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
            org.jboss.seam.ejb.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:41)
            org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
            org.jboss.seam.core.SynchronizationInterceptor.aroundInvoke(SynchronizationInterceptor.java:32)
            org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
            org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
            org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)
            org.javassist.tmp.java.lang.Object_$$_javassist_1.consultarTemaIcfes(Object_$$_javassist_1.java)
            sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            java.lang.reflect.Method.invoke(Method.java:585)
            org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:329)
            org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:342)
            org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
            org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
            org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
            org.jboss.seam.core.Expressions$2.invoke(Expressions.java:173)
            org.jboss.seam.navigation.Page.preRender(Page.java:264)
            org.jboss.seam.navigation.Pages.preRender(Pages.java:309)
            org.jboss.seam.jsf.SeamPhaseListener.preRenderPage(SeamPhaseListener.java:549)
            org.jboss.seam.jsf.SeamPhaseListener.beforeRenderResponse(SeamPhaseListener.java:460)
            org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:144)
            org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:114)
            com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
            com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
            javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
            org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
            org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
            org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
            org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
            org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
            org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
            org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
            org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
            org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
            org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
            org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
            org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
            org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
            org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
            org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
            org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
            org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
            org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
            org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
            org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
            org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
            org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
            org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
            java.lang.Thread.run(Thread.java:595)

            -----------
            Caused by org.hibernate.hql.ast.QuerySyntaxException with message: "TemaIcfes is not mapped [SELECT a FROM TemaIcfes a ORDER BY tema]"

            org.hibernate.hql.ast.util.SessionFactoryHelper.requireClassPersister(SessionFactoryHelper.java:158)
            org.hibernate.hql.ast.tree.FromElementFactory.addFromElement(FromElementFactory.java:87)
            org.hibernate.hql.ast.tree.FromClause.addFromElement(FromClause.java:70)
            org.hibernate.hql.ast.HqlSqlWalker.createFromElement(HqlSqlWalker.java:255)
            org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElement(HqlSqlBaseWalker.java:3056)
            org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElementList(HqlSqlBaseWalker.java:2945)
            org.hibernate.hql.antlr.HqlSqlBaseWalker.fromClause(HqlSqlBaseWalker.java:688)
            org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:544)
            org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:281)
            org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:229)
            org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:228)
            org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:160)
            org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:111)
            org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:77)
            org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:56)
            org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72)
            org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133)
            org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112)
            org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1623)
            org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:92)
            org.jboss.ejb3.entity.TransactionScopedEntityManager.createQuery(TransactionScopedEntityManager.java:134)
            org.jboss.seam.persistence.EntityManagerProxy.createQuery(EntityManagerProxy.java:79)
            co.edu.uis.academico.prueba.HacerMantenimientoTemaIcfesEJB.consultarTemaIcfes(HacerMantenimientoTemaIcfesEJB.java:34)
            sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            java.lang.reflect.Method.invoke(Method.java:585)
            org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
            org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
            org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:44)
            org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
            org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
            org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
            org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
            org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
            org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
            org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
            org.jboss.seam.persistence.EntityManagerProxyInterceptor.aroundInvoke(EntityManagerProxyInterceptor.java:26)
            org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
            org.jboss.seam.persistence.HibernateSessionProxyInterceptor.aroundInvoke(HibernateSessionProxyInterceptor.java:27)
            org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
            org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
            org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:50)
            sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            java.lang.reflect.Method.invoke(Method.java:585)
            org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
            org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
            org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
            org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:57)
            org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
            org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
            org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
            org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
            org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
            org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
            org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
            org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
            org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
            org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
            org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
            org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
            org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
            org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:106)
            org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
            org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
            org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
            org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
            org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
            org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:204)
            org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:100)
            $Proxy232.consultarTemaIcfes(Unknown Source)
            sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            java.lang.reflect.Method.invoke(Method.java:585)
            org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
            org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
            org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76)
            org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
            org.jboss.seam.ejb.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:41)
            org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
            org.jboss.seam.core.SynchronizationInterceptor.aroundInvoke(SynchronizationInterceptor.java:32)
            org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
            org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
            org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)
            org.javassist.tmp.java.lang.Object_$$_javassist_1.consultarTemaIcfes(Object_$$_javassist_1.java)
            sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            java.lang.reflect.Method.invoke(Method.java:585)
            org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:329)
            org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:342)
            org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
            org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
            org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
            org.jboss.seam.core.Expressions$2.invoke(Expressions.java:173)
            org.jboss.seam.navigation.Page.preRender(Page.java:264)
            org.jboss.seam.navigation.Pages.preRender(Pages.java:309)
            org.jboss.seam.jsf.SeamPhaseListener.preRenderPage(SeamPhaseListener.java:549)
            org.jboss.seam.jsf.SeamPhaseListener.beforeRenderResponse(SeamPhaseListener.java:460)
            org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:144)
            org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:114)
            com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
            com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
            javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
            org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
            org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
            org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
            org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
            org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
            org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
            org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
            org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
            org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
            org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
            org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
            org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
            org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
            org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
            org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
            org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
            org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
            org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
            org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
            org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
            org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
            org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
            org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
            java.lang.Thread.run(Thread.java:595)

            • 3. Re: QuerySyntaxException class is not mapped
              jaikiran pai Master

               

              "jaikiran" wrote:
              Please post the entire logs you see on the console.



              Sorry, i wasn't clear enough in my earlier post. I was actually asking for the console logs that you see from the point you start the server, till this exception is logged (even the server.log would do, but that's actually going to be too long).

              The logs will actually help us in figuring out whether the entity was actually mapped when you application was being deployed.