Thread: DBTableOraDataSourceLoginModule


Permlink Replies: 7 - Pages: 1 - Last Post: Aug 23, 2007 7:00 AM Last Post By: Brokenbone
Antonis Antoniou

Posts: 285
Registered: 01/05/05
DBTableOraDataSourceLoginModule
Posted: May 4, 2007 5:47 AM
Click to report abuse...   Click to reply to this thread Reply
Hi everyone,

I read in nearly every paper that the module DBTableOraDataSourceLoginModule is included in JDeveloper 10.1.3.2 and in OC4J but i cannot find it. Can anyone please help me as i followed the Frank's instructions (http://www.oracle.com/technology/products/jdev/howtos/1013/oc4jjaas/oc4j_jaas_login_module.htm) but with not luck.

Thanks
Antonis
jflack

Posts: 557
Registered: 08/18/98
Re: DBTableOraDataSourceLoginModule
Posted: May 4, 2007 7:29 AM   in response to: Antonis Antoniou in response to: Antonis Antoniou
Click to report abuse...   Click to reply to this thread Reply
Have you followed the instructions in the Troubleshooting section of the article? Specifically, did you turn on logging? I found the log to be a great help in diagnosing problems and getting this to work.
Frank Nimphius

Posts: 19,779
Registered: 01/10/01
Re: DBTableOraDataSourceLoginModule
Posted: May 4, 2007 8:48 AM   in response to: Antonis Antoniou in response to: Antonis Antoniou
Click to report abuse...   Click to reply to this thread Reply
Hi,

help is only as good as the question. What is the problem when you say "but with not luck"?

Frank
Antonis Antoniou

Posts: 285
Registered: 01/05/05
Re: DBTableOraDataSourceLoginModule
Posted: May 7, 2007 12:58 AM   in response to: Frank Nimphius in response to: Frank Nimphius
Click to report abuse...   Click to reply to this thread Reply
I have followed the document step by step. When i try to access a restricted page, instead of showing me the login screen i get permission denied page.

Also i tried in my directory of JDeveloper to find the DBTableOraDataSourceLoginModule jar file (also tried to search for DBLoginModule.jar) but i didn't find it. I am using JDeveloper 10.1.3.2.

Thanks
Antonis
Frank Nimphius

Posts: 19,779
Registered: 01/10/01
Re: DBTableOraDataSourceLoginModule
Posted: May 7, 2007 6:45 AM   in response to: Antonis Antoniou in response to: Antonis Antoniou
Click to report abuse...   Click to reply to this thread Reply
Hi,

DBTableOraDataSourceLoginModule doesn't eist in its own jar file. It is part of the JAZN Core jar file located in jdev/j2ee/home

If you run the app from the JDeveloper IDE you should see a message log printed telling you about what happens within teh login module. This print out includes the security roles aplied to the authenticated user. If you can see this, does it contain the required security role ? Make sure the security role in the database matches the security role name in the web.xml file.

If you don't see anything printed in teh Log window, open SQL Plus, connect as system and type

select username from v$session to see if the LogiNModule could connect to the database

Frank
Antonis Antoniou

Posts: 285
Registered: 01/05/05
Re: DBTableOraDataSourceLoginModule
Posted: May 7, 2007 7:25 AM   in response to: Frank Nimphius in response to: Frank Nimphius
Click to report abuse...   Click to reply to this thread Reply
I will try to start the tutorial from the begining and let you know.

Thanks
Antonis
Brokenbone

Posts: 454
Registered: 03/13/07
Re: DBTableOraDataSourceLoginModule
Posted: Aug 23, 2007 5:11 AM   in response to: Frank Nimphius in response to: Frank Nimphius
Click to report abuse...   Click to reply to this thread Reply
Hi there!

I also have a problem following that example. When trying to run the application I get the missing class WARNING:

23.8.2007 13:47:19 oracle.security.jazn.oc4j.OC4JUtil doJAASLogin
WARNING: unable to find LoginModule class:

Missing class:
oracle.security.jazn.login.module.db.DBTableOraDataSourceLoginModule


Dependent class: javax.security.auth.login.LoginContext
Loader: jre.bootstrap:1.5.0_06
Code-Source: unknown
Configuration: jre bootstrap

This load was initiated at current-workspace-app.web.MY_WEB_APP_NAME:0.0.0 using the Class.forName() method.

The missing class is not available from any code-source or loader in the system.
javax.security.auth.login.LoginException: unable to find LoginModule class:

Missing class:
oracle.security.jazn.login.module.db.DBTableOraDataSourceLoginModule


Dependent class: javax.security.auth.login.LoginContext
Loader: jre.bootstrap:1.5.0_06
Code-Source: unknown
Configuration: jre bootstrap

This load was initiated at current-workspace-app.web.MY_WEB_APP_NAME:0.0.0 using the Class.forName() method.

The missing class is not available from any code-source or loader in the system.
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:808)
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.GenericUser$1.run(JAZNUserManager.java:818)
at oracle.security.jazn.oc4j.OC4JUtil.doWithJAZNClsLdr(OC4JUtil.java:173)
at oracle.security.jazn.oc4j.GenericUser.authenticate(JAZNUserManager.java:814)
at oracle.security.jazn.oc4j.FilterUser.authenticate(JAZNUserManager.java:1143)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:707)
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)


Shouldn't this class be simply found? Is there something wrong with app names? I dont have current-workspace-app for my application name in JDeveloper.

Regards!

Brokenbone

Posts: 454
Registered: 03/13/07
Re: DBTableOraDataSourceLoginModule
Posted: Aug 23, 2007 7:00 AM   in response to: Brokenbone in response to: Brokenbone
Click to report abuse...   Click to reply to this thread Reply
I solved this: the problem was in system-jazn-data.xml file where I had
<class>
oracle.security.jazn.login.module.db.DBTableOraDataSourceLoginModule
</class>


instead of

<class>oracle.security.jazn.login.module.db.DBTableOraDataSourceLoginModule</class> (no line breaks)

Bye!
Legend
Guru Guru : 2500 - 1000000 pts
Expert Expert : 1000 - 2499 pts
Pro Pro : 500 - 999 pts
Journeyman Journeyman : 200 - 499 pts
Newbie Newbie : 0 - 199 pts
Oracle ACE Director
Oracle ACE Member
Oracle Employee ACE
Helpful Answer (5 pts)
Correct Answer (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums