Solved

JAAS authentication in java

Posted on 2014-01-31
3
792 Views
Last Modified: 2014-02-07
Hi,

I am trying below example
http://www.avajava.com/tutorials/lessons/how-do-i-create-a-login-module.html?page=2

when i run the JaasAuthenticationTest.java

I am getting error as below

Callback Handler - constructor called
Exception in thread "main" java.lang.SecurityException: jaas.config (No such file or directory)
      at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:93)



How fix this issue. I have cearly understood what author is trying to demonstrate in this example.

please advise
Any links resources ideas highly appreciated. Thanks in advance
JaasEx.jpg
0
Comment
Question by:gudii9
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 35

Accepted Solution

by:
girionis earned 500 total points
ID: 39826783
You need to have your jaas.config file in the same folder as your java class. If youhave it anywhere else you will need to provide the full path to the file. YOu can also pass the option from the command line

-Djava.security.auth.login.config=<full path to the jaas.config>
0
 
LVL 7

Author Comment

by:gudii9
ID: 39830872
when i try to create jaas.confi file(after clicking on the default package --->other--->text-->jaas without giving extension as jaas.txt then it is creatig as some asp fule which is not what i want). How to create config file. please advise
0
 
LVL 35

Expert Comment

by:girionis
ID: 39831738
Just rename it to the proper extension.
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question