2
我在Tomcat中部署了一個應用程序,當試圖登錄時,它拋出了這個錯誤。java.lang.SecurityException:無法找到登錄配置
java.lang.SecurityException: Unable to locate a login configuration
com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:93)
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
java.lang.reflect.Constructor.newInstance(Constructor.java:513)
java.lang.Class.newInstance0(Class.java:355)
java.lang.Class.newInstance(Class.java:308)
javax.security.auth.login.Configuration$3.run(Configuration.java:247)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.login.Configuration.getConfiguration(Configuration.java:242)
javax.security.auth.login.LoginContext$1.run(LoginContext.java:237)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.login.LoginContext.init(LoginContext.java:234)
javax.security.auth.login.LoginContext.<init>(LoginContext.java:403)
com.cognizant.dcipher.server.actions.LoginServlet.doGet(LoginServlet.java:57)
com.cognizant.dcipher.server.actions.LoginServlet.doPost(LoginServlet.java:132)
javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
我在java.security
文件中的JDK設置login.config.url.1=file:C:/apache-tomcat-5.5.33/webapps/Dcipher/WEB-INF/classes/jaas.config
。
是否有人可以幫助我在此
@ david..it仍然不工作.... – nowfal 2011-04-04 07:07:19
當我在EClipse IDE中運行相同的應用程序時我收到了一個不同的異常: – nowfal 2011-04-14 07:48:23
java.lang.NoClassDefFoundError:FileAppender \t java.lang.ClassLoader.defineClass1(Native Method) \t java.lang.ClassLoader.defineClassCond(Unknown Source) \t java.lang.ClassLoader.defineClass(Unknown Source) \t java.security.SecureClassLoader.defineClass(Unknown Source) – nowfal 2011-04-14 07:51:42