You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Murtuza <kh...@gmail.com> on 2007/05/03 23:22:57 UTC
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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: JDBCRealm
Posted by Murtuza <kh...@gmail.com>.
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" <kh...@gmail.com>
> To: <us...@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" <kh...@gmail.com>
>>> To: <us...@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" <kh...@gmail.com>
>>>>> To: <us...@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: users-unsubscribe@tomcat.apache.org
>>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To start a new topic, e-mail: users@tomcat.apache.org
>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> 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: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>>
>> --
>> 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: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/JDBCRealm-tf3689024.html#a10322637
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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: JDBCRealm
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Christopher Schultz [mailto:chris@christopherschultz.net]
> Subject: Re: JDBCRealm
>
> I believe the OP said he was running on TC 5.0.
Actually, he didn't. He did refer to level 5.0.5 of the MySQL JDBC
driver, and Martin gave a reference to 5.5 documentation. The OP has
not explicitly stated what level he's on, but his last e-mail implies
6.0. It's quite possible that he's changing Tomcat levels as well as
platforms, and could therefore be using the wrong doc for configuring
the JDBCRealm and jar location.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: JDBCRealm
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Chuck,
Caldarale, Charles R wrote:
>> From: David Smith [mailto:dns4@cornell.edu]
>> Subject: Re: JDBCRealm
>>
>> tomcat/lib?? That directory doesn't exist in the default
>> distribution from tomcat.
>
> It does in the 6.0 versions of Tomcat, where the classloader hierarchy
> has been greatly simplified.
I believe the OP said he was running on TC 5.0.
He was also switching from Microsoft Windows to *NIX, I think, and
didn't say anything about the target TC version.
The symptoms certainly point to the driver being in the wrong place.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGO0zI9CaO5/Lv0PARAgBiAJ9DkI1PtPT89d2Bi7nT4ZIIPciePACbBbgn
OhEA06//BTv9OQZ3gqWMj08=
=jRc3
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: JDBCRealm
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: David Smith [mailto:dns4@cornell.edu]
> Subject: Re: JDBCRealm
>
> tomcat/lib?? That directory doesn't exist in the default
> distribution from tomcat.
It does in the 6.0 versions of Tomcat, where the classloader hierarchy
has been greatly simplified.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: JDBCRealm
Posted by Murtuza <kh...@gmail.com>.
well I think it changed in tomcat 6.0, its now in catalina_home/lib.
the stack trace was from log files, from the user side it just failes
autherization.
David Smith-2 wrote:
>
> 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" <kh...@gmail.com>
>>>To: <us...@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" <kh...@gmail.com>
>>>>>To: <us...@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" <kh...@gmail.com>
>>>>>>>To: <us...@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: users-unsubscribe@tomcat.apache.org
>>>>>>>>For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>---------------------------------------------------------------------
>>>>>>>To start a new topic, e-mail: users@tomcat.apache.org
>>>>>>>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>>>>>For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>--
>>>>>>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: users-unsubscribe@tomcat.apache.org
>>>>>>For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>---------------------------------------------------------------------
>>>>>To start a new topic, e-mail: users@tomcat.apache.org
>>>>>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>>>For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>--
>>>>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: users-unsubscribe@tomcat.apache.org
>>>>For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>>
>>>>
>>>>
>>>---------------------------------------------------------------------
>>>To start a new topic, e-mail: users@tomcat.apache.org
>>>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/JDBCRealm-tf3689024.html#a10324561
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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: JDBCRealm
Posted by David Smith <dn...@cornell.edu>.
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" <kh...@gmail.com>
>>To: <us...@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" <kh...@gmail.com>
>>>>To: <us...@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" <kh...@gmail.com>
>>>>>>To: <us...@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: users-unsubscribe@tomcat.apache.org
>>>>>>>For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>---------------------------------------------------------------------
>>>>>>To start a new topic, e-mail: users@tomcat.apache.org
>>>>>>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>>>>For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>--
>>>>>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: users-unsubscribe@tomcat.apache.org
>>>>>For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>>---------------------------------------------------------------------
>>>>To start a new topic, e-mail: users@tomcat.apache.org
>>>>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>>For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>>
>>>>
>>>>
>>>>
>>>--
>>>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: users-unsubscribe@tomcat.apache.org
>>>For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>>>
>>---------------------------------------------------------------------
>>To start a new topic, e-mail: users@tomcat.apache.org
>>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>>
>>
>
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: JDBCRealm
Posted by Murtuza <kh...@gmail.com>.
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" <kh...@gmail.com>
> To: <us...@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" <kh...@gmail.com>
>>> To: <us...@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" <kh...@gmail.com>
>>>>> To: <us...@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: users-unsubscribe@tomcat.apache.org
>>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To start a new topic, e-mail: users@tomcat.apache.org
>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> 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: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>>
>> --
>> 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: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/JDBCRealm-tf3689024.html#a10322634
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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: JDBCRealm
Posted by Martin Gainty <mg...@hotmail.com>.
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" <kh...@gmail.com>
To: <us...@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" <kh...@gmail.com>
>> To: <us...@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" <kh...@gmail.com>
>>>> To: <us...@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: users-unsubscribe@tomcat.apache.org
>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>
>>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To start a new topic, e-mail: users@tomcat.apache.org
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>>
>>>>
>>>
>>> --
>>> 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: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>
> --
> 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: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: JDBCRealm
Posted by Murtuza <kh...@gmail.com>.
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" <kh...@gmail.com>
> To: <us...@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" <kh...@gmail.com>
>>> To: <us...@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: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>>
>> --
>> 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: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
--
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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: JDBCRealm
Posted by Martin Gainty <mg...@hotmail.com>.
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" <kh...@gmail.com>
To: <us...@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" <kh...@gmail.com>
>> To: <us...@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: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>
> --
> 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: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: JDBCRealm
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Murtuza,
> <Context path="/security"
> docBase="security"
You should specify neither the "path" nor the "docBase" attributes when
you are using a context.xml file. This is probably not the problem, but
could be causing some other problems.
The only thing I can think of is that you have your MySQL driver JAR
file in the wrong place. You said you had it in $TOMCAT_HOME/lib... I
think you want it in $TOMCAT_HOME/common/lib.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGOm6E9CaO5/Lv0PARAudAAJ9xjZ52kMIAn2H3U1O9GnRjy795rQCdHxlt
6cTl8B8MXaIjRVAWGncENPE=
=hwrW
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: JDBCRealm
Posted by Murtuza <kh...@gmail.com>.
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" <kh...@gmail.com>
> To: <us...@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: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
--
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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: JDBCRealm
Posted by Martin Gainty <mg...@hotmail.com>.
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" <kh...@gmail.com>
To: <us...@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: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org