tomcat/lib?? That directory doesn't exist in the default distribution
from tomcat. Can you offer some details? In a normal distribution of
tomcat, database drivers go in the common/lib directory under tomcat.
Also it looks like the stack trace in your original message wasn't
complete. Was a root cause listed?
--David
Murtuza wrote:
thanks but i am already using it & thats wat i copied into my tomcat/lib
directory....this jdbc driver works fine from my java class but not with
tomcat jdbcrealm, i think its not picking up the mysql-jdbc.jar files from
tomcat/lib dir. although i copied it there.
Martin Gainty wrote:
this is a lightweight type 4 driver for MySQL which you can download at
http://dev.mysql.com/downloads/connector/j/5.0.html
Be sure to Read the GPL beforehand!
M--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed. If you have received this email message in error, please
notify
the sender immediately by telephone or email and destroy the original
message without making a copy. Thank you.
----- Original Message -----
From: "Murtuza" <[EMAIL PROTECTED]>
To: <users@tomcat.apache.org>
Sent: Friday, May 04, 2007 9:00 AM
Subject: Re: JDBCRealm
doesn't work if I change the server.xml also, I am providing the same
information ic context.xml. the same code works fine on my windows
machine
but not on linux. I think tomcat is not picking up the jdbc driver for
mysql
that I copied in the /catalina_home/lib directory, any one knows y its
not
picking up this driver.
-
Martin Gainty wrote:
Murtuza
here is server.xml example from Tomcat 5.5 docs where test is name of db
user=testr and password=testr
<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
driverName="org.gjt.mm.mysql.Driver"
connectionURL="jdbc:mysql://localhost/test?user=testr&password=testr"
userTable="logins" userNameCol="loginName" userCredCol="password"
userRoleTable="new_user_roles" roleNameCol="role_name"/>
HTH
Martin--
This email message and any files transmitted with it contain
confidential
information intended only for the person(s) to whom this email message
is
addressed. If you have received this email message in error, please
notify
the sender immediately by telephone or email and destroy the original
message without making a copy. Thank you.
----- Original Message -----
From: "Murtuza" <[EMAIL PROTECTED]>
To: <users@tomcat.apache.org>
Sent: Thursday, May 03, 2007 6:37 PM
Subject: Re: JDBCRealm
below is my context.xml file. I can connect to the mysql database from
a
java
class with the same username/pass.
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/security"
docBase="security"
debug="99">
<Realm className="org.apache.catalina.realm.JDBCRealm"
digest="MD5"
connectionName="testr"
connectionPassword="testr"
connectionURL="jdbc:mysql://localhost:3306/test"
debug="99"
driverName="com.mysql.jdbc.Driver"
roleNameCol="role_name"
userCredCol="password"
userNameCol="loginName"
userRoleTable="new_user_roles"
userTable="logins"
/>
</Context>
Martin Gainty wrote:
Have you verified the mysql listener is listening?
Have you verified the JDBCRealm is configured using the parameters
which
will allow you to connect?
If you are able to confirm both please post your JDBCRealm parameters
here
Martin
This email message and any files transmitted with it contain
confidential
information intended only for the person(s) to whom this email message
is
addressed. If you have received this email message in error, please
notify
the sender immediately by telephone or email and destroy the original
message without making a copy. Thank you.
----- Original Message -----
From: "Murtuza" <[EMAIL PROTECTED]>
To: <users@tomcat.apache.org>
Sent: Thursday, May 03, 2007 5:22 PM
Subject: JDBCRealm
-I am using mysql as database..
-I have mysql-connector-java-5.0.5 jdbc driver in my tomcat/lib
directory
-I am using JDBCRealm for authentication
-On my windows machine it works fine
-when I deployed it on linux box it does't work
-I get the foloowing error message from my localhost log file
....any idea
May 3, 2007 4:52:38 PM org.apache.catalina.realm.JDBCRealm start
SEVERE: Exception opening database connection
java.sql.SQLException: com.mysql.jdbc.Driver
at
org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:691)
at
org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:769)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
at
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1023)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1015)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at
org.apache.catalina.core.StandardService.start(StandardService.java:448)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at
org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
---
May 3, 2007 4:55:44 PM org.apache.catalina.realm.JDBCRealm
authenticate
SEVERE: Exception performing authentication
java.sql.SQLException: com.mysql.jdbc.Driver
at
org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:691)
at
org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:346)
at
org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:181)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:491)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
at java.lang.Thread.run(Thread.java:595)
--
View this message in context:
http://www.nabble.com/JDBCRealm-tf3689024.html#a10313417
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
View this message in context:
http://www.nabble.com/JDBCRealm-tf3689024.html#a10314414
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
View this message in context:
http://www.nabble.com/JDBCRealm-tf3689024.html#a10322242
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]