1 Reply Latest reply on Mar 13, 2007 10:36 AM by Konstantin Kauz

    Problem lower() function

    Konstantin Kauz Novice

      Getting follow exeption by using of lower(), what i do wrong?


      15:23:55,547 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
      javax.faces.FacesException: Error calling action method of component with id _id13:_id56
      at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:74)
      at javax.faces.component.UICommand.broadcast(UICommand.java:106)
      at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:94)
      at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:168)
      at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:343)
      at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:29)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      at java.lang.Thread.run(Thread.java:595)
      Caused by: javax.faces.el.EvaluationException: /usrverw.xhtml @119,69 action="#{searchusr.searchUsr}": javax.ejb.EJBTransactionRolledbackException: java.lang.IllegalArgumentException: org.hibernate.hql.ast.QuerySyntaxException: unexpected token: lower near line 1, column 145 [from kk.rentform.entity.Usr u where lower(u.bname) like :bname and u.id LIKE :id and lower(u.mail) like :mail and lower(u.firma) like :firmaand lower(u.nname) like :nname and lower(u.stadt) like :stadtand u.sperr like :sperres and u.actives like :actives]
      at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:73)
      at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
      ... 28 more
      Caused by: javax.ejb.EJBTransactionRolledbackException: java.lang.IllegalArgumentException: org.hibernate.hql.ast.QuerySyntaxException: unexpected token: lower near line 1, column 145 [from kk.rentform.entity.Usr u where lower(u.bname) like :bname and u.id LIKE :id and lower(u.mail) like :mail and lower(u.firma) like :firmaand lower(u.nname) like :nname and lower(u.stadt) like :stadtand u.sperr like :sperres and u.actives like :actives]
      at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:93)
      at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
      at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
      at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:102)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:203)
      at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
      at $Proxy113.searchUsr(Unknown Source)
      at kk.rentform.session.SearchUsrInterface$$FastClassByCGLIB$$108609c8.invoke()
      at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
      at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:45)
      at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:74)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
      at org.jboss.seam.interceptors.RemoveInterceptor.removeIfNecessary(RemoveInterceptor.java:40)
      at sun.reflect.GeneratedMethodAccessor125.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
      at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
      at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
      at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
      Caused by: java.lang.IllegalArgumentException: org.hibernate.hql.ast.QuerySyntaxException: unexpected token: lower near line 1, column 145 [from kk.rentform.entity.Usr u where lower(u.bname) like :bname and u.id LIKE :id and lower(u.mail) like :mail and lower(u.firma) like :firmaand lower(u.nname) like :nname and lower(u.stadt) like :stadtand u.sperr like :sperres and u.actives like :actives]
      at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:634)
      at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:95)
      at org.jboss.ejb3.entity.TransactionScopedEntityManager.createQuery(TransactionScopedEntityManager.java:127)
      at kk.rentform.session.SearchUsr.searchQuery(SearchUsr.java:123)
      at kk.rentform.session.SearchUsr.updateResults(SearchUsr.java:94)
      at kk.rentform.session.SearchUsr.searchUsr(SearchUsr.java:68)
      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.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
      at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
      at org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:37)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
      at org.jboss.seam.interceptors.BijectionInterceptor.bijectNonreentrantComponent(BijectionInterceptor.java:79)
      at org.jboss.seam.interceptors.BijectionInterceptor.bijectComponent(BijectionInterceptor.java:58)
      at sun.reflect.GeneratedMethodAccessor124.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
      at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
      at org.jboss.seam.interceptors.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:36)
      at sun.reflect.GeneratedMethodAccessor126.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
      at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
      at org.jboss.seam.interceptors.OutcomeInterceptor.interceptOutcome(OutcomeInterceptor.java:21)
      Caused by: org.hibernate.hql.ast.QuerySyntaxException: unexpected token: lower near line 1, column 145 [from kk.rentform.entity.Usr u where lower(u.bname) like :bname and u.id LIKE :id and lower(u.mail) like :mail and lower(u.firma) like :firmaand lower(u.nname) like :nname and lower(u.stadt) like :stadtand u.sperr like :sperres and u.actives like :actives]
      at org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:31)
      at org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:24)
      at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:59)
      at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:258)
      at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:157)
      at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:111)
      at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:77)
      at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:56)
      at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72)
      at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133)
      at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112)
      at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1623)
      at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:92)
      at org.jboss.ejb3.entity.TransactionScopedEntityManager.createQuery(TransactionScopedEntityManager.java:127)
      at kk.rentform.session.SearchUsr.searchQuery(SearchUsr.java:123)
      at kk.rentform.session.SearchUsr.updateResults(SearchUsr.java:94)
      at kk.rentform.session.SearchUsr.searchUsr(SearchUsr.java:68)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)