tomcat版本jivejdon 无法定位登录配置

09-11-14 zifeng858
在eclipse中建立web工程,并引入相应的java文件,在tomcat中配置jaas,最后在eclipse中启动tomcat,在管理后台输入用户名和密码,报一下错误。最奇怪的是我把下载的jivejdon.war包放到webapps中,启动后可以成功登陆管理后台,这说明我tomcat环境没有错误。

2009-11-14 20:14:23 org.apache.catalina.realm.JAASRealm authenticate

严重: Unexpected error

java.lang.SecurityException: 无法定位登录配置

at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:93)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

at java.lang.Class.newInstance0(Class.java:355)

at java.lang.Class.newInstance(Class.java:308)

at javax.security.auth.login.Configuration$3.run(Configuration.java:246)

at java.security.AccessController.doPrivileged(Native Method)

at javax.security.auth.login.Configuration.getConfiguration(Configuration.java:241)

at javax.security.auth.login.LoginContext$1.run(LoginContext.java:237)

at java.security.AccessController.doPrivileged(Native Method)

at javax.security.auth.login.LoginContext.init(LoginContext.java:234)

at javax.security.auth.login.LoginContext.<init>(LoginContext.java:403)

at org.apache.catalina.realm.JAASRealm.authenticate(JAASRealm.java:345)

at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:258)

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:417)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)

at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)

at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)

at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)

at java.lang.Thread.run(Thread.java:619)

Caused by: java.io.IOException: 无法定位登录配置

at com.sun.security.auth.login.ConfigFile.init(ConfigFile.java:250)

at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:91)

... 24 more

oojdon
2009-11-14 20:50
那就不要在eclipse里面跑,编译出来跑

hahahahah
2010-06-02 19:56
在eclipse中启动tomcat,在 catalina.bat 配置的-Djava.security.auth.login.config=$CATALINA_BASE/conf/jaas.config 就不起作用,不知为何。。

可以在 Eclipse 里配置tomcat的时候,tomcat的jdk的参数(Optional Java VM arguments) 加上 -Djava.security.auth.login.config=D:/tomcat/tomcat_jdon/conf/jaas.config。注意路径要修改一下。

猜你喜欢