[jboss-jira] [JBoss JIRA] Commented: (JBAS-8378) QuerySyntaxException : Entity not mapped when code is migrated from jboss-4.2.3 to jboss-5.1.0.GA

jaikiran pai (JIRA) jira-events at lists.jboss.org
Thu Sep 2 01:10:52 EDT 2010


    [ https://jira.jboss.org/browse/JBAS-8378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12548500#action_12548500 ] 

jaikiran pai commented on JBAS-8378:
------------------------------------

1) You are having both persistence.xml and a hibernate.cfg.xml file? Why do you need the hibernate.cfg.xml?
2) Within your code, you seem to be using the hibernate.cfg.xml file which has no entities declared.

By the way, the user forums are a better place to discuss such issues.

> QuerySyntaxException : Entity not mapped when code is migrated from jboss-4.2.3 to jboss-5.1.0.GA
> -------------------------------------------------------------------------------------------------
>
>                 Key: JBAS-8378
>                 URL: https://jira.jboss.org/browse/JBAS-8378
>             Project: JBoss Application Server
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Hibernate service
>    Affects Versions: JBossAS-5.1.0.GA
>         Environment: jboss-5.1.0.GA, jdk-1.6.0_05, oracle 10g, hibernate that is bundled with jboss-5.1.0.GA
>            Reporter: Raghavan TV
>            Assignee: Steve Ebersole
>            Priority: Critical
>         Attachments: hibernate.cfg.xml, persistence.xml, persistence.xml, TestDAO.java
>
>
> We encountered this error during the migration of our j2ee app from jboss-4.2.3 to jboss-5.1.0.GA. To narrow down the issue, created a unit code to reproduce the same problem.
> Stack Trace
> ---------------
> 21:02:27,059 ERROR [STDERR] org.hibernate.hql.ast.QuerySyntaxException: SsoUser is not mapped [select ssou from SsoUser ssou]
> 	at org.hibernate.hql.ast.util.SessionFactoryHelper.requireClassPersister(SessionFactoryHelper.java:181)
> 	at org.hibernate.hql.ast.tree.FromElementFactory.addFromElement(FromElementFactory.java:110)
> 	at org.hibernate.hql.ast.tree.FromClause.addFromElement(FromClause.java:93)
> 	at org.hibernate.hql.ast.HqlSqlWalker.createFromElement(HqlSqlWalker.java:277)
> 	at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElement(HqlSqlBaseWalker.java:3056)
> 	at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElementList(HqlSqlBaseWalker.java:2945)
> 	at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromClause(HqlSqlBaseWalker.java:688)
> 	at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:544)
> 	at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:281)
> 	at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:229)
> 	at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:251)
> 	at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:183)
> 	at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:134)
> 	at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:101)
> 	at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:80)
> 	at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:94)
> 	at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:156)
> 	at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:135)
> 	at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1650)
> 	at com.mycomp.mydomain.testhibernateprj.TestDAO.getSsoUserById(TestDAO.java:25)
> 	at com.tcs.telecom.tib.testhibernateprj.servlets.SampleServlet.processRequest(SampleServlet.java:40)
> 	at com.mycomp.mydomain.testhibernateprj.servlets.SampleServlet.doGet(SampleServlet.java:67)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> 	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
> 	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
> 	at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
> 	at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> 	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
> 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
> 	at java.lang.Thread.run(Thread.java:619)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list