Solved

JAAS authentication in java

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Tomcat: Unable to run tomcat service. 2 30
maven module vs maven project 3 73
Notify sent to other threads in Java 9 43
American Express @Work site and Java 4 67
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
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…

733 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