Hi,
I am doing a jaas login through my code. I have placed my class files in a jar
file name myClient.jar. In the code i have set the config file as follows:
System.setProperty("java.security.auth.login.config","myConfig.conf");
I have placed this myConfig.conf file inside the myClient.jar and placed the
myClient.jar in my classpath.
I get the following error during login:
Exception in thread "main" java.lang.SecurityException: myConfig.conf(No such
fil
| at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:97)
| at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Meth
| at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstr
| at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Delegati
| at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
| at java.lang.Class.newInstance0(Class.java:308)
| at java.lang.Class.newInstance(Class.java:261)
| at
javax.security.auth.login.Configuration$3.run(Configuration.java:2
| at java.security.AccessController.doPrivileged(Native Method)
| at
javax.security.auth.login.Configuration.getConfiguration(Configura
| at
javax.security.auth.login.LoginContext$1.run(LoginContext.java:170
| at java.security.AccessController.doPrivileged(Native Method)
| at
javax.security.auth.login.LoginContext.init(LoginContext.java:167)
| at
javax.security.auth.login.LoginContext.<init>(LoginContext.java:40
| at
com.teradata.crm.processingengine.client.ProcessingEngineClient.lo
| at
com.teradata.crm.processingengine.client.ProcessingEngineClient.ma
| Caused by: java.io.IOException: myConfig.conf(No such file or directory)
| at com.sun.security.auth.login.ConfigFile.init(ConfigFile.java:157)
| at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:95)
| ... 15 more
I have put the
However, if i specify the exact path of the file as follows, then it works:
System.setProperty("java.security.auth.login.config","d:/MyTestDir/myClient.jar/myConfig.conf");
I DO NOT want to specify the absolute path in my code. Is there any solution
for this(apart from passing the file as an argument through command line during
executing the program)?
Thank you
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3885468#3885468
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3885468
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user