maybe I'm on such an old version, but I can't pass parameters thru my conn 
string like you have here.

-----Original Message-----
From: Martin Gainty [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 03, 2007 7:03 PM
To: Tomcat Users List
Subject: Re: JDBCRealm


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&amp;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]


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  • RE: JDBCRealm Propes, Barry L

Reply via email to