Comments on: Using database tables for authentication in ADF applications https://technology.amis.nl/2008/02/08/using-database-table-for-authentication-in-adf-applications/ Friends of Oracle and Java Wed, 01 Apr 2015 06:55:13 +0000 hourly 1 http://wordpress.org/?v=4.1.1 By: Shreyas https://technology.amis.nl/2008/02/08/using-database-table-for-authentication-in-adf-applications/#comment-5182 Mon, 20 Feb 2012 06:04:48 +0000 http://technology.amis.nl/blog/?p=2851#comment-5182 I found these errors when i change the performDbAuthentication function ..

Error(673,59): cannot find variable _data_source_name
Error(698,13): cannot find class FacesContext
Error(698,41): cannot find variable FacesContext
Error(699,13): cannot find class FacesMessage
Error(699,40): cannot find class FacesMessage
Error(699,53): cannot find variable FacesMessage
Error(60,31): package javax.faces.application does not exist
Error(61,27): package javax.faces.context does not exist

and have problem in import.

]]>
By: kunal https://technology.amis.nl/2008/02/08/using-database-table-for-authentication-in-adf-applications/#comment-5181 Fri, 02 Sep 2011 19:02:42 +0000 http://technology.amis.nl/blog/?p=2851#comment-5181 Please tell us what changes needs to be done while using jdeveloper 11.1.x i.e 11g.

i need it urgently.

Thanks a ton.

]]>
By: David Williams https://technology.amis.nl/2008/02/08/using-database-table-for-authentication-in-adf-applications/#comment-5180 Thu, 28 Jan 2010 17:00:14 +0000 http://technology.amis.nl/blog/?p=2851#comment-5180 It good to know you managed to make it work in 11g Subrata. I am also trying to authenticate against a DB using ADF security in Weblogic. It appears a lot has changed since 10g. Where did you go to find a solution? Any advice would be greatly appreciated.

]]>
By: Subrata Biswas https://technology.amis.nl/2008/02/08/using-database-table-for-authentication-in-adf-applications/#comment-5179 Mon, 28 Dec 2009 06:19:47 +0000 http://technology.amis.nl/blog/?p=2851#comment-5179 Anyway I forgot to put my point here, as I have successfuly done with Authentication against DB using ADF security in weblogic as well as Tomcat. Yes I was able to do it with 11.1.1.1.0 version. It’s pretty simple here. Anybody till fighting to achieve it, welcome with their query how to achieve it.

]]>
By: Subrata Biswas https://technology.amis.nl/2008/02/08/using-database-table-for-authentication-in-adf-applications/#comment-5178 Tue, 22 Sep 2009 08:40:41 +0000 http://technology.amis.nl/blog/?p=2851#comment-5178 Very nice document, But the main challange when we go to customise the same on 11G. It’s seems to be there is lots of changes compare with the version you have done. Even some of those described configuration file also not available(I am not talking about the location, Some at all not present)

I tried a lot with this but in vein. Did you happen to look into 11G? or do you have any example like this for 11G? Advance thanks for your positive answer.

]]>
By: Richard Hunt https://technology.amis.nl/2008/02/08/using-database-table-for-authentication-in-adf-applications/#comment-5177 Tue, 18 Aug 2009 19:20:23 +0000 http://technology.amis.nl/blog/?p=2851#comment-5177 This example works fine. Is there an example available for using 11G and weblogic security? I have the same issue as reply 5. I would using a simple database query involving three tables – would use something like the tables used in the example.

]]>
By: jt https://technology.amis.nl/2008/02/08/using-database-table-for-authentication-in-adf-applications/#comment-5176 Wed, 17 Jun 2009 20:25:28 +0000 http://technology.amis.nl/blog/?p=2851#comment-5176 Thanks so much for the information. This is exactly what I’m trying to do. I’m having some difficulty getting this example to work on my end. I’m new to all of this so I’m following this article pretty closely. I run my .jsp page and it redirects the page to my Login.jsp page. I put in username/password that I added to my database and it redirects me to my Logout.jsp page which is my error-page I added to my web.xml page.

In my Login.jsp page the form action is j_security_check. Where is this getting set? Or how is my ALSDBTableLoginModule getting called? I have added some printlns in my ALSDBTableLoginModule.login method and redeployed….nothing is showing up in my Embedded OC4J Server – Log console. Does this mean it’s not getting called or am I not looking in the right place for the println stmts. I also noticed that in my system-jazn-data.xml page I have an option name addAllRoles with value true and there isn’t an addAllRoles in my ALSDBTableLoginModule. Is there suppose to be?

Thanks for all of your help!

]]>
By: zhouxiao315@yahoo.com.cn https://technology.amis.nl/2008/02/08/using-database-table-for-authentication-in-adf-applications/#comment-5175 Thu, 30 Oct 2008 02:31:18 +0000 http://technology.amis.nl/blog/?p=2851#comment-5175 Im looking for solution to implement authentication by using database tables for ADF & Tomcat application server too!!!

]]>
By: andrew https://technology.amis.nl/2008/02/08/using-database-table-for-authentication-in-adf-applications/#comment-5174 Sat, 25 Oct 2008 14:12:26 +0000 http://technology.amis.nl/blog/?p=2851#comment-5174 Hi,
I use this example to login action, it works fine, but I can not perform logout action by session.invalidate(), when I call it by button action performDbAuthentication() is called twice so user is logged again.

Regards
Andrew

]]>
By: Lutchumaya https://technology.amis.nl/2008/02/08/using-database-table-for-authentication-in-adf-applications/#comment-5173 Tue, 30 Sep 2008 06:27:21 +0000 http://technology.amis.nl/blog/?p=2851#comment-5173 Hi I am trying to implement what you have been doing above. But for me it is not working . I have created the following steps but am seeing this in my log.

08/09/30 10:30:27 [DBTableLoginModule] option debug = true

08/09/30 10:30:27 [DBTableLoginModule] option jdbc Url =

08/09/30 10:30:27 [DBTableLoginModule] option jdbc Class = oracle.jdbc.driver.OracleDriver

08/09/30 10:30:27 [DBTableLoginModule] option log level = log all

08/09/30 10:30:27 [DBTableLoginModule] option logger class = null

08/09/30 10:30:27 [DBTableLoginModule] option db schema = null

08/09/30 10:30:27 [DBTableLoginModule] option user table = null

08/09/30 10:30:27 [DBTableLoginModule] option roles table = null

08/09/30 10:30:27 [DBTableLoginModule] option username column = null

08/09/30 10:30:27 [DBTableLoginModule] option password column = null

08/09/30 10:30:27 [DBTableLoginModule] option roles column = null

08/09/30 10:30:27 [DBTableLoginModule] option user pk column = null

08/09/30 10:30:27 [DBTableLoginModule] option roles fk column = null

08/09/30 10:30:27 [DBTableLoginModule] option password encoding class = null

08/09/30 10:30:27 [DBTableLoginModule] option realm_column = null

08/09/30 10:30:27 [DBTableLoginModule] option application_realm = null

08/09/30 10:30:27 [DBTableLoginModule] login called on DBTableLoginModule

08/09/30 10:30:27 [DBTableLoginModule] Calling callbackhandler …

08/09/30 10:30:27 [DBTableLoginModule] Username returned by callback = eilynn

08/09/30 10:30:27 jdev-connection-managed-rpt2 not found
08/09/30 10:30:27 [DBTableLoginModule] Abort called on LoginModule

Sep 30, 2008 10:30:27 AM oracle.security.jazn.oc4j.OC4JUtil doJAASLogin
WARNING: java.lang.NullPointerException
at oracle.sample.dbloginmodule.DBTableLM.SpoonDBTableModuleLogin.performDbAuthentication(SpoonDBTableModuleLogin.java:715)
at oracle.sample.dbloginmodule.DBTableLM.SpoonDBTableModuleLogin.login(SpoonDBTableModuleLogin.java:298)
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 javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
at oracle.security.jazn.oc4j.OC4JUtil.doJAASLogin(OC4JUtil.java:241)
at oracle.security.jazn.oc4j.RealmUserAdaptor$1.run(JAZNUserManager.java:1395)
at oracle.security.jazn.oc4j.OC4JUtil.doWithJAZNClsLdr(OC4JUtil.java:173)
at oracle.security.jazn.oc4j.RealmUserAdaptor.authenticate(JAZNUserManager.java:1390)
at oracle.security.jazn.oc4j.FilterUser.authenticate(JAZNUserManager.java:1143)
at com.evermind.server.http.EvermindHttpServletRequest.getUserPrincipalInternal(EvermindHttpServletRequest.java:3673)
at com.evermind.server.http.EvermindHttpServletRequest.getUserPrincipal(EvermindHttpServletRequest.java:3614)
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:384)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:623)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)

javax.security.auth.login.LoginException: java.lang.NullPointerException
at oracle.sample.dbloginmodule.DBTableLM.SpoonDBTableModuleLogin.performDbAuthentication(SpoonDBTableModuleLogin.java:715)
at oracle.sample.dbloginmodule.DBTableLM.SpoonDBTableModuleLogin.login(SpoonDBTableModuleLogin.java:298)
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 javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
at oracle.security.jazn.oc4j.OC4JUtil.doJAASLogin(OC4JUtil.java:241)
at oracle.security.jazn.oc4j.RealmUserAdaptor$1.run(JAZNUserManager.java:1395)
at oracle.security.jazn.oc4j.OC4JUtil.doWithJAZNClsLdr(OC4JUtil.java:173)
at oracle.security.jazn.oc4j.RealmUserAdaptor.authenticate(JAZNUserManager.java:1390)
at oracle.security.jazn.oc4j.FilterUser.authenticate(JAZNUserManager.java:1143)
at com.evermind.server.http.EvermindHttpServletRequest.getUserPrincipalInternal(EvermindHttpServletRequest.java:3673)
at com.evermind.server.http.EvermindHttpServletRequest.getUserPrincipal(EvermindHttpServletRequest.java:3614)
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:384)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:623)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)

at javax.security.auth.login.LoginContext.invoke(LoginContext.java:872)
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
at oracle.security.jazn.oc4j.OC4JUtil.doJAASLogin(OC4JUtil.java:241)
at oracle.security.jazn.oc4j.RealmUserAdaptor$1.run(JAZNUserManager.java:1395)
at oracle.security.jazn.oc4j.OC4JUtil.doWithJAZNClsLdr(OC4JUtil.java:173)
at oracle.security.jazn.oc4j.RealmUserAdaptor.authenticate(JAZNUserManager.java:1390)
at oracle.security.jazn.oc4j.FilterUser.authenticate(JAZNUserManager.java:1143)
at com.evermind.server.http.EvermindHttpServletRequest.getUserPrincipalInternal(EvermindHttpServletRequest.java:3673)
at com.evermind.server.http.EvermindHttpServletRequest.getUserPrincipal(EvermindHttpServletRequest.java:3614)
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:384)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:623)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
Sep 30, 2008 10:30:27 AM oracle.adf.view.faces.webapp.AdfFacesFilterHelper verifyFilterIsInstalled
WARNING: The AdfFacesFilter has not been installed. ADF Faces requires this filter for proper execution.
Process exited.

Can anyone help me please ..

Where did I go wrong?

Please help me.

Regards
Lutchumaya

]]>
By: ab https://technology.amis.nl/2008/02/08/using-database-table-for-authentication-in-adf-applications/#comment-5172 Mon, 08 Sep 2008 14:54:09 +0000 http://technology.amis.nl/blog/?p=2851#comment-5172 Hi, Nice articel. if I try to login I get the following error:
javax.faces.el.EvaluationException: oracle.classloader.util.AnnotatedNoClassDefFoundError:
Fehlende Klasse: javax.faces.context.FacesContext
Abhängige Klasse: demo.view.menu.CrmGui
Loader: default.root:0.0.0
Code-Source: /C:/Dokumente und Einstellungen/boutsoudine/Eigene Dateien/jdev/jdev/lib/DBLoginModule.jar
Konfiguration: in /C:/Dokumente und Einstellungen/boutsoudine/Eigene Dateien/jdev/jdev/system/oracle.j2ee.10.1.3.41.57/embedded-oc4j/config/application.xml
Die fehlende Klasse ist in den folgenden Speicherorten verfügbar:
1. Code-Source: /C:/Dokumente und Einstellungen/boutsoudine/Eigene Dateien/JavaDemoSimple/HussCRM/P260808/ViewController/public_html/WEB-INF/lib/jsf-api.jar (from WEB-INF/lib/ directory in C:\Dokumente und Einstellungen\boutsoudine\Eigene Dateien\JavaDemoSimple\HussCRM\P260808\ViewController\public_html\WEB-INF\lib)
Diese Code-Source ist im Loader current-workspace-app.web.KundeAdresse-ViewController-webapp:0.0.0 verfügbar. Dies ist ein untergeordnetes Objekt des abhängigen Loaders default.root:0.0.0.
at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:190)

The jar file jsf-api.jar is in my WEB-INF\lib
please any idea what is wrong thanks

]]>
By: Andy Dorfman https://technology.amis.nl/2008/02/08/using-database-table-for-authentication-in-adf-applications/#comment-5171 Mon, 12 May 2008 16:36:32 +0000 http://technology.amis.nl/blog/?p=2851#comment-5171 Very good article. Have you yet experimented with 11g? The jazn architecture seems to have changed pretty significantly, i cannot make the ends meet. If you by any chance have a tutorial like that available for 11g, i would definitely like to check it out. My authentication goes against ActiveDirectory, but the basic premise is the same.

]]>
By: Andriejus Putiatinas https://technology.amis.nl/2008/02/08/using-database-table-for-authentication-in-adf-applications/#comment-5170 Tue, 25 Mar 2008 10:37:44 +0000 http://technology.amis.nl/blog/?p=2851#comment-5170 Im looking for solution to implement authentication by using database tables for ADF & Tomcat application server, can anyone give me advise? Can i use this login module?

]]>
By: Johan Tuitel https://technology.amis.nl/2008/02/08/using-database-table-for-authentication-in-adf-applications/#comment-5169 Thu, 21 Feb 2008 09:30:56 +0000 http://technology.amis.nl/blog/?p=2851#comment-5169 To herman: Indeed you are wright, i will review my written code. The code will be reviewed by a colleague of mine somewhere in march. So look in this blog for any changes of the code.
To Mike: thanx for you’re suggestion

]]>
By: Mike Lehmann https://technology.amis.nl/2008/02/08/using-database-table-for-authentication-in-adf-applications/#comment-5168 Thu, 14 Feb 2008 05:46:55 +0000 http://technology.amis.nl/blog/?p=2851#comment-5168 Nice article. Not sure you were aware there is some similar built in functionality in the container proper in OAS 10.1.3 (formalizing a feature that was in previous releases but not formally supported). See here: http://download.oracle.com/docs/cd/B31017_01/web.1013/b28957/loginmod.htm#BABCDDAI .

Mike.

]]>