Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ADF security: Login / Logout error

2807462Dec 15 2015 — edited Dec 16 2015

Dear Experts,

Lately I've been applying ADF security to an application of mine. In this application, I used form-based authentication. On my default weblogic server, I created a group called "AuthenticatedUserGroup", inside of which there is a user "user1", password "welcome1". Login works as expected. However I am facing a problem with the logout. For the log out functionality I created a commandLink:

<af:commandImageLink text="Logout" id="commandImageLink1" icon="/image/glbl_logout.gif"

             rendered="#{securityContext.authenticated}" partialSubmit="true"

             immediate="false"

    action="#{SecurityBean.logout}"/>

the logout method is inside the bean "SecurityBean":

The problem I'm facing is that I login first; successfully reach the welcome screen, and then logout. Logging out directs me to the login screen again. I enter my credentials and login, I face the error "faceContext not found".

pastedImage_0.png

Server log:

<Error> <HTTP> <BEA-101020> <[ServletContext@832551388[app:SecureAccessApplication module:SecureAccessApplication-ViewController-context-root path:/SecureAccessApplication-ViewController-context-root spec-version:2.5]] Servlet failed with Exception

java.lang.RuntimeException: Cannot find FacesContext

at javax.faces.webapp.UIComponentClassicTagBase.getFacesContext(UIComponentClassicTagBase.java:2122)

at javax.faces.webapp.UIComponentClassicTagBase.setJspId(UIComponentClassicTagBase.java:1933)

at jsp\_servlet.\_\_welcome\_jspx.\_jspx\_\_\_tag0(\_\_welcome\_jspx.java:90)

at jsp\_servlet.\_\_welcome\_jspx.\_jspService(\_\_welcome\_jspx.java:65)

at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)

Truncated. see log file for complete stacktrace

>

<Dec 15, 2015 6:02:14 PM EET> <Notice> <Diagnostics> <BEA-320068> <Watch 'UncheckedException' with severity 'Notice' on server 'DefaultServer' has triggered at Dec 15, 2015 6:02:14 PM EET. Notification details:

WatchRuleType: Log

WatchRule: (SEVERITY = 'Error') AND ((MSGID = 'WL-101020') OR (MSGID = 'WL-101017') OR (MSGID = 'WL-000802') OR (MSGID = 'BEA-101020') OR (MSGID = 'BEA-101017') OR (MSGID = 'BEA-000802'))

WatchData: DATE = Dec 15, 2015 6:02:14 PM EET SERVER = DefaultServer MESSAGE = [ServletContext@832551388[app:SecureAccessApplication module:SecureAccessApplication-ViewController-context-root path:/SecureAccessApplication-ViewController-context-root spec-version:2.5]] Servlet failed with Exception

java.lang.RuntimeException: Cannot find FacesContext

at javax.faces.webapp.UIComponentClassicTagBase.getFacesContext(UIComponentClassicTagBase.java:2122)

at javax.faces.webapp.UIComponentClassicTagBase.setJspId(UIComponentClassicTagBase.java:1933)

at jsp\_servlet.\_\_welcome\_jspx.\_jspx\_\_\_tag0(\_\_welcome\_jspx.java:90)

at jsp\_servlet.\_\_welcome\_jspx.\_jspService(\_\_welcome\_jspx.java:65)

at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)

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.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)

at java.security.AccessController.doPrivileged(Native Method)

at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:324)

at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)

at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)

at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)

at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)

at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)

at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:163)

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.wrapRun(WebAppServletContext.java:3715)

at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)

at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)

at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)

at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)

at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)

at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)

at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)

at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)

SUBSYSTEM = HTTP USERID = <WLS Kernel> SEVERITY = Error THREAD = [ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)' MSGID = BEA-101020 MACHINE = Mohammad-PC TXID = CONTEXTID = 50051ef35305b85b:4b4c59ea:151a4690cad:-8000-0000000000001470 TIMESTAMP = 1450195334736

WatchAlarmType: AutomaticReset

WatchAlarmResetPeriod: 30000

>

Advice Highly appreciated

JDeveloper 11.1.1.7

Weblogic 10.3.5

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 13 2016
Added on Dec 15 2015
3 comments
1,800 views