tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chirag <csp...@yahoo.co.in>
Subject Realm in Context in War
Date Mon, 29 Aug 2005 18:02:56 GMT
Software
--------
Tomcat 5.5.2
JDK 1.5


I have created a webapplication named b
It works perfectly fine including the realm declared
inside the context.xml file in META-INF folder

THen I created war by using

C:\webapps\b>jar cvf c.war *.*

Later I copied c.war in the webapps folder and started
Tomcat

but when i try to login it throws an exception

-------------------------------------------

Aug 29, 2005 11:21:50 PM
org.apache.catalina.realm.JAASRealm authenticate
SEVERE: Unexpected error
java.lang.SecurityException: Unable to locate a login
configuration
        at
com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:97)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)

        at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
        at
java.lang.reflect.Constructor.newInstance(Constructor.java:494)
        at
java.lang.Class.newInstance0(Class.java:350)
        at java.lang.Class.newInstance(Class.java:303)
        at
javax.security.auth.login.Configuration$3.run(Configuration.java:216)

        at
java.security.AccessController.doPrivileged(Native
Method)
        at
javax.security.auth.login.Configuration.getConfiguration(Configuratio
n.java:210)
        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:298)
        at
org.apache.catalina.authenticator.FormAuthenticator.authenticate(Form
Authenticator.java:230)
        at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
torBase.java:391)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:126)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:106)
        at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
526)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:107)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:148)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:799)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ssConnection(Http11Protocol.java:705)
        at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:576)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:684)
        at java.lang.Thread.run(Thread.java:595)
Caused by: java.io.IOException: Unable to locate a
login configuration
        at
com.sun.security.auth.login.ConfigFile.init(ConfigFile.java:206)
        at
com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:95)
        ... 26 more

----------------------------------------------------

I have used the following Realm Tag in context.xml
which works perfectly fine in webapplication b but not
in c.war

<Realm 
className="org.apache.catalina.realm.JDBCRealm"
debug="99" driverName="com.mysql.jdbc.Driver"         
connectionURL="jdbc:mysql://localhost:3306/db1"       
 connectionName="root" connectionPassword="b"         
    userTable="mastercompany" userNameCol="EmailAdd"
userCredCol="password"         
userRoleTable="user_roles" roleNameCol="role_name" />


Thanks in advance

CSJakharia

 Subscribe to bermudaEmail:  [input]  [input]  Browse Archives at groups-beta.google.com 




		
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message