-->
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.  [ 1 post ] 
Author Message
 Post subject: Exception for ‘group by’ but query without ‘group by’
PostPosted: Wed Aug 17, 2011 5:33 am 
Newbie

Joined: Wed Mar 05, 2008 10:01 am
Posts: 3
Hello.
When I’m executing query
Code:
from VUserReplaceableRoles rr where rr.id.syusId = ? order by rr.replaceableRoleName

I’m getting exception, of course param is setting correct.
Code:
11:24:19,364 INFO  [STDOUT] Hibernate: select vuserrepla0_.SYUS_ID as SYUS1_162_, vuserrepla0_.REPLACEABLE_ROLE_ID as REPLACEA2_162_, vuserrepla0_.REPLACEABLE_ROLE_NAME as REPLACEA3_162_ from V_USER_REPLACEABLE_ROLES vuserrepla0_ where vuserrepla0_.SYUS_ID=? order by vuserrepla0_.REPLACEABLE_ROLE_NAME
11:24:19,380 WARN  [JDBCExceptionReporter] SQL Error: 979, SQLState: 42000
11:24:19,380 ERROR [JDBCExceptionReporter] ORA-00979: not a GROUP BY expression
11:24:19,380 ERROR [ReplacementUtilsBean] org.hibernate.exception.SQLGrammarException: could not execute query
11:24:19,395 WARN  [lifecycle] java.lang.NullPointerException
javax.faces.el.EvaluationException: java.lang.NullPointerException
   at com.sun.faces.application.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:91)
   at javax.faces.component.UICommand.broadcast(UICommand.java:376)
   at com.icesoft.faces.component.menubar.MenuItemBase.broadcast(MenuItemBase.java:129)
   at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:447)
   at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:752)
   at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
   at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
   at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
   at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCycle(ReceiveSendUpdates.java:57)
   at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:45)
   at com.icesoft.faces.webapp.http.core.IDVerifier.service(IDVerifier.java:25)
   at com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:16)
   at com.icesoft.faces.webapp.http.servlet.ViewBoundAdaptingServlet.service(ViewBoundAdaptingServlet.java:44)
   at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
   at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
   at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:97)
   at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:35)
   at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
   at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
   at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:85)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:687)
   at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
   at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:364)
   at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
   at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:54)
   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:230)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
   at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
   at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
   at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
   at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.NullPointerException
   at com.pentacomp.szz.beans.ReplacementsListBean.resolveReplacableRoles(ReplacementsListBean.java:109)
   at com.pentacomp.szz.beans.ReplacementsListBean.initialize(ReplacementsListBean.java:93)
   at com.pentacomp.szz.beans.NavigationBean.handleReplacementListRedirect(NavigationBean.java:1404)
   at com.pentacomp.szz.beans.NavigationBean.access$1600(NavigationBean.java:70)
   at com.pentacomp.szz.beans.NavigationBean$16.handleRedirect(NavigationBean.java:1659)
   at com.pentacomp.szz.beans.NavigationBean.handleRedirect(NavigationBean.java:1034)
   at com.pentacomp.szz.beans.NavigationBean.redirect(NavigationBean.java:970)
   at com.pentacomp.szz.beans.NavigationBean.tryHandleRedirect(NavigationBean.java:952)
   at com.pentacomp.szz.beans.NavigationBean.onRedirect(NavigationBean.java:626)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.apache.el.parser.AstValue.invoke(AstValue.java:131)
   at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
   at com.sun.faces.application.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
   ... 46 more

Why I’m getting exception regarding ‘group by’ if there is no any ‘group by’ in my sql.
HQL
Code:
select vuserrepla0_.SYUS_ID               as SYUS1_162_,
       vuserrepla0_.REPLACEABLE_ROLE_ID   as REPLACEA2_162_,
       vuserrepla0_.REPLACEABLE_ROLE_NAME as REPLACEA3_162_
  from V_USER_REPLACEABLE_ROLES vuserrepla0_
where vuserrepla0_.SYUS_ID = 33
order by vuserrepla0_.REPLACEABLE_ROLE_NAME

executing correct on oracle 10g.
My application using hibernate which is in JBoss 4.2.1 GA ( hibernate 3.2.4.sp1).





----
Topic to close, problem was on DB.


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

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.