Solved

JAAS authentication in java

Posted on 2014-01-31
3
718 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
  • 2
3 Comments
 
LVL 35

Accepted Solution

by:
girionis earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
Just rename it to the proper extension.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
scoresSpecial  challenge 13 40
bunnyEars2 challenge 6 66
Free Alternative to JIRA 4 51
get weblogic logged in user in java 2 39
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…

762 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now