2 Replies Latest reply on Aug 16, 2010 1:14 PM by Hani

    javax.naming.NameNotFoundException: Unable to resolve

    Hani
      Dear friends,
      I am doing simple application EJB3 with JSF but I got this exception any help please.

      javax.naming.NameNotFoundException: Unable to resolve 'SessionEJB'. Resolved ''; remaining name 'SessionEJB'
           at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139)
           at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:252)
           at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:182)
           at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:206)
           at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:254)
           at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:393)
           at javax.naming.InitialContext.lookup(InitialContext.java:392)
           at asu.view.backing.Login.validate(Login.java:127)
           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:157)
           at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
           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:387)
           at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
           at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
           at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:698)
           at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:285)
           at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
           at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
           at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
           at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
           at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
           at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
           at oracle.adf.share.http.ServletADFFilter.doFilter(ServletADFFilter.java:62)
           at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
           at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
           at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
           at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
           at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
           at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
           at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
           at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
           at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
           at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
           at java.security.AccessController.doPrivileged(Native Method)
           at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
           at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:414)
           at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
           at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
           at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
           at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
           at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
           at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
           at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
           at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
           at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
           at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
           at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
           at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
           at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
           at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
           at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
           at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
        • 1. Re: javax.naming.NameNotFoundException: Unable to resolve
          Hani
          now I got this error,
          even my select is simple

          javax.ejb.EJBException: EJB Exception: ; nested exception is:
               java.lang.IllegalArgumentException: An exception occurred while creating a query in EntityManager:
          Exception Description: Error compiling the query [select o.username , o.password from Authentication o where username=:p_username ], line 1, column 59: unknown identification variable [username]. The FROM clause of the query does not declare an identification variable [username].; nested exception is: java.lang.IllegalArgumentException: An exception occurred while creating a query in EntityManager:
          Exception Description: Error compiling the query [select o.username , o.password from Authentication o where username=:p_username ], line 1, column 59: unknown identification variable [username]. The FROM clause of the query does not declare an identification variable [username].
          java.lang.IllegalArgumentException: An exception occurred while creating a query in EntityManager:
          Exception Description: Error compiling the query [select o.username , o.password from Authentication o where username=:p_username ], line 1, column 59: unknown identification variable [username]. The FROM clause of the query does not declare an identification variable [username].
               at org.eclipse.persistence.internal.jpa.EntityManagerImpl.createQuery(EntityManagerImpl.java:1328)
               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 weblogic.deployment.BasePersistenceContextProxyImpl.invoke(BasePersistenceContextProxyImpl.java:93)
               at weblogic.deployment.TransactionalEntityManagerProxyImpl.invoke(TransactionalEntityManagerProxyImpl.java:91)
               at weblogic.deployment.BasePersistenceContextProxyImpl.invoke(BasePersistenceContextProxyImpl.java:80)
               at weblogic.deployment.TransactionalEntityManagerProxyImpl.invoke(TransactionalEntityManagerProxyImpl.java:26)
               at $Proxy144.createQuery(Unknown Source)
               at asu.model.SessionEJBBean.validateLogin(SessionEJBBean.java:51)
               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.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
               at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
               at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
               at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
               at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
               at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
               at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:37)
               at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
               at com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:50)
               at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
               at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
               at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
               at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
               at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
               at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
               at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
               at $Proxy147.validateLogin(Unknown Source)
               at asu.model.SessionEJB_qxt9um_SessionEJBImpl.validateLogin(SessionEJB_qxt9um_SessionEJBImpl.java:316)
               at asu.model.SessionEJB_qxt9um_SessionEJBImpl_CBV.validateLogin(Unknown Source)
               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 weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:84)
               at $Proxy145.validateLogin(Unknown Source)
               at asu.view.backing.Login.validate(Login.java:129)
               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:157)
               at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
               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:387)
               at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
               at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
               at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:698)
               at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:285)
               at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
               at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
               at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
               at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
               at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
               at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
               at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
               at oracle.adf.share.http.ServletADFFilter.doFilter(ServletADFFilter.java:62)
               at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
               at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
               at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
               at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
               at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
               at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
               at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
               at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
               at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
               at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
               at java.security.AccessController.doPrivileged(Native Method)
               at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
               at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:414)
               at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
               at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
               at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
               at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
               at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
               at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
               at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
               at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
               at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
               at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
               at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
               at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
               at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
               at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
               at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
               at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
          Caused by: Exception [EclipseLink-8004] (Eclipse Persistence Services - 2.0.2.v20100323-r6872): org.eclipse.persistence.exceptions.JPQLException
          Exception Description: Error compiling the query [select o.username , o.password from Authentication o where username=:p_username ], line 1, column 59: unknown identification variable [username]. The FROM clause of the query does not declare an identification variable [username].
               at org.eclipse.persistence.exceptions.JPQLException.aliasResolutionException(JPQLException.java:192)
               at org.eclipse.persistence.internal.jpa.parsing.VariableNode.validate(VariableNode.java:166)
               at org.eclipse.persistence.internal.jpa.parsing.Node.validate(Node.java:91)
               at org.eclipse.persistence.internal.jpa.parsing.BinaryOperatorNode.validate(BinaryOperatorNode.java:34)
               at org.eclipse.persistence.internal.jpa.parsing.EqualsNode.validate(EqualsNode.java:41)
               at org.eclipse.persistence.internal.jpa.parsing.WhereNode.validate(WhereNode.java:34)
               at org.eclipse.persistence.internal.jpa.parsing.ParseTree.validate(ParseTree.java:211)
               at org.eclipse.persistence.internal.jpa.parsing.ParseTree.validate(ParseTree.java:187)
               at org.eclipse.persistence.internal.jpa.parsing.ParseTree.validate(ParseTree.java:177)
               at org.eclipse.persistence.internal.jpa.parsing.JPQLParseTree.populateReadQueryInternal(JPQLParseTree.java:110)
               at org.eclipse.persistence.internal.jpa.parsing.JPQLParseTree.populateQuery(JPQLParseTree.java:84)
               at org.eclipse.persistence.internal.jpa.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:202)
               at org.eclipse.persistence.internal.jpa.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:173)
               at org.eclipse.persistence.internal.jpa.EJBQueryImpl.<init>(EJBQueryImpl.java:125)
               at org.eclipse.persistence.internal.jpa.EJBQueryImpl.<init>(EJBQueryImpl.java:109)
               at org.eclipse.persistence.internal.jpa.EntityManagerImpl.createQuery(EntityManagerImpl.java:1326)
               ... 90 more
          javax.ejb.EJBException: EJB Exception: ; nested exception is:
               java.lang.IllegalArgumentException: An exception occurred while creating a query in EntityManager:
          Exception Description: Error compiling the query [select o.username , o.password from Authentication o where username=:p_username ], line 1, column 59: unknown identification variable [username]. The FROM clause of the query does not declare an identification variable [username].; nested exception is: java.lang.IllegalArgumentException: An exception occurred while creating a query in EntityManager:
          Exception Description: Error compiling the query [select o.username , o.password from Authentication o where username=:p_username ], line 1, column 59: unknown identification variable [username]. The FROM clause of the query does not declare an identification variable [username].
               at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.unwrapRemoteException(RemoteBusinessIntfProxy.java:120)
               at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:102)
               at $Proxy145.validateLogin(Unknown Source)
               at asu.view.backing.Login.validate(Login.java:129)
               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:157)
               at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
               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:387)
               at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
               at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
               at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:698)
               at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:285)
               at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
               at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
               at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
               at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
               at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
               at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
               at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
               at oracle.adf.share.http.ServletADFFilter.doFilter(ServletADFFilter.java:62)
               at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
               at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
               at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
               at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
               at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
               at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
               at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
               at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
               at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
               at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
               at java.security.AccessController.doPrivileged(Native Method)
               at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
               at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:414)
               at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
               at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
               at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
               at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
               at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
               at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
               at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
               at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
               at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
               at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
               at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
               at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
               at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
               at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
               at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
               at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
          Caused by: java.lang.IllegalArgumentException: An exception occurred while creating a query in EntityManager:
          Exception Description: Error compiling the query [select o.username , o.password from Authentication o where username=:p_username ], line 1, column 59: unknown identification variable [username]. The FROM clause of the query does not declare an identification variable [username].
               at org.eclipse.persistence.internal.jpa.EntityManagerImpl.createQuery(EntityManagerImpl.java:1328)
               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 weblogic.deployment.BasePersistenceContextProxyImpl.invoke(BasePersistenceContextProxyImpl.java:93)
               at weblogic.deployment.TransactionalEntityManagerProxyImpl.invoke(TransactionalEntityManagerProxyImpl.java:91)
               at weblogic.deployment.BasePersistenceContextProxyImpl.invoke(BasePersistenceContextProxyImpl.java:80)
               at weblogic.deployment.TransactionalEntityManagerProxyImpl.invoke(TransactionalEntityManagerProxyImpl.java:26)
               at $Proxy144.createQuery(Unknown Source)
               at asu.model.SessionEJBBean.validateLogin(SessionEJBBean.java:51)
               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.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
               at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
               at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
               at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
               at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
               at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
               at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:37)
               at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
               at com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:50)
               at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
               at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
               at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
               at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
               at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
               at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
               at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
               at $Proxy147.validateLogin(Unknown Source)
               at asu.model.SessionEJB_qxt9um_SessionEJBImpl.validateLogin(SessionEJB_qxt9um_SessionEJBImpl.java:316)
               at asu.model.SessionEJB_qxt9um_SessionEJBImpl_CBV.validateLogin(Unknown Source)
               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 weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:84)
               ... 52 more
          Caused by: Exception [EclipseLink-8004] (Eclipse Persistence Services - 2.0.2.v20100323-r6872): org.eclipse.persistence.exceptions.JPQLException
          Exception Description: Error compiling the query [select o.username , o.password from Authentication o where username=:p_username ], line 1, column 59: unknown identification variable [username]. The FROM clause of the query does not declare an identification variable [username].
               at org.eclipse.persistence.exceptions.JPQLException.aliasResolutionException(JPQLException.java:192)
               at org.eclipse.persistence.internal.jpa.parsing.VariableNode.validate(VariableNode.java:166)
               at org.eclipse.persistence.internal.jpa.parsing.Node.validate(Node.java:91)
               at org.eclipse.persistence.internal.jpa.parsing.BinaryOperatorNode.validate(BinaryOperatorNode.java:34)
               at org.eclipse.persistence.internal.jpa.parsing.EqualsNode.validate(EqualsNode.java:41)
               at org.eclipse.persistence.internal.jpa.parsing.WhereNode.validate(WhereNode.java:34)
               at org.eclipse.persistence.internal.jpa.parsing.ParseTree.validate(ParseTree.java:211)
               at org.eclipse.persistence.internal.jpa.parsing.ParseTree.validate(ParseTree.java:187)
               at org.eclipse.persistence.internal.jpa.parsing.ParseTree.validate(ParseTree.java:177)
               at org.eclipse.persistence.internal.jpa.parsing.JPQLParseTree.populateReadQueryInternal(JPQLParseTree.java:110)
               at org.eclipse.persistence.internal.jpa.parsing.JPQLParseTree.populateQuery(JPQLParseTree.java:84)
               at org.eclipse.persistence.internal.jpa.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:202)
               at org.eclipse.persistence.internal.jpa.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:173)
               at org.eclipse.persistence.internal.jpa.EJBQueryImpl.<init>(EJBQueryImpl.java:125)
               at org.eclipse.persistence.internal.jpa.EJBQueryImpl.<init>(EJBQueryImpl.java:109)
               at org.eclipse.persistence.internal.jpa.EntityManagerImpl.createQuery(EntityManagerImpl.java:1326)
               ... 90 more
          • 2. Re: javax.naming.NameNotFoundException: Unable to resolve
            Hani
            why no one answer this question, I got the first error again. I need the answer please. I searched a lot in internet and worked around but no success.