Uploaded image for project: 'Seam Security'
  1. Seam Security
  2. SEAMSECURITY-65

Criteria queries executed by JPAIdentityStore are not setup properly

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.0.0.Final, 3.1.0.Final
    • Fix Version/s: None
    • Labels:
      None

      Description

      CriteriQuery.select() is not called on the criteria queries used in JPAIdentityStore. Some JPA implementations cannot execute the resulting queries. ObjectDB throws the following exception:

      java.lang.RuntimeException: com.objectdb.o._PersistenceException: Unexpected query token 'FROM' (SELECT is expected)
      at org.jboss.seam.security.IdentityImpl.authenticate(IdentityImpl.java:329)
      at org.jboss.seam.security.IdentityImpl.login(IdentityImpl.java:229)
      at org.jboss.seam.security.org$jboss$weld$bean-WEB-INF$lib$seam-security-3$0$0$Final-ManagedBean-class_org$jboss$seam$security$IdentityImpl_$$WeldClientProxy.login(org$jboss$weld$bean-WEB-INF$lib$seam-security-3$0$0$Final-ManagedBean-class_org$jboss$seam$security$IdentityImpl$$_WeldClientProxy.java)
      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:597)
      at com.sun.el.parser.AstValue.invoke(AstValue.java:234)
      at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297)
      at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:43)
      at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:56)
      at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
      at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
      at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
      at javax.faces.component.UICommand.broadcast(UICommand.java:315)
      at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
      at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
      at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:409)
      at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1534)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
      at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
      at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
      at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:326)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:227)
      at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:170)
      at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)
      at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
      at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
      at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
      at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
      at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
      at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
      at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
      at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
      at java.lang.Thread.run(Thread.java:662)
      Caused by: com.objectdb.o._PersistenceException: Unexpected query token 'FROM' (SELECT is expected)
      at com.objectdb.o._PersistenceException.b(_PersistenceException.java:45)
      at com.objectdb.o.JPE.g(JPE.java:140)
      at com.objectdb.o.ERR.f(ERR.java:59)
      at com.objectdb.o.OBC.onObjectDBError(OBC.java:1444)
      at com.objectdb.jpa.JpaQuery.getSingleResult(JpaQuery.java:617)
      at org.jboss.seam.security.management.picketlink.JpaIdentityStore.lookupIdentity(JpaIdentityStore.java:1233)
      at org.jboss.seam.security.management.picketlink.JpaIdentityStore.validateCredential(JpaIdentityStore.java:1899)
      at org.picketlink.idm.impl.repository.WrapperIdentityStoreRepository.validateCredential(WrapperIdentityStoreRepository.java:303)
      at org.picketlink.idm.impl.api.session.managers.AttributesManagerImpl.validateCredentials(AttributesManagerImpl.java:607)
      at com.asalsolutions.security.auth.TijAuthenticator.authenticate(TijAuthenticator.java:82)
      at org.jboss.seam.security.IdentityImpl.authenticate(IdentityImpl.java:305)
      ... 45 more
      Caused by: com.objectdb.o.UserException: Unexpected query token 'FROM' (SELECT is expected)
      at com.objectdb.o.MSG.d(MSG.java:61)
      at com.objectdb.o.TKN.J(TKN.java:755)
      at com.objectdb.o.TKI.u(TKI.java:256)
      at com.objectdb.o.TKI.n(TKI.java:133)
      at com.objectdb.o.QPR.s(QPR.java:276)
      at com.objectdb.o.QPR.o(QPR.java:145)
      at com.objectdb.o.QRC.<init>(QRC.java:119)
      at com.objectdb.o.QRM.UR(QRM.java:242)
      at com.objectdb.o.MST.UR(MST.java:878)
      at com.objectdb.o.WRA.UR(WRA.java:286)
      at com.objectdb.o.WSM.UR(WSM.java:113)
      at com.objectdb.o.QRR.g(QRR.java:220)
      at com.objectdb.o.QRR.b(QRR.java:143)
      at com.objectdb.jpa.JpaQuery.getSingleResult(JpaQuery.java:610)
      ... 51 more

        Attachments

          Activity

            People

            Assignee:
            lightguard Jason Porter
            Reporter:
            sakariye Zakaria Yussuf (Inactive)
            Archiver:
            samahaja Sagar Mahajan

              Dates

              Created:
              Updated:
              Archived: