-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: query exception on simple query
PostPosted: Mon Jan 24, 2005 5:28 pm 
Newbie

Joined: Mon Jan 24, 2005 5:20 pm
Posts: 1
Location: Columbia Md.
I'm new to hibernate so maybe I'm missing something easy but I don't see it. I execute the following query. What does "in expected: p" mean?

R net.sf.hibernate.QueryException: in expected: p [select p.JSPFRAGMENT from Profile p where p.USERTYPE = 'Foreign National' AND p.GEOGRAPHICAREA = 'Europe' AND p.TOPIC = 'Corn' AND p.SUBTOPIC = 'Trade' ]

Below is the stack trace:

3 EST] 79867986 SystemErr R net.sf.hibernate.QueryException: in expected: p [select p.JSPFRAGMENT from Profile p where p.USERTYPE = 'Foreign National' AND p.GEOGRAPHICAREA = 'Europe' AND p.TOPIC = 'Corn' AND p.SUBTOPIC = 'Trade' ]
at java.lang.Throwable.<init>(Throwable.java)
at java.lang.Throwable.<init>(Throwable.java)
at net.sf.hibernate.exception.NestableException.<init>(NestableException.java:156)
at net.sf.hibernate.hql.FromParser.token(FromParser.java:102)
at net.sf.hibernate.hql.ClauseParser.token(ClauseParser.java:87)
at net.sf.hibernate.hql.PreprocessingParser.token(PreprocessingParser.java:123)
at net.sf.hibernate.hql.ParserHelper.parse(ParserHelper.java:29)
at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:149)
at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:138)
at net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:295)
at net.sf.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1571)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1542)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1530)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1522)
at gov.usda.cmis.dao.ProfileDAO.getJSPFragments(ProfileDAO.java)
at gov.usda.cmis.PFPortlet.PFPortlet.actionPerformed(PFPortlet.java)
at com.ibm.wps.pe.pc.legacy.SPIPortletInterceptorImpl.handleEvents(SPIPortletInterceptorImpl.java:438)
at org.apache.jetspeed.portlet.Portlet._dispatch(Portlet.java:794)
at org.apache.jetspeed.portlet.Portlet.access$100(Portlet.java:88)
at org.apache.jetspeed.portlet.Portlet$Context.callPortlet(Portlet.java:899)
at com.ibm.wps.pe.pc.legacy.cmpf.impl.PortletFilterManager.doFilter(PortletFilterManager.java:253)
at org.apache.jetspeed.portlet.Portlet.dispatch(Portlet.java:636)
at org.apache.jetspeed.portlet.Portlet.doPost(Portlet.java:516)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jetspeed.portlet.Portlet.service(Portlet.java:491)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:972)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:554)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:246)
at com.ibm.wps.pe.pc.legacy.invoker.impl.PortletInvokerImpl.callMethod(PortletInvokerImpl.java:474)
at com.ibm.wps.pe.pc.legacy.invoker.impl.PortletInvokerImpl.action(PortletInvokerImpl.java:112)
at com.ibm.wps.pe.pc.legacy.PortletContainerImpl.callPortletMethod(PortletContainerImpl.java:1227)
at com.ibm.wps.pe.pc.legacy.EventEnvironmentImpl.includePortlet(EventEnvironmentImpl.java:191)
at com.ibm.wps.pe.pc.legacy.event.ActionEventImpl.prepare(ActionEventImpl.java:121)
at com.ibm.wps.pe.pc.legacy.event.EventQueueManager.processEventLoop(EventQueueManager.java:92)
at com.ibm.wps.pe.pc.legacy.PortletContainerImpl.performEventPhase(PortletContainerImpl.java:1560)
at com.ibm.wps.pe.pc.legacy.PortletContainerImpl.initPage(PortletContainerImpl.java:219)
at com.ibm.wps.pe.pc.PortletContainerImpl.initPage(PortletContainerImpl.java:213)
at com.ibm.wps.pe.pc.PortletContainer.initPage(PortletContainer.java:148)
at com.ibm.wps.engine.templates.themes.Home.doPreRender(Home.java:205)
at com.ibm.wps.engine.templates.themes.Default.render(Default.java:67)
at com.ibm.wps.engine.templates.ThemeTemplate.render(ThemeTemplate.java:71)
at com.ibm.wps.engine.Servlet.callPortal(Servlet.java:770)
at com.ibm.wps.engine.Servlet.doGet(Servlet.java:465)
at com.ibm.wps.engine.Servlet.doPost(Servlet.java:801)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:76)
at com.ibm.wps.mappingurl.impl.URLAnalyzer.doFilter(URLAnalyzer.java:185)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:963)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:554)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:198)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:201)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:610)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java)

_________________
Dennis Pagano
dpagano@noospherics.com
443-255-3717


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 25, 2005 1:25 am 
Newbie

Joined: Mon Aug 09, 2004 7:29 am
Posts: 10
Location: India
Check if the mapping for Profile class is visible to Hibernate. i.e., the mapping xml is added to the configuration. I have also seen this error if the class name is misspelt.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 10, 2005 8:48 am 
Newbie

Joined: Fri Apr 09, 2004 9:28 am
Posts: 2
Location: Brussels, Belgium
Thanks a lot kamal_tavant, I had this problem and your solution was right in my case!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.