Solved

JAAS authentication in java

Posted on 2014-01-31
3
763 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

911 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

20 Experts available now in Live!

Get 1:1 Help Now