wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes Hibername Select few fields Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Hibername Select few fields" Watch "Hibername Select few fields" New topic
Author

Hibername Select few fields

Hari Yogendra Tripathi
Greenhorn

Joined: Sep 21, 2007
Posts: 1
Query :select new CategoryGroupWise(pc.id, pc.parent, pc.name, pc.siteId) from ProdCat pc
=========================================================================
Error:
=========================================================================


Unable to locate class [CategoryGroupWise]
[cause=java.lang.ClassNotFoundException: CategoryGroupWise]
03:15:13,953 ERROR ProdCatBusinessService:133 - Problem in fetching all entites for entity prodCat
org.hibernate.hql.ast.QuerySyntaxException: Unable to locate class [CategoryGroupWise] [select new CategoryGroupWise(pc.id, pc.parent, pc.name, pc.siteId) from com.dbydx.speechwriters.domain.model.ProdCat pc, com.dbydx.speechwriters.domain.model.Site s where pc.status!=1 and pc.existMain=1 and s.id=pc.siteId and s.id=2 ORDER BY pc.sequenceNumber]
at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:59)
at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:225)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:158)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:105)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:75)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:54)
at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:71)
at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:134)
at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:113)
at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1600)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:292)
at $Proxy0.createQuery(Unknown Source)
at com.dbydx.speechwriters.services.business.ProdCatBusinessService.fetchAllEntity(ProdCatBusinessService.java:112)
at com.dbydx.speechwriters.services.handler.SpeechWriterFetchAllEntityHandler.handle(SpeechWriterFetchAllEntityHandler.java:37)
at com.dbydx.corelib.services.handler.Handler.handle(Handler.java:25)
at com.dbydx.speechwriters.web.action.ProductAction.doFilterSummary(ProductAction.java:1597)
at com.dbydx.speechwriters.web.action.ProductAction.executeAction(ProductAction.java:133)
at com.dbydx.corelib.web.action.BaseAction.execute(BaseAction.java:65)
at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:53)
at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:64)
at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:48)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:280)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:446)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at com.dbydx.corelib.services.persistence.hibernate.HibernateSessionRequestFilter.doFilter(HibernateSessionRequestFilter.java:40)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Unknown Source)
Caused by: Unable to locate class [CategoryGroupWise]
[cause=java.lang.ClassNotFoundException: CategoryGroupWise]
at org.hibernate.hql.ast.tree.ConstructorNode.resolveConstructor(ConstructorNode.java:117)
at org.hibernate.hql.ast.tree.ConstructorNode.prepare(ConstructorNode.java:88)
at org.hibernate.hql.ast.HqlSqlWalker.processConstructor(HqlSqlWalker.java:772)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectExpr(HqlSqlBaseWalker.java:1952)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectExprList(HqlSqlBaseWalker.java:1821)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectClause(HqlSqlBaseWalker.java:1392)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:553)
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:218)
... 60 more


Can anybody help me

Thanks in advance
[ September 21, 2007: Message edited by: Hari Yogendra Tripathi ]
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9343
    
111

cause=java.lang.ClassNotFoundException: CategoryGroupWise


Is the CategoryGroupWise class available in the classpath of the application?


[My Blog] [JavaRanch Journal]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hibername Select few fields
 
Similar Threads
Tomcat not loading mysql database driver
Problem with Jakarta Commons Fileupload
Remote Home lookup from tomcat 5.0 to Weblogic 8.1
org.hibernate.hql.ast.QuerySyntaxException: INFORMATION_SCHEMA.SYSTEM_ALIASES is not mapped.
Spring and Hessian