RE: How to logout after login with JDBCRealm?

2005-10-03 Thread Raghupathy,Gurumoorthy
What type of authentication are you using ? FORM / BASIC ?


If Basic then no you cant 
If form based then ( sesssion.invalidate() ) 

Guru

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 03 October 2005 03:08
To: Tomcat Users List
Subject: How to logout after login with JDBCRealm?


The webapp is enabled with JDBCRealm.
After login, how to logout without closing the browser?

Thnx

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to logout after login with JDBCRealm?

2005-10-02 Thread 梁炳場
The webapp is enabled with JDBCRealm.
After login, how to logout without closing the browser?

Thnx

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JDBCRealm Problem - Connected to DB but not authenticating

2005-09-22 Thread pstupp (sent by Nabble.com)

I'm using a JDBCRealm with Tomcat 5.0. I have created the tables, configured 
the Realm and can see the database connection in Oracle. 

When I try to log onto the web application I see the following request in Oracle

SELECT user_pass 
FROM users 
WHERE user_name = :1

but the login fails. I have tried both plaintext and SHA encrypted passwords, 
both of which work fine when using the memory realm and tomcat-users.xml.

Any thoughts?

Thanks in advance.

--
Sent from the Tomcat - User forum at Nabble.com:
http://www.nabble.com/JDBCRealm-Problem---Connected-to-DB-but-not-authenticating-t335080.html#a932223


Re: After 1st installation of JDBCRealm?

2005-09-04 Thread Mark Thomas
> Can JDBCRealm support a user has more than 1 roles?

Yes.

> Can the SecurityManager support controlling path of Struts such  as
> /fooApp/fooPath.do?
>>Yes you can but this is not at all related to application users/roles.
>>See
>>http://java.sun.com/j2se/1.4.2/docs/guide/security/smPortGuide.html
>>for what this does.

Again, please read the security manager docs. It has *nothing* to do
with web application user/roles.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: After 1st installation of JDBCRealm?

2005-09-04 Thread 梁炳場
Thank you.

Can JDBCRealm support a user has more than 1 roles?

Can the SecurityManager support controlling path of Struts such  as
/fooApp/fooPath.do?

Thank you in advance




在 2005/9/4,Mark Thomas <[EMAIL PROTECTED]> 撰寫:
> 梁炳場 wrote:
> > Thank you Mark,
> >
> > How about security manager?
> >
> > Can I use policy file under $CATALINA_HOME/conf/catalina.policy file
> > with JDBCRealm?
> 
> Yes you can but this is not at all related to application users/roles.
> See
> http://java.sun.com/j2se/1.4.2/docs/guide/security/smPortGuide.html
> for what this does.
> 
> Mark
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>


Re: After 1st installation of JDBCRealm?

2005-09-04 Thread Mark Thomas
梁炳場 wrote:
> Thank you Mark,
> 
> How about security manager?
> 
> Can I use policy file under $CATALINA_HOME/conf/catalina.policy file
> with JDBCRealm?

Yes you can but this is not at all related to application users/roles.
See
http://java.sun.com/j2se/1.4.2/docs/guide/security/smPortGuide.html
for what this does.

Mark


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: After 1st installation of JDBCRealm?

2005-09-03 Thread 梁炳場
Thank you Mark,

How about security manager?

Can I use policy file under $CATALINA_HOME/conf/catalina.policy file
with JDBCRealm?



2005/9/3, Mark Thomas <[EMAIL PROTECTED]>:
> 梁炳場 wrote:
> > I just install JDBCRealm of Tomcat 5.5
> > It works. Very simple to configure.
> >
> > But I have a few questions to ask.
> >
> > 1. How can users change password?
> They can't without you writing some custom code.
> 
> > And if password is encrypted, how to manage password?
> > eg, how to create the 1st user name and password?
> Again, custom code. If you use digest passwords, you can use the same
> digest mechanism.
> 
> > 2. Can the Struts Action class get the value of request.isUserInRole("")?
> Yes.
> 
> > 3. Can JDBCRealm support policy like JAASRealm?
> No.
> 
> > 4. Roles are defined in web.xml and database's tables.
> > Is it double work? If there is a difference of roles in web.xml
> > and tables for the same username, which prevail?
> There is no user to role mapping in web.xml therefore there is no
> question of one prevailing over another.
> 
> Database defines mapping between users and roles.
> web.xml defines mappign between roles and application resources
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>


Re: After 1st installation of JDBCRealm?

2005-09-03 Thread Mark Thomas

梁炳場 wrote:

I just install JDBCRealm of Tomcat 5.5
It works. Very simple to configure.

But I have a few questions to ask.

1. How can users change password?

They can't without you writing some custom code.


And if password is encrypted, how to manage password?
eg, how to create the 1st user name and password?
Again, custom code. If you use digest passwords, you can use the same 
digest mechanism.



2. Can the Struts Action class get the value of request.isUserInRole("")?

Yes.


3. Can JDBCRealm support policy like JAASRealm?

No.

4. Roles are defined in web.xml and database's tables. 
Is it double work? If there is a difference of roles in web.xml

and tables for the same username, which prevail?
There is no user to role mapping in web.xml therefore there is no 
question of one prevailing over another.


Database defines mapping between users and roles.
web.xml defines mappign between roles and application resources




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



After 1st installation of JDBCRealm?

2005-09-02 Thread 梁炳場
I just install JDBCRealm of Tomcat 5.5
It works. Very simple to configure.

But I have a few questions to ask.

1. How can users change password?
And if password is encrypted, how to manage password?
eg, how to create the 1st user name and password?
2. Can the Struts Action class get the value of request.isUserInRole("")?
3. Can JDBCRealm support policy like JAASRealm?
4. Roles are defined in web.xml and database's tables. 
Is it double work? If there is a difference of roles in web.xml
and tables for the same username, which prevail?


Can anyone give me hints?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



problem configuring JDBCRealm from admin tool 5.5

2005-07-06 Thread Gabriel Belingueres
Hi,
 I have a problem when configuring a JDBCRealm from the admin tool.
I use no digest algorithm, so I leave the text field in blank, but the 
generated server.xml file includes an oughfull:
  digest=""
 attribute, so Tomcat throws me an exception telling me that it can not find 
the required ("") digest algorithm.
 I remove the offending line and it works perfectly. Unfortunatelly, my 
hosting service only allow me to use the admin app.
 How can I tell from the admin app that don't generate the digest 
attribute
I already test it with: "No", "NO", "NONE" y "null" but doesn't work.
 Please anyone knows how to solve the problem?
 Thanks in advance
Gabriel


Re: Help with JDBCRealm config on Tomcat 4.1

2005-04-23 Thread joelsherriff
Well I've got JDBCRealm working for the entire server, but when I try to
wrap the realm in a context for a specific
webapp it stops working.  Anyone have any ideas why?  Is my Context
specification not correct?






- Original Message - 
From: "joelsherriff" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Friday, April 22, 2005 3:56 PM
Subject: Help with JDBCRealm config on Tomcat 4.1


> Hope someone can help me - I'm still a relative newbie to tomcat, am
baffled
> at this point and I can't even get it configured so that I
> can get debug info to find out what's wrong.
>
> I've added a context to my server.xml for the webapp I'm trying to set up
> JDBCRealm authentication for:
>
>   
>  prefix="localhost_blojsom_log." suffix=".txt" timestamp="true" />
>  debug="99" driverName="org.gjt.mm.mysql.Driver"
>
>
connectionURL="jdbc:mysql://localhost/mydatabase?user=xx;password=xx
> "
> connectionName="xx" connectionPassword="xx"
> digest="MD5"
> userTable="users" userNameCol="userid"
> userCredCol="md5password"
> userRoleTable="user_roles" roleNameCol="role_name" />
>   
>
> And, of course, added the supporting tables and roles to my database.
When
> I attempt to access a page from the webapp,
> my login.jsp page is displayed, and when I attempt to login, my error.jsp
> page is displayed.   I didn't expect this to work
> correctly the first time I configured it,  and it's not, but my problem is
> that I can't figure out how to debug it at all.  The
> Logger I have configured in the webapp's Context does nothing - doesn't
> create the log file and nothing is logged
> anywhere else either.   How can I further debug it?
>
> Now, if I take the Realm out of the Context (applying it to the entire
> server), I get an exception in my catalina_log:
>
> 2005-04-22 15:26:10 JDBCRealm[Standalone]: Exception performing
> authentication
> java.sql.SQLException: org.gjt.mm.mysql.Driver
>  at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:588)
>  at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:343)
>
> Though it doesn't say it precisely, I think this implies that it's not
> connecting to the DB, but the db, user and password values are all
correct.
>
> Basically, I have three problems:  why can't I get logging to work from
> within a specific context,  am I doing something wrong in my attempt
> to get JDBCRealm authentication to work, and what is the right way to
debug
> the problem further, if the solution isn't obvious?
>
> Also, I've added to my webapp's web.xml file:
>
> 
> 
> Entire Application
> /*
> 
> 
> users
> 
> 
>
> 
> FORM
> Users
> 
> /login.jsp
> /error.jsp
> 
> 
>
> 
> 
> Some Stuff
> 
> users
> 
>
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Help with JDBCRealm config on Tomcat 4.1

2005-04-22 Thread joelsherriff
Hope someone can help me - I'm still a relative newbie to tomcat, am baffled
at this point and I can't even get it configured so that I
can get debug info to find out what's wrong.

I've added a context to my server.xml for the webapp I'm trying to set up
JDBCRealm authentication for:

  


  

And, of course, added the supporting tables and roles to my database.  When
I attempt to access a page from the webapp,
my login.jsp page is displayed, and when I attempt to login, my error.jsp
page is displayed.   I didn't expect this to work
correctly the first time I configured it,  and it's not, but my problem is
that I can't figure out how to debug it at all.  The
Logger I have configured in the webapp's Context does nothing - doesn't
create the log file and nothing is logged
anywhere else either.   How can I further debug it?

Now, if I take the Realm out of the Context (applying it to the entire
server), I get an exception in my catalina_log:

2005-04-22 15:26:10 JDBCRealm[Standalone]: Exception performing
authentication
java.sql.SQLException: org.gjt.mm.mysql.Driver
 at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:588)
 at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:343)

Though it doesn't say it precisely, I think this implies that it's not
connecting to the DB, but the db, user and password values are all correct.

Basically, I have three problems:  why can't I get logging to work from
within a specific context,  am I doing something wrong in my attempt
to get JDBCRealm authentication to work, and what is the right way to debug
the problem further, if the solution isn't obvious?

Also, I've added to my webapp's web.xml file:



Entire Application
/*


users




FORM
Users

/login.jsp
/error.jsp





Some Stuff

users






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: JDBCRealm Configuration

2005-04-21 Thread Raghupathy,Gurumoorthy
Put your classes.zip in tomcat\common\lib 

Regards
Guru 

-Original Message-
From: Jiang, Peiyun [mailto:[EMAIL PROTECTED] 
Sent: 21 April 2005 17:16
To: 'Tomcat Users List'
Subject: JDBCRealm Configuration


I got the Exception when starting tomcat. What's wrong with it?

Peiyun
---


Exception opening database connection
java.sql.SQLException: oracle.jdbc.driver.OracleDriver
at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:589)
at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:663)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4248)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:8
23)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
at
org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.
java:903)
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:324)
at
org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
at org.apache.commons.digester.Rule.end(Rule.java:276)
at
org.apache.commons.digester.Digester.endElement(Digester.java:1058)
at
org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.java:7
6)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
her.dispatch(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1567)
at
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.j
ava:488)
at
org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:483
)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
at
org.apache.catalina.startup.HostConfig.checkContextLastModified(HostConfig.j
ava:800)
at
org.apache.catalina.startup.HostConfig.check(HostConfig.java:1085)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:327)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:119)
at
org.apache.catalina.core.StandardHost.backgroundProcess(StandardHost.java:80
0)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processC
hildren(ContainerBase.java:1619)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processC
hildren(ContainerBase.java:1628)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(Cont
ainerBase.java:1608)
at java.lang.Thread.run(Thread.java:534)



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JDBCRealm Configuration

2005-04-21 Thread Jiang, Peiyun
I got the Exception when starting tomcat. What's wrong with it?

Peiyun
---


Exception opening database connection
java.sql.SQLException: oracle.jdbc.driver.OracleDriver
at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:589)
at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:663)
at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4248)
at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
at 
org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:903)
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:324)
at 
org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
at org.apache.commons.digester.Rule.end(Rule.java:276)
at org.apache.commons.digester.Digester.endElement(Digester.java:1058)
at 
org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.java:76)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown 
Source)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown 
Source)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
 Source)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1567)
at 
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:488)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
at 
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:483)
at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
at 
org.apache.catalina.startup.HostConfig.checkContextLastModified(HostConfig.java:800)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1085)
at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:327)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at 
org.apache.catalina.core.StandardHost.backgroundProcess(StandardHost.java:800)
at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1619)
at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1628)
at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1608)
at java.lang.Thread.run(Thread.java:534)



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: 5.5.x JDBCRealm problem - wasn't this fixed?

2005-03-28 Thread Remy Maucherat
On Mon, 28 Mar 2005 09:28:24 -0800, Michael Mehrle <[EMAIL PROTECTED]> wrote:
> Fixed indeed - I was up late yesterday and jumped on that 5.5.9 release like
> it was manna from heaven (best analogy I could think of - I'm not
> religious). Logged in this morning after a night of inactivity and
> everything seems to be working :-)

Good.

> Thanks for taking care of this, guys - please forward my regards to the
> person who fixed this. I also must point out that everything seems to be a
> bit snappier now - have there been any performance increases? I'm running an
> image gallery all through tomcat, so it's hosting *everything* - looks a lot
> faster than before. Good job.

There were no performance improvements since 5.5.4, so Ithere should
not be any difference with the new build.

-- 
x
Rémy Maucherat
Developer & Consultant
JBoss Group (Europe) SàRL
x

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AutoReply: Re: 5.5.x JDBCRealm problem - wasn't this fixed?

2005-03-28 Thread j2ee

Hello "Tomcat Users List" ,
 
This refers to your mail with subject as "Re: 5.5.x JDBCRealm problem - wasn't 
this fixed?".
Thank you for sending your CV and registering with A.S. Consultancy Services.
 
Our team will review your CV and match it against current requirements. If your 
profile matches with any ongoing opening, we will contact you by telephone / 
email.
 
We recommend that you update your profile and send us an updated CV whenever 
your contact details or your career path changes, so that your record is 
up-to-date with us.
 
Please be assured that your CV will remain confidential with us and we will 
submit your profile to our clients only after due consultation with you.
 
In case you require any further information please do contact us.
with warm regards,
 
Staffing Team
A.S. Consultancy Services 
#1205, 2nd Main, 2nd Cross, Vijayanagar, Bangalore - 560040, India
Tele - 91 80 2310 9012, Telefax - 91 80 2330 5364, Email - [EMAIL PROTECTED] 
URL: www.asconsultancy.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: 5.5.x JDBCRealm problem - wasn't this fixed?

2005-03-28 Thread Michael Mehrle
Fixed indeed - I was up late yesterday and jumped on that 5.5.9 release like 
it was manna from heaven (best analogy I could think of - I'm not 
religious). Logged in this morning after a night of inactivity and 
everything seems to be working :-)

Thanks for taking care of this, guys - please forward my regards to the 
person who fixed this. I also must point out that everything seems to be a 
bit snappier now - have there been any performance increases? I'm running an 
image gallery all through tomcat, so it's hosting *everything* - looks a lot 
faster than before. Good job.

Michael
- Original Message - 
From: "Remy Maucherat" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Monday, March 28, 2005 12:34 AM
Subject: Re: 5.5.x JDBCRealm problem - wasn't this fixed?

On Sun, 27 Mar 2005 16:57:53 -0800, Michael Mehrle <[EMAIL PROTECTED]> 
wrote:
Sorry for reposting this, but I'm really desperate - anyone??
In 5.5.9 (see the changelog). We recommend using the data source
realm, BTW, which does everything much better.
I just switched from 5.0.28 to 5.5.8 on my Fedora server. The app works 
fine
but after some inactivity of approx 7 hours I try to log in and get the
following error:

at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
[tdx] WARN [http-8080-Processor23] JDBCRealm.getPassword(555) | Exception
retrieving password for "molecool"
If I recycle tomcat it works fine and as long as I keep hitting the server 
I
don't get this problem. However, if I am gone for a few hours and come 
back
I encounter this problem. Now, I did some digging online and others have
encountered this as well. But I was under the impression that this bug was
fixed and that 5.5.8 wasn't leaking connections anymore. Just for sh...ts
and giggles I tried 5.5.7 and it's got the same problem.

Here's my cofiguration:




I would really appreciate some help here. There appears to be some
jakarta-.jar file that fixes this, but I was unable to dig it up. I 
also
tried to get tomcat out of cvs, but the build process seems to be more 
than
I can handle at this point (missing references).

This site needs to be up and running by Tuesday - ANY pointers would be 
very
welcome ;-)

Michael
--
x
Rémy Maucherat
Developer & Consultant
JBoss Group (Europe) SàRL
x
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: 5.5.x JDBCRealm problem - wasn't this fixed?

2005-03-28 Thread Remy Maucherat
On Sun, 27 Mar 2005 16:57:53 -0800, Michael Mehrle <[EMAIL PROTECTED]> wrote:
> Sorry for reposting this, but I'm really desperate - anyone??

In 5.5.9 (see the changelog). We recommend using the data source
realm, BTW, which does everything much better.

> I just switched from 5.0.28 to 5.5.8 on my Fedora server. The app works fine
> but after some inactivity of approx 7 hours I try to log in and get the
> following error:
> 
> at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
> at java.lang.Thread.run(Thread.java:595)
> [tdx] WARN [http-8080-Processor23] JDBCRealm.getPassword(555) | Exception
> retrieving password for "molecool"
> 
> If I recycle tomcat it works fine and as long as I keep hitting the server I
> don't get this problem. However, if I am gone for a few hours and come back
> I encounter this problem. Now, I did some digging online and others have
> encountered this as well. But I was under the impression that this bug was
> fixed and that 5.5.8 wasn't leaking connections anymore. Just for sh...ts
> and giggles I tried 5.5.7 and it's got the same problem.
> 
> Here's my cofiguration:
> 
>  antiJARLocking="true" antiResourceLocking="true">
> 
>driverName="@DB-DRIVERNAME@"
>connectionURL="@DB-URL@"
>   connectionName="@DB-USERNAME@" connectionPassword="@DB-PASSWORD@"
>userTable="app_user" userNameCol="username"
> userCredCol="password"
>userRoleTable="user_role" roleNameCol="role_name" />
> 
>maxActive="100" maxIdle="30" maxWait="1"
>   driverClassName="@DB-DRIVERNAME@"
>   username="@DB-USERNAME@" password="@DB-PASSWORD@"
>   url="@DB-URL@"
>   defaultAutoCommit="true" removeAbandoned="true"
>   removeAbandonedTimeout="60" logAbandoned="true"/>
> 
> 
> I would really appreciate some help here. There appears to be some
> jakarta-.jar file that fixes this, but I was unable to dig it up. I also
> tried to get tomcat out of cvs, but the build process seems to be more than
> I can handle at this point (missing references).
> 
> This site needs to be up and running by Tuesday - ANY pointers would be very
> welcome ;-)
> 
> Michael

-- 
x
Rémy Maucherat
Developer & Consultant
JBoss Group (Europe) SàRL
x

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



5.5.x JDBCRealm problem - wasn't this fixed?

2005-03-27 Thread Michael Mehrle
Sorry for reposting this, but I'm really desperate - anyone??
- Original Message - 

I just switched from 5.0.28 to 5.5.8 on my Fedora server. The app works fine 
but after some inactivity of approx 7 hours I try to log in and get the 
following error:

at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
[tdx] WARN [http-8080-Processor23] JDBCRealm.getPassword(555) | Exception 
retrieving password for "molecool"

If I recycle tomcat it works fine and as long as I keep hitting the server I 
don't get this problem. However, if I am gone for a few hours and come back 
I encounter this problem. Now, I did some digging online and others have 
encountered this as well. But I was under the impression that this bug was 
fixed and that 5.5.8 wasn't leaking connections anymore. Just for sh...ts 
and giggles I tried 5.5.7 and it's got the same problem.

Here's my cofiguration:

   
 driverName="@DB-DRIVERNAME@"
  connectionURL="@DB-URL@"
 connectionName="@DB-USERNAME@" connectionPassword="@DB-PASSWORD@"
  userTable="app_user" userNameCol="username" 
userCredCol="password"
  userRoleTable="user_role" roleNameCol="role_name" />

   

I would really appreciate some help here. There appears to be some 
jakarta-.jar file that fixes this, but I was unable to dig it up. I also 
tried to get tomcat out of cvs, but the build process seems to be more than 
I can handle at this point (missing references).

This site needs to be up and running by Tuesday - ANY pointers would be very 
welcome ;-)

Michael 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


5.5.x JDBCRealm problem - wasn't this fixed?

2005-03-26 Thread Michael Mehrle
I just switched from 5.0.28 to 5.5.8 on my Fedora server. The app works fine 
but after some inactivity of approx 7 hours I try to log in and get the 
following error:

at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
[tdx] WARN [http-8080-Processor23] JDBCRealm.getPassword(555) | Exception 
retrieving password for "molecool"

If I recycle tomcat it works fine and as long as I keep hitting the server I 
don't get this problem. However, if I am gone for a few hours and come back I 
encounter this problem. Now, I did some digging online and others have 
encountered this as well. But I was under the impression that this bug was 
fixed and that 5.5.8 wasn't leaking connections anymore. Just for sh...ts and 
giggles I tried 5.5.7 and it's got the same problem.

Here's my cofiguration:








I would really appreciate some help here. There appears to be some 
jakarta-.jar file that fixes this, but I was unable to dig it up. I also 
tried to get tomcat out of cvs, but the build process seems to be more than I 
can handle at this point (missing references).

This site needs to be up and running by Tuesday - ANY pointers would be very 
welcome ;-)

Michael

RE: JDBCRealm changes from Tomcat 5.0.x to 5.5.x

2005-03-17 Thread Richard Mixon (qwest)
We are using form-based authentication. We changed to the
DataSourceRealm last weekend and it appears (so far) to have solved the
problem (again with TC 5.5.7 plus session replication patch).

 - Richard


Darren Govoni wrote:
> I had similar problems, and was forced to revert back to Tomcat 5.0.x.
>
> Are you using HTTP or Form-based authentication to get the user
> credentials?
>
> On Tue, 2005-03-08 at 11:57 -0700, Richard Mixon (qwest) wrote:
>
>> Has anything changed with the way that JDBCReal handles connection
>> timeouts in Tomcat 5.5.7?
>>
>> We upgraded from Tomcat 5.0.19 to Tomcat 5.5.7 in production and are
>> now getting JDBC connection errors when the site has not been
>> accessed for a while.  This is happening when a user tries to login
>> - we use a JDBCRealm to authenticate the user.
>>
>> We had this problem a while back but fixed it by adding the
>> "autoReconnect" parm, but now with Tomcat 5.5. we are having the
>> problem again. We are using MySQL 4.1.7 and version 3.1.7 of the
>> MySQL JDBC connector.
>>
>> Here is the realm specification:
>>
>>   >driverName="com.mysql.jdbc.Driver"
>>
>>
>>
>>
>> connectionURL="jdbc:mysql://dbserver1:3306/webapp1?autoReconnect=tru
>> e&autoCommit=true" connectionName="user1"
>> connectionPassword="password1" userTable="PoPerson"
>> userNameCol="userid" userCredCol="password"
>> userRoleTable="PoPersonRole" roleNameCol="roleName" />
>>
>> >   type="javax.sql.DataSource"
>>   auth="Container"
>>  maxActive="100"
>>maxIdle="10"
>>maxWait="1"
>>  defaultAutoCommit="true"
>>   username="user1"
>>   password="password1"
>>driverClassName="com.mysql.jdbc.Driver"
>>
>> url="jdbc:mysql://dbserver1:3306/ltojsw?autoRecon
>>nect=true&autoCommit=true" removeAbandoned="true"
>> removeAbandonedTimeout="60"
>>   logAbandoned="true"
>>   />
>>
>> I also included the corresponding datasource defined for actual
>> application access. The actual exception is below.
>>
>> Would using the DataSourceReal provide any help here? I was thinking
>> that since it uses DBCP pooling maybe timeout recovery might be more
>> robust. I am trying to duplicate the problem in development now,
>> before trying the DataSourceRealm.
>>
>> Thank you all for any suggestions or solutions.
>>
>>  - Richard
>>
>> Here is the exception:
>> 16:50:00,269 ERROR [TP-Processor6] [/stars]:541 - Exception
>> retrieving password for "wazinger"
>> com.mysql.jdbc.CommunicationsException: Communications link failure
>> due to underlying exception:
>>
>> ** BEGIN NESTED EXCEPTION **
>>
>> java.net.SocketException
>> MESSAGE: Broken pipe
>>
>> STACKTRACE:
>>
>> java.net.SocketException: Broken pipe
>> at java.net.SocketOutputStream.socketWrite0(Native Method)
>> at
>> java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
>> at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
>> at
>>
>>
>>
>>
>>
>>
>>
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
>> at
>> java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123) at
>> com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2616) at
>> com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2547) at
>> com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1512) at
>> com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1622) at
>> com.mysql.jdbc.Connection.execSQL(Connection.java:2376) at
>> com.mysql.jdbc.Connection.execSQL(Connection.java:2297) at
>>
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:
>> 1860) at
>>
com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:170
>> 5) at
>> org.apache.catalina.realm.JDBCRealm.getPassword(JDBCRealm.java:526)
>> at
>> org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:399)
>> at
>>
>> org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:347)
>> at
>>
org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAut
>

Re: JDBCRealm changes from Tomcat 5.0.x to 5.5.x

2005-03-17 Thread Darren Govoni
I had similar problems, and was forced to revert back to Tomcat 5.0.x.

Are you using HTTP or Form-based authentication to get the user
credentials?

On Tue, 2005-03-08 at 11:57 -0700, Richard Mixon (qwest) wrote:

> Has anything changed with the way that JDBCReal handles connection
> timeouts in Tomcat 5.5.7?
> 
> We upgraded from Tomcat 5.0.19 to Tomcat 5.5.7 in production and are now
> getting JDBC connection errors when the site has not been accessed for a
> while.  This is happening when a user tries to login - we use a
> JDBCRealm to authenticate the user.
> 
> We had this problem a while back but fixed it by adding the
> "autoReconnect" parm, but now with Tomcat 5.5. we are having the problem
> again. We are using MySQL 4.1.7 and version 3.1.7 of the MySQL JDBC
> connector.
> 
> Here is the realm specification:
> 
>   driverName="com.mysql.jdbc.Driver"
> connectionURL="jdbc:mysql://dbserver1:3306/webapp1?autoReconnect=tru
> e&autoCommit=true"
>connectionName="user1" connectionPassword="password1"
> userTable="PoPerson" userNameCol="userid" userCredCol="password"
> userRoleTable="PoPersonRole" roleNameCol="roleName" />
> 
>type="javax.sql.DataSource"
>   auth="Container"
>  maxActive="100"
>maxIdle="10"
>maxWait="1"
>  defaultAutoCommit="true"
>   username="user1"
>   password="password1"
>driverClassName="com.mysql.jdbc.Driver"
>url="jdbc:mysql://dbserver1:3306/ltojsw?autoRecon
> nect=true&autoCommit=true"
>removeAbandoned="true"
> removeAbandonedTimeout="60"
>   logAbandoned="true"
>   />
> 
> I also included the corresponding datasource defined for actual
> application access.
> The actual exception is below.
> 
> Would using the DataSourceReal provide any help here? I was thinking
> that since it uses DBCP pooling maybe timeout recovery might be more
> robust. I am trying to duplicate the problem in development now, before
> trying the DataSourceRealm.
> 
> Thank you all for any suggestions or solutions.
> 
>  - Richard
> 
> Here is the exception:
> 16:50:00,269 ERROR [TP-Processor6] [/stars]:541 - Exception retrieving
> password for "wazinger"
> com.mysql.jdbc.CommunicationsException: Communications link failure due
> to underlying exception:
> 
> ** BEGIN NESTED EXCEPTION **
> 
> java.net.SocketException
> MESSAGE: Broken pipe
> 
> STACKTRACE:
> 
> java.net.SocketException: Broken pipe
> at java.net.SocketOutputStream.socketWrite0(Native Method)
> at
> java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
> at
> java.net.SocketOutputStream.write(SocketOutputStream.java:136)
> at
> java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
> at
> java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
> at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2616)
> at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2547)
> at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1512)
> at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1622)
> at com.mysql.jdbc.Connection.execSQL(Connection.java:2376)
> at com.mysql.jdbc.Connection.execSQL(Connection.java:2297)
> at
> com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:
> 1860)
> at
> com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:170
> 5)
> at
> org.apache.catalina.realm.JDBCRealm.getPassword(JDBCRealm.java:526)
> at
> org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:399)
> at
> org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:347)
> at
> org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAut
> henticator.java:256)
> at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator
> Base.java:391)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
> :126)
> at
> org.apache.catalina.cluster.tcp.ReplicationValve.invoke(ReplicationValve
> .java:130)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
> :105)
> at
> org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCom

RE: JDBCRealm changes from Tomcat 5.0.x to 5.5.x

2005-03-14 Thread David Tonhofer, m-plify S.A.
Well, I'm running that configuration in 5.5.7, yes.
Holds water so far. But this has been done by directly
editing server.xml - so it's not really a self-contained
webapp configuration.
Best regards,
-- David
--On Thursday, March 10, 2005 9:48 AM -0500 Phillip Qin <[EMAIL PROTECTED]> 
wrote:
Very useful info. Thx. Have you actually tested your configure in
tc5.5.7/.8, i.e. Tomcat Manager app deploy/redeploy etc.?

-Original Message-
From: David Tonhofer, m-plify S.A. [mailto:[EMAIL PROTECTED]
Sent: March 10, 2005 5:55 AM
To: Tomcat Users List
Subject: Re: JDBCRealm changes from Tomcat 5.0.x to 5.5.x
Juste pour info:
I have written up my DataSourceRealm with DBCP that I got working before
02:00 this night (eww) into the DBCP Twiki. Not the best place, but hey,
might be useful:
<http://wiki.apache.org/jakarta-commons/DBCP>
Enjoy,
-- David
--On Wednesday, March 09, 2005 8:40 PM -0800 alexander dosher
<[EMAIL PROTECTED]> wrote:
Hassan Schroeder makes my day:
How about something like:
 > (the correct answer)
YES, thank you.  i had a resourceName instead of a dataSourceName in
my DataSourceRealm, left over from trying to use a UserDatabaseRealm,
which i didn't really understand and isn't even in the docs anymore
anyway. duh.  *and* this method *is* reopening connections, which
JDBCRealm didn't. yay!
   dream.  code.
no, thank you. had an awk dream once. i don't recommend it.  ;-)
--alex.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Exception on JDBCRealm Authorization

2005-03-13 Thread alexander dosher
Jerry,
for definitive answers you'll probably want one of the developers - but
here's my take, with big doses of IMHO & YMMV...
Has Tomcat acknowledged this and agreed that it will be fixed in 
5.5.8?
M. Maucherat suggests, in the thread i referenced earlier, that he has
fixed it in 5.5.8
Any ETA for 5.5.8?  Unless I'm missing something, this seems like it 
was be a pretty high severity bug.  Or are you and I the only two 
people using JDBC Realms with 5.5.7?
bit of a culture issue here, that took me a while to get used to as
well.  when *i* grew up, software with known broken functionality
wouldn't rate a "final" version number, but the Tomcat team (and, in my 
experience, Open Source software in general) is a bit
more relaxed about it:
http://jakarta.apache.org/tomcat/faq/version.html#when

Is there no mechanism for putting out patch jar files? ... is it
possible to extract a JDBCRealm jar file from 5.5.4 without having to
completely uninstall and reinstall all of Tomcat?
will need to defer to the list on this one... FYI, and this is something 
i just learned recently as well, using the $CATALINA_BASE trick to 
separate out your site-specific stuff from the core server code makes it 
*way* easier to "uninstall and reinstall all of Tomcat".

--alex.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Exception on JDBCRealm Authorization

2005-03-12 Thread J Malcolm
Alex,

Thanks so much for doing the research on this.  I do have a few questions.
Has Tomcat acknowledged this and agreed that it will be fixed in 5.5.8?  Any
ETA for 5.5.8?  Unless I'm missing something, this seems like it was be a
pretty high severity bug.  Or are you and I the only two people using JDBC
Realms with 5.5.7?  Is there no mechanism for putting out patch jar files?
One last question... is it possible to extract a JDBCRealm jar file from
5.5.4 without having to completely uninstall and reinstall all of Tomcat?
(and if so, what is the jar file name?)

Thanks again.

Jerry

-Original Message-
From: alexander dosher [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 11, 2005 9:18 PM
To: Tomcat Users List
Subject: Re: Exception on JDBCRealm Authorization

"J Malcolm" <[EMAIL PROTECTED]> sez:
> Just moved to 5.5.7.  After the server runs for several hours, I
> start getting the following exception on JDBCRealm access.

hello.  i've just worked through the same problem in the past week, and 
with the help of the list (thanks Remy Maucherat & Hassan Schroeder!) 
solved it - so to save them some repetition...

what is happening is mysql is dropping the unused connection, and 
JDBCRealm (since 5.5.4) isn't picking it up again.  solutions are to go 
back to 5.5.4 JDBCRealm, or use DataSourceRealm in 5.5.7, or wait for 
5.5.8.  see the thread
http://marc.theaimsgroup.com/?t=11103082883&r=1&w=2
for more details.

share and enjoy,

alex.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Exception on JDBCRealm Authorization

2005-03-11 Thread alexander dosher
"J Malcolm" <[EMAIL PROTECTED]> sez:
Just moved to 5.5.7.  After the server runs for several hours, I
start getting the following exception on JDBCRealm access.
hello.  i've just worked through the same problem in the past week, and 
with the help of the list (thanks Remy Maucherat & Hassan Schroeder!) 
solved it - so to save them some repetition...

what is happening is mysql is dropping the unused connection, and 
JDBCRealm (since 5.5.4) isn't picking it up again.  solutions are to go 
back to 5.5.4 JDBCRealm, or use DataSourceRealm in 5.5.7, or wait for 
5.5.8.  see the thread
http://marc.theaimsgroup.com/?t=11103082883&r=1&w=2
for more details.

share and enjoy,
alex.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Exception on JDBCRealm Authorization

2005-03-11 Thread J Malcolm
Just moved to 5.5.7.  After the server runs for several hours, I start
getting the following exception on JDBCRealm access.  After restarting the
server, it works for a while, then starts failing again.  The exception dump
doesn't give a whole lot of information to go on.

I did not update my MySQL connector when I moved from 5.0 to 5.5.7.  Is that
necessary?  Nothing else has changed that I'm aware of.

Suggestions?  Thx.

=

Mar 11, 2005 10:48:18 AM org.apache.catalina.realm.JDBCRealm getPassword
SEVERE: Exception retrieving password for "jmalcolm"
java.sql.SQLException: Communication link failure: java.net.SocketException,
underlying cause: Software caused connection abort: recv failed

** BEGIN NESTED EXCEPTION **

java.net.SocketException
MESSAGE: Software caused connection abort: recv failed

STACKTRACE:

java.net.SocketException: Software caused connection abort: recv failed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1316)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:1463)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1854)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1109)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1203)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2090)
at
com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1496)
at
org.apache.catalina.realm.JDBCRealm.getPassword(JDBCRealm.java:526)
at
org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:399)
at
org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:347)
at
org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthe
nticator.java:181)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:446)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126
)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105
) 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: JDBCRealm changes from Tomcat 5.0.x to 5.5.x

2005-03-10 Thread Phillip Qin
Very useful info. Thx. Have you actually tested your configure in
tc5.5.7/.8, i.e. Tomcat Manager app deploy/redeploy etc.?




-Original Message-
From: David Tonhofer, m-plify S.A. [mailto:[EMAIL PROTECTED] 
Sent: March 10, 2005 5:55 AM
To: Tomcat Users List
Subject: Re: JDBCRealm changes from Tomcat 5.0.x to 5.5.x


Juste pour info:

I have written up my DataSourceRealm with DBCP that I got working before
02:00 this night (eww) into the DBCP Twiki. Not the best place, but hey,
might be useful:

<http://wiki.apache.org/jakarta-commons/DBCP>

Enjoy,

-- David


--On Wednesday, March 09, 2005 8:40 PM -0800 alexander dosher
<[EMAIL PROTECTED]> wrote:

> Hassan Schroeder makes my day:
>> How about something like:
>  > (the correct answer)
>
> YES, thank you.  i had a resourceName instead of a dataSourceName in 
> my DataSourceRealm, left over from trying to use a UserDatabaseRealm, 
> which i didn't really understand and isn't even in the docs anymore 
> anyway. duh.  *and* this method *is* reopening connections, which 
> JDBCRealm didn't. yay!
>
>>dream.  code.
>
> no, thank you. had an awk dream once. i don't recommend it.  ;-)
>
> --alex.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


!DSPAM:4230275a152948713912020!


Re: JDBCRealm changes from Tomcat 5.0.x to 5.5.x

2005-03-10 Thread Remy Maucherat
On Wed, 09 Mar 2005 17:39:21 -0800, alexander dosher <[EMAIL PROTECTED]> wrote:
> and an
> 
> name="UserDatabase">
> 
> and i get
> java.lang.NullPointerException
>at javax.naming.NameImpl.
>at javax.naming.CompositeName.
>at org.apache.naming.NamingContext.lookup
> (etc.)
> 
> so please accept my application to the Frustration Club.  :(

You get a membership to the RTFM club instead ;)
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/realm-howto.html#DataSourceRealm

The JDBC realm in 5.5.8 obviously still has the bug related to
connection handling, as I only fixed it two days ago.

-- 
x
Rémy Maucherat
Developer & Consultant
JBoss Group (Europe) SàRL
x

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JDBCRealm changes from Tomcat 5.0.x to 5.5.x

2005-03-10 Thread David Tonhofer, m-plify S.A.
Juste pour info:
I have written up my DataSourceRealm with DBCP that I got working
before 02:00 this night (eww) into the DBCP Twiki. Not the best place,
but hey, might be useful:
<http://wiki.apache.org/jakarta-commons/DBCP>
Enjoy,
-- David
--On Wednesday, March 09, 2005 8:40 PM -0800 alexander dosher <[EMAIL 
PROTECTED]> wrote:
Hassan Schroeder makes my day:
How about something like:
 > (the correct answer)
YES, thank you.  i had a resourceName instead of a dataSourceName in my 
DataSourceRealm, left over from trying to use a UserDatabaseRealm, which i 
didn't really understand and isn't even in the docs anymore anyway. duh.  *and* 
this method *is* reopening connections, which JDBCRealm didn't. yay!
   dream.  code.
no, thank you. had an awk dream once. i don't recommend it.  ;-)
--alex.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JDBCRealm changes from Tomcat 5.0.x to 5.5.x

2005-03-09 Thread alexander dosher
Hassan Schroeder makes my day:
How about something like:
> (the correct answer)
YES, thank you.  i had a resourceName instead of a dataSourceName in my 
DataSourceRealm, left over from trying to use a UserDatabaseRealm, which 
i didn't really understand and isn't even in the docs anymore anyway. 
duh.  *and* this method *is* reopening connections, which JDBCRealm 
didn't. yay!

   dream.  code.
no, thank you. had an awk dream once. i don't recommend it.  ;-)
--alex.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JDBCRealm changes from Tomcat 5.0.x to 5.5.x

2005-03-09 Thread Hassan Schroeder
alexander dosher wrote:
DataSourceRealm (5.5.7): doesn't work or is unconfigurable by me - i've 
got a

  


and an

  

How about something like:


url="jdbc:mysql://localhost:3306/authority?autoReconnect=true"/> 


:: and ::

:: which -- season to taste -- works for me :-)
FWIW!
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: JDBCRealm changes from Tomcat 5.0.x to 5.5.x

2005-03-09 Thread alexander dosher
Phillip Qin <[EMAIL PROTECTED]>:
Could any one who has tested it post his result? I am really
frustrated by the "sometime buggy" 5.5 releases and I had to revert
to 5.0.28.
here's a summation of my experiences & interpretations of answers from 
the list, so far:

JDBCRealm (5.5.4): worked i think, but no longer available on tomcat 
website that i can find
JDBCRealm (5.5.7, 5.5.8a): doesn't reopen dropped connections

DataSourceRealm (5.5.4): doesn't support digest authentication
DataSourceRealm (5.5.7): doesn't work or is unconfigurable by me - i've 
got a

  


and an

  

and i get
java.lang.NullPointerException
  at javax.naming.NameImpl.
  at javax.naming.CompositeName.
  at org.apache.naming.NamingContext.lookup
(etc.)
so please accept my application to the Frustration Club.  :(
--alex.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JDBCRealm changes from Tomcat 5.0.x to 5.5.x

2005-03-09 Thread Remy Maucherat
On Wed, 9 Mar 2005 10:40:37 -0500, Phillip Qin
<[EMAIL PROTECTED]> wrote:
> Could any one who has tested it post his result? I am really frustrated by
> the "sometime buggy" 5.5 releases and I had to revert to 5.0.28.

You can also use the realms form 5.5.4, as they don't have problems.

The regressions were introduced when adding digest authentication
support to the database realms.

-- 
x
Rémy Maucherat
Developer & Consultant
JBoss Group (Europe) SàRL
x

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: JDBCRealm changes from Tomcat 5.0.x to 5.5.x

2005-03-09 Thread Phillip Qin
Could any one who has tested it post his result? I am really frustrated by
the "sometime buggy" 5.5 releases and I had to revert to 5.0.28.

-Original Message-
From: Remy Maucherat [mailto:[EMAIL PROTECTED] 
Sent: March 8, 2005 6:23 PM
To: Tomcat Users List
Subject: Re: JDBCRealm changes from Tomcat 5.0.x to 5.5.x


On Tue, 08 Mar 2005 15:16:41 -0800, Hassan Schroeder <[EMAIL PROTECTED]>
wrote:
> Richard Mixon (qwest) wrote:
> 
> > We upgraded from Tomcat 5.0.19 to Tomcat 5.5.7 in production and are 
> > now getting JDBC connection errors when the site has not been 
> > accessed for a while.  This is happening when a user tries to login 
> > - we use a JDBCRealm to authenticate the user.
> 
> > Would using the DataSourceReal provide any help here?
> 
> I'm using a DataSourceRealm with 5.5.7 and not seeing any problems 
> reconnecting at any time (MySQL 4.1.7 + Connector/J 3.1.6)...

Be careful about this bug with the DataSourceRealm (fixed in 5.5.8):
http://issues.apache.org/bugzilla/show_bug.cgi?id=33357
Similarly, I would appreciate testing of the fix.

I agree there's absolutely no reason to use the regular JDBC realm, which
can be a bottleneck in some cases.

-- 
x
Rémy Maucherat
Developer & Consultant
JBoss Group (Europe) SàRL
x

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


!DSPAM:422e33ec287371584411517!


RE: JDBCRealm changes from Tomcat 5.0.x to 5.5.x

2005-03-08 Thread alexander dosher
I'd be extremely glad if you could test this possibly fixed realm.
Replace the existing class in server/lib/catalina-optional.jar.
...
you have to either build it from CVS (which is easy) or get it from a
nightly build.
M. Maucherat,
thank you for the suggestion, but i'm not sufficiently (i.e. at all) 
CVS-savvy to get the nightly build - and there's either no web access or 
cvs.apache.org/builds/jakarta-timcat-5/nightly/ is in fact empty.  i 
tried upgrading the whole server to 5.5.8-alpha in case your changes 
were already there, but i still get the same error.  if you'd care to 
send me the updated catalina-optional.jar directly i'd be happy to try 
to test it again, and will also look into the DataSource realm as you 
suggest.

thanks,
alex.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JDBCRealm changes from Tomcat 5.0.x to 5.5.x

2005-03-08 Thread Hassan Schroeder
Richard Mixon (qwest) wrote:
Hassan, Could it be that you do not experience the long periods of
inactivity on weekends that we do?
No, I'm using this for both my own dev workbench and an intranet
server at the moment, and at the least they're idled out overnight.
So there's not enough authentication traffic to really show up the
33357 bug, but I *certainly* exceed the connection timeout period.
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JDBCRealm changes from Tomcat 5.0.x to 5.5.x

2005-03-08 Thread Remy Maucherat
On Tue, 8 Mar 2005 16:28:22 -0700, Richard Mixon (qwest)
<[EMAIL PROTECTED]> wrote:
> Remy,
> Thanks - but where do I get the new class file?

The Apache mail server, which, BTW, must be the worst mail server in
existence, chooses to let through all the viruses and spammers of the
world, but is refusing my perfectly legitimate attachement. So sorry,
you have to either build it from CVS (which is easy) or get it from a
nightly build.

I'd like to add that the DataSource realm works differently from the
JDBC realm. As a result, it would reconnect transparently, and the
problem you have won't occur. If you decide to try the data source
realm, I recommend using the version from 5.5.8, unless you expect a
really low amount of authentications (it will take a little time for
the connection pool to reclaim the resources which are not properly
closed by the realm).

-- 
x
Rémy Maucherat
Developer & Consultant
JBoss Group (Europe) SàRL
x

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: JDBCRealm changes from Tomcat 5.0.x to 5.5.x

2005-03-08 Thread Richard Mixon (qwest)
Remy,
Thanks - but where do I get the new class file?
- Richard

-Original Message-
From: Remy Maucherat [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 08, 2005 4:01 PM
To: Tomcat Users List
Subject: Re: JDBCRealm changes from Tomcat 5.0.x to 5.5.x


On Tue, 08 Mar 2005 14:28:12 -0800, alexander dosher <[EMAIL PROTECTED]>
wrote:
> i'm getting the same problem, w/MySQL 4.1.8 & 3.1.6 connector (except
my
> error is "Software caused connection abort" rather than "broken pipe -
> but same underlying cause, MySQL timing out the connection).
> autoReconnect doesn't work for me either.  sounds like perhaps i
should
> bail on 5.5.* & go to 5.0 for a while?

I'd be extremely glad if you could test this possibly fixed realm.
Replace the existing class in server/lib/catalina-optional.jar.

--
x
Rémy Maucherat
Developer & Consultant
JBoss Group (Europe) SàRL
x



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: JDBCRealm changes from Tomcat 5.0.x to 5.5.x

2005-03-08 Thread Richard Mixon (qwest)
Hassan, Could it be that you do not experience the long periods of
inactivity on weekends that we do?

This only happens on the weekend when we have low activity - sometimes
one of the Tomcat instances (they are clustered) will not see a login
request for about a half-day. During the week, the longest inactive
period is usually about six hours.

 - Richard
-Original Message-
From: Hassan Schroeder [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 08, 2005 4:17 PM
To: Tomcat Users List
Subject: Re: JDBCRealm changes from Tomcat 5.0.x to 5.5.x


Richard Mixon (qwest) wrote:

> We upgraded from Tomcat 5.0.19 to Tomcat 5.5.7 in production and are
now
> getting JDBC connection errors when the site has not been accessed for
a
> while.  This is happening when a user tries to login - we use a
> JDBCRealm to authenticate the user.

> Would using the DataSourceReal provide any help here?

I'm using a DataSourceRealm with 5.5.7 and not seeing any problems
reconnecting at any time (MySQL 4.1.7 + Connector/J 3.1.6)...

FWIW,
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

   dream.  code.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JDBCRealm changes from Tomcat 5.0.x to 5.5.x

2005-03-08 Thread Remy Maucherat
On Tue, 08 Mar 2005 15:16:41 -0800, Hassan Schroeder
<[EMAIL PROTECTED]> wrote:
> Richard Mixon (qwest) wrote:
> 
> > We upgraded from Tomcat 5.0.19 to Tomcat 5.5.7 in production and are now
> > getting JDBC connection errors when the site has not been accessed for a
> > while.  This is happening when a user tries to login - we use a
> > JDBCRealm to authenticate the user.
> 
> > Would using the DataSourceReal provide any help here?
> 
> I'm using a DataSourceRealm with 5.5.7 and not seeing any problems
> reconnecting at any time (MySQL 4.1.7 + Connector/J 3.1.6)...

Be careful about this bug with the DataSourceRealm (fixed in 5.5.8):
http://issues.apache.org/bugzilla/show_bug.cgi?id=33357
Similarly, I would appreciate testing of the fix.

I agree there's absolutely no reason to use the regular JDBC realm,
which can be a bottleneck in some cases.

-- 
x
Rémy Maucherat
Developer & Consultant
JBoss Group (Europe) SàRL
x

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JDBCRealm changes from Tomcat 5.0.x to 5.5.x

2005-03-08 Thread Hassan Schroeder
Richard Mixon (qwest) wrote:
We upgraded from Tomcat 5.0.19 to Tomcat 5.5.7 in production and are now
getting JDBC connection errors when the site has not been accessed for a
while.  This is happening when a user tries to login - we use a
JDBCRealm to authenticate the user.

Would using the DataSourceReal provide any help here? 
I'm using a DataSourceRealm with 5.5.7 and not seeing any problems
reconnecting at any time (MySQL 4.1.7 + Connector/J 3.1.6)...
FWIW,
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JDBCRealm changes from Tomcat 5.0.x to 5.5.x

2005-03-08 Thread Remy Maucherat
On Tue, 08 Mar 2005 14:28:12 -0800, alexander dosher <[EMAIL PROTECTED]> wrote:
> i'm getting the same problem, w/MySQL 4.1.8 & 3.1.6 connector (except my
> error is "Software caused connection abort" rather than "broken pipe -
> but same underlying cause, MySQL timing out the connection).
> autoReconnect doesn't work for me either.  sounds like perhaps i should
> bail on 5.5.* & go to 5.0 for a while?

I'd be extremely glad if you could test this possibly fixed realm.
Replace the existing class in server/lib/catalina-optional.jar.

-- 
x
Rémy Maucherat
Developer & Consultant
JBoss Group (Europe) SàRL
x

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

re: JDBCRealm changes from Tomcat 5.0.x to 5.5.x

2005-03-08 Thread alexander dosher
i'm getting the same problem, w/MySQL 4.1.8 & 3.1.6 connector (except my 
error is "Software caused connection abort" rather than "broken pipe - 
but same underlying cause, MySQL timing out the connection). 
autoReconnect doesn't work for me either.  sounds like perhaps i should 
bail on 5.5.* & go to 5.0 for a while?

We upgraded from Tomcat 5.0.19 to Tomcat 5.5.7 in production and are
now getting JDBC connection errors when the site has not been
accessed for a while.  This is happening when a user tries to login -
we use a JDBCRealm to authenticate the user.
We had this problem a while back but fixed it by adding the 
"autoReconnect" parm, but now with Tomcat 5.5. we are having the
problem again. We are using MySQL 4.1.7 and version 3.1.7 of the
MySQL JDBC connector.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


JDBCRealm changes from Tomcat 5.0.x to 5.5.x

2005-03-08 Thread Richard Mixon (qwest)
Has anything changed with the way that JDBCReal handles connection
timeouts in Tomcat 5.5.7?

We upgraded from Tomcat 5.0.19 to Tomcat 5.5.7 in production and are now
getting JDBC connection errors when the site has not been accessed for a
while.  This is happening when a user tries to login - we use a
JDBCRealm to authenticate the user.

We had this problem a while back but fixed it by adding the
"autoReconnect" parm, but now with Tomcat 5.5. we are having the problem
again. We are using MySQL 4.1.7 and version 3.1.7 of the MySQL JDBC
connector.

Here is the realm specification:

  



I also included the corresponding datasource defined for actual
application access.
The actual exception is below.

Would using the DataSourceReal provide any help here? I was thinking
that since it uses DBCP pooling maybe timeout recovery might be more
robust. I am trying to duplicate the problem in development now, before
trying the DataSourceRealm.

Thank you all for any suggestions or solutions.

 - Richard

Here is the exception:
16:50:00,269 ERROR [TP-Processor6] [/stars]:541 - Exception retrieving
password for "wazinger"
com.mysql.jdbc.CommunicationsException: Communications link failure due
to underlying exception:

** BEGIN NESTED EXCEPTION **

java.net.SocketException
MESSAGE: Broken pipe

STACKTRACE:

java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at
java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
at
java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2616)
at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2547)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1512)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1622)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2376)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2297)
at
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:
1860)
at
com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:170
5)
at
org.apache.catalina.realm.JDBCRealm.getPassword(JDBCRealm.java:526)
at
org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:399)
at
org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:347)
at
org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAut
henticator.java:256)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator
Base.java:391)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:126)
at
org.apache.catalina.cluster.tcp.ReplicationValve.invoke(ReplicationValve
.java:130)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:105)
at
org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAcc
essLogValve.java:481)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
48)
at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:306)
at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:385)
at
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:745)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:
675)
at
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:868)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:684)
at java.lang.Thread.run(Thread.java:595)


** END NESTED EXCEPTION **


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How do I configure the Tomcat admin app to read and write a JDBCRealm user database?

2005-03-02 Thread Joseph Silverman
Not so new Tomcat user here, but looking to learn more about what is 
going in there and what I can make it do for me!

I have configured server.xml in tomcat to read users, groups, and roles 
using mysql easily and successfully.

Now I would like to edit these tables from tomcat as well - seems like 
the admin tool is the ideal place to do this - 'cept it seems to only 
work with xml text files.
Is there a document explaining how to go about this?  Is it possible?

THANKS - Yossie
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


problem with JDBCRealm

2005-02-14 Thread Curtis Nelson
Hi,

I'm trying to configure tomcat 5.5 with a context realm using FORM 
authentication.  My login page works when the realm is part of the  or 
 element of server.xml, but when I move it to the  element, I 
receive an error (in the log file) stating that no login configuration could be 
found.  

Does anyone know what this means, and how to solve it?

Thanks,

Curtis



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: source for JDBCRealm?

2005-02-09 Thread Frank Schaare
Hi,
i´ve downloaded the sources (search for tomcat-4.1.xx-src.zip) and 
attached it in Eclipse. Though í've got full access to the classes.

The interface is JDBCRealm !
Stephen Charles Huey schrieb:
I've been looking around the Apache/Jakarta site, and I can't find the
Realm-related stuff (I understand it's separate from Tomcat).  We're
running Tomcat 4, and I'd like to hack the query JDBCRealm sends to
Oracle so username checks are not case insensitive.  Btw, which JAR in
my Tomcat directories is related to JDBCRealm?  Thanks...
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


source for JDBCRealm?

2005-02-09 Thread Stephen Charles Huey
I've been looking around the Apache/Jakarta site, and I can't find the
Realm-related stuff (I understand it's separate from Tomcat).  We're
running Tomcat 4, and I'd like to hack the query JDBCRealm sends to
Oracle so username checks are not case insensitive.  Btw, which JAR in
my Tomcat directories is related to JDBCRealm?  Thanks...

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



case sensitivity with JDBCRealm

2005-02-08 Thread Stephen Charles Huey
Here's our server.xml's Realm element:



Basically out of the textbook...but the problem is, we're moving from
MySQL to Oracle, and the MySQL database wasn't case sensitive when
checking the username.  Is there any way to turn off case sensitivity on
the JDBCRealm side of things when checking the username in the Oracle
database?

Thanks...

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Re: Does JDBCRealm close connections?

2005-01-24 Thread bounce
Geachte relatie,

Het door u gebruikte e-mailadres is niet meer actief. U kunt uw e-mailbericht 
sturen naar [EMAIL PROTECTED] of dit bericht beantwoorden.

Bedankt voor uw medewerking,

Met vriendelijke groet,

ATP Hypotheken
Het Spoor 40
3994 AK Houten

Tel. 030 750 25 33
Fax. 030 750 25 88
[EMAIL PROTECTED]

 -- DIT IS EEN AUTOMATISCH GEGENEREERD E-MAILBERICHT --



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Does JDBCRealm close connections?

2005-01-24 Thread Parsons Technical Services
In a quick scan of the source (4.1.30). The realm does not use pools. It 
opens the connection upon authentication. Then closes it right after. All in 
the same method.

There is a note about adding pooling, and this may be one reason why.
If you have a limit on the number of connection your dbengine can support 
then this may be the cause.

So for the last question, yes, it would keep opening the needed connections 
for logins. But it closes them promptly after retrieval of the data.

Doug
- Original Message - 
From: "Stephen Charles Huey" <[EMAIL PROTECTED]>
To: "Tomcat User" 
Sent: Monday, January 24, 2005 9:55 PM
Subject: Does JDBCRealm close connections?


Hey there--just wondering if JDBCRealm with Tomcat 4 ever closes
connections it opens...I'm assuming it can open up more than one
connection to the database if traffic gets heavy (because we think we're
seeing that, though it's hard to tell for sure).  If so, when does it go
about closing those connections?  I was reading about it here:
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/realm-howto.html#JDBCRealm
We're trying to debug a nasty problem, and we're wondering if a couple
hundred folks try to log in at the same time and there are only about
that many database connections that can be pooled (and a bunch of the db
connections are already in use by the web app), then does JDBCRealm just
keep opening up more and more connections to the database?
Thanks,
Stephen
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Does JDBCRealm close connections?

2005-01-24 Thread bounce
Geachte relatie,

Het door u gebruikte e-mailadres is niet meer actief. U kunt uw e-mailbericht 
sturen naar [EMAIL PROTECTED] of dit bericht beantwoorden.

Bedankt voor uw medewerking,

Met vriendelijke groet,

ATP Hypotheken
Het Spoor 40
3994 AK Houten

Tel. 030 750 25 33
Fax. 030 750 25 88
[EMAIL PROTECTED]

 -- DIT IS EEN AUTOMATISCH GEGENEREERD E-MAILBERICHT --



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Does JDBCRealm close connections?

2005-01-24 Thread Stephen Charles Huey
Hey there--just wondering if JDBCRealm with Tomcat 4 ever closes
connections it opens...I'm assuming it can open up more than one
connection to the database if traffic gets heavy (because we think we're
seeing that, though it's hard to tell for sure).  If so, when does it go
about closing those connections?  I was reading about it here:
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/realm-howto.html#JDBCRealm

We're trying to debug a nasty problem, and we're wondering if a couple
hundred folks try to log in at the same time and there are only about
that many database connections that can be pooled (and a bunch of the db
connections are already in use by the web app), then does JDBCRealm just
keep opening up more and more connections to the database?  

Thanks,
Stephen

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Chirag: Logout from the JDBCRealm Authentication

2005-01-09 Thread Chirag
But here again there is a problem
 
The session to which you are refererring to is org.apache.catalina.Session 
Interface While the session with which we get by referring by an implicit 
object 'session' is javax.servlet.http.HttpSession Interface
 
And so method which you are conveying such as 
removeNote(),setPrincipla(),setAuthType() are not available to the JSP
 
So How to go about that
 
Thanks in advance
 
CSJakharia
http://groups-beta.google.com/group/bermuda/
 
 


Parsons Technical Services <[EMAIL PROTECTED]> wrote:Looking into the 
Authenticatorbase.java and the register method of 5.0.19, 
it looks like you could do

session.removeNote(Constants.SESS_USERNAME_NOTE);

session.removeNote(Constants.SESS_PASSWORD_NOTE);

You may need to do this as well:

session.setAuthType(null);

session.setPrincipal(null);



Two things.

1. Check the source code for the 5.5.2 to see if any changes have been made 
in the code.



2. I have not done this myself. Just makes sense that if you reverse what 
the register method does..



Doug

- Original Message - 
From: "Chirag" 
To: 
Sent: Saturday, January 08, 2005 12:57 AM
Subject: Chirag: Logout from the JDBCRealm Authentication


> Software
> 
> JDK1.5
> jakarta-tomcat-5.5.2
>
> Requirement
> ---
> I am using JDBCRealm Authentication.
> I want to provide a logout facility and I could do that with 
> session.invalidate() function but is there any other way by which without 
> destroying the session we can logout from the JDBCRealm
>
> Thanks in advance
>
> CSJakharia
>
>
> Subscribe to bermudaEmail: [input] [input] Browse Archives at 
> groups-beta.google.com
>
>
>
> -
> Do you Yahoo!?
> Meet the all-new My Yahoo! - Try it today! 





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



-
Do you Yahoo!?
 Meet the all-new My Yahoo! – Try it today! 

Re: Chirag: Logout from the JDBCRealm Authentication

2005-01-09 Thread Parsons Technical Services
Looking into the Authenticatorbase.java and the register method of 5.0.19, 
it looks like you could do

session.removeNote(Constants.SESS_USERNAME_NOTE);
session.removeNote(Constants.SESS_PASSWORD_NOTE);
You may need to do this as well:
session.setAuthType(null);
session.setPrincipal(null);

Two things.
1. Check the source code for the 5.5.2 to see if any changes have been made 
in the code.


2. I have not done this myself. Just makes sense that if you reverse what 
the register method does..


Doug
- Original Message - 
From: "Chirag" <[EMAIL PROTECTED]>
To: 
Sent: Saturday, January 08, 2005 12:57 AM
Subject: Chirag: Logout from the JDBCRealm Authentication


Software

JDK1.5
jakarta-tomcat-5.5.2
Requirement
---
I am using JDBCRealm Authentication.
I want to provide a logout facility and I could do that with 
session.invalidate() function but is there any other way by which without 
destroying the session we can logout from the JDBCRealm

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


-
Do you Yahoo!?
Meet the all-new My Yahoo! - Try it today! 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Chirag: Logout from the JDBCRealm Authentication

2005-01-07 Thread Chirag
Software

JDK1.5
jakarta-tomcat-5.5.2
 
Requirement
---
I am using JDBCRealm Authentication.
I want to provide a logout facility and I could do that with 
session.invalidate() function but is there any other way by which without 
destroying the session we can logout from the JDBCRealm
 
Thanks in advance
 
CSJakharia


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



-
Do you Yahoo!?
 Meet the all-new My Yahoo! – Try it today! 

Re: After JDBCRealm Authentication some jsp/servlet to be executed

2005-01-06 Thread Chirag

Trying to implement a javax.servlet.Filter

It has a method which is 

public void doFilter(javax.servlet.ServletRequest request, 
javax.servlet.ServletResponse response, javax.servlet.FilterChain filterChain) 
throws java.io.IOException, javax.servlet.ServletException

But I want to access the session Object to add the other details of the 
companyObject

javax.servlet.ServletResponse does not has access to sessions and so could not 
do that

I think Filter is created with modifying the request and response objects 
before going towards actual JSP pages and not to modify the Session variables

Does anyone has solution to my problem

Thanks in advance

CSJakharia

http://groups-beta.google.com/group/bermuda



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



-
Do you Yahoo!?
 Yahoo! Mail - You care about security. So do we.

Re: After JDBCRealm Authentication some jsp/servlet to be executed

2005-01-06 Thread Chirag
Thanks for Pointing me in right direction
 
Is there any tutorial for implementing ServletFilter on Tomcat Version 5.5
 
As I could not find any commented entry in the web.xml File for ServletFilter
 
As I have read that the xmls are changed a lot 
 
Thanks in advance
 
CSJakharia
 


QM <[EMAIL PROTECTED]> wrote:On Wed, Jan 05, 2005 at 09:07:19PM -0800, Chirag 
wrote:
: After the user Logins in the Server through JDBCRealm Authentication I want 
to store the user Details in the session
: 
: I know there is something called request.getUserPrincipal().getName()
: But i need to store the whole companydetails in the Session
: I mean the other details

? What "other details?" What are "companydetails"?

: so for this I have to write the code in all the jsp files
: Is there any better way out

ServletFilter?
-QM

-- 

software -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com




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



-
Do you Yahoo!?
 The all-new My Yahoo! – What will yours do?

Re: After JDBCRealm Authentication some jsp/servlet to be executed

2005-01-06 Thread QM
On Wed, Jan 05, 2005 at 09:07:19PM -0800, Chirag wrote:
: After the user Logins in the Server through JDBCRealm Authentication I want 
to store the user Details in the session
: 
: I know there is something called request.getUserPrincipal().getName()
: But i need to store the whole companydetails in the Session
: I mean the other details

? What "other details?"  What are "companydetails"?

: so for this I have to write the code in all the jsp files
: Is there any better way out

ServletFilter?
-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



After JDBCRealm Authentication some jsp/servlet to be executed

2005-01-05 Thread Chirag
Software
JDK1.5
jakarta-tomcat-5.5.2

Requirement
After the user Logins in the Server through JDBCRealm Authentication I want to 
store the user Details in the session

I know there is something called request.getUserPrincipal().getName()
But i need to store the whole companydetails in the Session
I mean the other details

so for this I have to write the code in all the jsp files
Is there any better way out


Thanks in advance

CSJakharia
 


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



-
Do you Yahoo!?
 Yahoo! Mail - 250MB free storage. Do more. Manage less.

Re: extend JDBCRealm?

2004-12-27 Thread Bob Feretich
I extended it and placed the class "com.xxx.realm.classname"  in the
server/classes folder for Tomcat 4.1.24.  It's working, but I don't use
any of the class methods in my application. And you need to name the
class in server.xml as Pandu states.

Regards,
Bob Feretich
> Yes it is. You will have to change the name in server.xml file also to
> your class name. Also the class/jar file should be placed in the common
> folder since tomcat needs access to it.
>
> Pandu
>
>> From: "Ilja Smoli" <[EMAIL PROTECTED]>
>> Reply-To: "Tomcat Users List" 
>> To: tomcat-user@jakarta.apache.org
>> Subject: extend JDBCRealm?
>> Date: Mon, 27 Dec 2004 13:49:23 +0200
>>
>> Hi
>> Question is: is it possible to extend 
org.apache.catalina.realm.JDBCRealm
>> and override method  "authenticate(String username, String 
credentials)"?
>> And if it is possible (i guess it is),  where to put it and etc...
>>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: extend JDBCRealm?

2004-12-27 Thread pandu yelamanchili
Yes it is. You will have to change the name in server.xml file also to your 
class name. Also the class/jar file should be placed in the common folder 
since tomcat needs access to it.

Pandu
From: "Ilja Smoli" <[EMAIL PROTECTED]>
Reply-To: "Tomcat Users List" 
To: tomcat-user@jakarta.apache.org
Subject: extend JDBCRealm?
Date: Mon, 27 Dec 2004 13:49:23 +0200
Hi
Question is: is it possible to extend org.apache.catalina.realm.JDBCRealm
and override method  "authenticate(String username, String credentials)"?
And if it is possible (i guess it is),  where to put it and etc...

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: extend JDBCRealm?

2004-12-27 Thread Tim Funk
Yes. Place the file in $CATALINA_HOME/classes/yourpackage/YourClass.class (or 
somewhere in the server classloader)

-Tim
Ilja Smoli wrote:
Hi
Question is: is it possible to extend org.apache.catalina.realm.JDBCRealm
and override method  "authenticate(String username, String credentials)"?
And if it is possible (i guess it is),  where to put it and etc...

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


extend JDBCRealm?

2004-12-27 Thread Ilja Smoli
Hi
Question is: is it possible to extend org.apache.catalina.realm.JDBCRealm
and override method  "authenticate(String username, String credentials)"?
And if it is possible (i guess it is),  where to put it and etc...




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JDBCRealm manual authentication

2004-10-26 Thread Ben
Hi

How do I manually authenticate a user given a String username and
String password? My applicaton needs to use this feature in a Struts
ActionForm, is it possible with JDBCRealm?

I am using Tomcat 5 BTW.

Thanks,
Ben

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JDBCRealm

2004-10-24 Thread Roland Carlsson
I also thought that it would be possible to admin another kind of realms but 
since I didn't found a way I asked to find out if that really could be the 
case (It has happed that I missed things in the documentation :-D ). I'm 
using Tomcat 5.0.28 on MacOsX.

Regards
Roland
- Original Message - 
From: "QM" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Sunday, October 24, 2004 2:45 PM
Subject: Re: JDBCRealm


On Sun, Oct 24, 2004 at 11:58:29AM +0200, Roland Carlsson wrote:
: Well, since I can't find any way to configure the Admin to use anything 
but
: the Memory realm ( no way to change the realm class) so it seems like 
it's
: going to be hard to use it to administer the JDBCRealm.

Really?  I figure I'd have seen someone mention that before now, if that
were the case.  What Tomcat version do you use?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JDBCRealm

2004-10-24 Thread QM
On Sun, Oct 24, 2004 at 11:58:29AM +0200, Roland Carlsson wrote:
: Well, since I can't find any way to configure the Admin to use anything but 
: the Memory realm ( no way to change the realm class) so it seems like it's 
: going to be hard to use it to administer the JDBCRealm.

Really?  I figure I'd have seen someone mention that before now, if that
were the case.  What Tomcat version do you use?

You could still manage JDBCRealm.  Grab a tool like RapidSQL or
SQuirreL SQL to directly manipulate the tables, or roll your own.
(-and perhaps donate it to Tomcat. ;) It's all Java.  Some apps have
their own "manager/admin" functionality, in which a person uses a
web-based interface to create users, reset passwords, etc.


: And about the reply to an old message, I was unaware of the mailinglist 
: keeping track of messages that way so that if I changed the subject and 
: body of a message it still could keep track of it. Just of curiosity, how 
: do it do that?

It's not the list, it's SMTP itself. ;)  If your mailer lets you see
raw message headers, you'll notice a field called "In-Reply-To" on
follow-up messages.  Thread-aware mailers use that field to track
threads (conversations) because tracking by subject is unreliable.

So when you respond to an unrelated message, your post is harder to
find because it is embedded in another conversation.  If I had skipped
the original thread ("coercing AWT/image libraries to release
resources") I probably wouldn't have noticed yours, in which case I
wouldn't have answered.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JDBCRealm

2004-10-24 Thread Roland Carlsson
Thanks for your answer!
Well, since I can't find any way to configure the Admin to use anything but 
the Memory realm ( no way to change the realm class) so it seems like it's 
going to be hard to use it to administer the JDBCRealm.

And about the reply to an old message, I was unaware of the mailinglist 
keeping track of messages that way so that if I changed the subject and body 
of a message it still could keep track of it. Just of curiosity, how do it 
do that?

Regards
Roland Carlsson
- Original Message - 
From: "QM" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Sunday, October 24, 2004 2:42 AM
Subject: Re: JDBCRealm


On Sat, Oct 23, 2004 at 07:05:58PM +0200, Roland Carlsson wrote:
: In the memoryRealm I can define groups with a set of roles so that I 
don't
: have to give every user the same set over and over again. Is this 
possible
: so solve with the built-in JDBCRealm?

I can't say for certain, but I see no notion of a "group" column/setup
in the JDBCRealm docs... so likely not.
: Is it possible to use the Admin-tool to administer a JDBCRealm?
I don't use the admin app, so I can't answer this.  Why not try it?
btw, please post a *new* message when writing to the list.  Replying to
an old (unrelated) message confuses thread-aware mailers, which makes
your question harder to find (and thus answer).
-QM
--
software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JDBCRealm

2004-10-23 Thread QM
On Sat, Oct 23, 2004 at 07:05:58PM +0200, Roland Carlsson wrote:
: In the memoryRealm I can define groups with a set of roles so that I don't 
: have to give every user the same set over and over again. Is this possible 
: so solve with the built-in JDBCRealm?

I can't say for certain, but I see no notion of a "group" column/setup
in the JDBCRealm docs... so likely not.


: Is it possible to use the Admin-tool to administer a JDBCRealm?

I don't use the admin app, so I can't answer this.  Why not try it?


btw, please post a *new* message when writing to the list.  Replying to
an old (unrelated) message confuses thread-aware mailers, which makes
your question harder to find (and thus answer).

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JDBCRealm

2004-10-23 Thread Roland Carlsson
Hi!
I have to change realm from MemoryRealm to a JDBCRealm since we got the need 
to have everything in the database. So I have two questions that have 
arrised when trying out the JDBCRealm.

In the memoryRealm I can define groups with a set of roles so that I don't 
have to give every user the same set over and over again. Is this possible 
so solve with the built-in JDBCRealm?

Is it possible to use the Admin-tool to administer a JDBCRealm?
Thanks in advance
Roland Carlsson 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: JDBCRealm authentication on every page

2004-10-19 Thread Graff, David
The other option is to use the 'isUserInRole()' call on request and if it's
true show the logout link, else show the login link.  That way you don't
have to manage it.

I'm on an "I'm all about the container" kick and the more I leverage what
the container provides over writing things like this myself, the more I like
it.  For the most part it's transparent across containers.


-Original Message-
From: QM [mailto:[EMAIL PROTECTED]
Sent: Monday, October 18, 2004 10:01 PM
To: Tomcat Users List
Subject: Re: JDBCRealm authentication on every page


On Mon, Oct 18, 2004 at 11:41:51AM -0500, Graff, David wrote:
: I think, but this may need elaboration, that Deigo want's to put a "login"
: box on all pages when the user has not authenticated and not show it after
: login.

Ah, gotcha.  Instead of showing a login box, what about a login *link*
that points to a landing page inside a protected area?

You could control the link's presence based on a (very lightweight)
session attr: if it's defined, show a "logout" link; if it's not
defined, show a "login" link.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JDBCRealm authentication on every page

2004-10-18 Thread QM
On Mon, Oct 18, 2004 at 11:41:51AM -0500, Graff, David wrote:
: I think, but this may need elaboration, that Deigo want's to put a "login"
: box on all pages when the user has not authenticated and not show it after
: login.

Ah, gotcha.  Instead of showing a login box, what about a login *link*
that points to a landing page inside a protected area?

You could control the link's presence based on a (very lightweight)
session attr: if it's defined, show a "logout" link; if it's not
defined, show a "login" link.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: JDBCRealm authentication on every page

2004-10-18 Thread Graff, David
QM,

I think, but this may need elaboration, that Deigo want's to put a "login"
box on all pages when the user has not authenticated and not show it after
login.

-Original Message-
From: QM [mailto:[EMAIL PROTECTED]
Sent: Monday, October 18, 2004 12:10 PM
To: Tomcat Users List
Subject: Re: JDBCRealm authentication on every page


On Mon, Oct 18, 2004 at 05:59:59PM +0200, Diego wrote:
: Hi! I want to put a login form on all of my pages. I'm using Tomcat 5
: and JDBCRealm, and authentication is working fine when a user tries to
: access a protected resource. But I don't know how could I invoke
: "manually" JDBCRealm authentication on non-protected pages and stay into
: the same page after login. Any idea?

If you want to force authentication, you could put the entire webapp
under a security constraint (i.e. *any* access will trigger a login
popup).

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JDBCRealm authentication on every page

2004-10-18 Thread QM
On Mon, Oct 18, 2004 at 05:59:59PM +0200, Diego wrote:
: Hi! I want to put a login form on all of my pages. I'm using Tomcat 5
: and JDBCRealm, and authentication is working fine when a user tries to
: access a protected resource. But I don't know how could I invoke
: "manually" JDBCRealm authentication on non-protected pages and stay into
: the same page after login. Any idea?

If you want to force authentication, you could put the entire webapp
under a security constraint (i.e. *any* access will trigger a login
popup).

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JDBCRealm authentication on every page

2004-10-18 Thread Diego
Hi! I want to put a login form on all of my pages. I'm using Tomcat 5
and JDBCRealm, and authentication is working fine when a user tries to
access a protected resource. But I don't know how could I invoke
"manually" JDBCRealm authentication on non-protected pages and stay into
the same page after login. Any idea?

Thanks in advance


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Different JDBCRealm for each app?

2004-10-06 Thread Tim Funk
Define the Realm in the  declaration.
-Tim
Václavík Radek wrote:
Hi,
is there a possibility to define different JDBCRealm (or realm in general)
for each application within one servlet container? The realm is defined in
server.xml, so I can't see a possibility how to make it application
dependent. 

Could you please advise me on some best practices concerning this?
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Different JDBCRealm for each app?

2004-10-06 Thread Václavík Radek
Hi,

is there a possibility to define different JDBCRealm (or realm in general)
for each application within one servlet container? The realm is defined in
server.xml, so I can't see a possibility how to make it application
dependent. 

Could you please advise me on some best practices concerning this?

Thanks.

Radek

_

Ing. Radek Václavík
ICS Department - webmaster

ZeNTIVA a.s.
U Kabelovny 130, 102 37 Praha 10
Czech Republic
tel. +420 267 243 296
_



Re: Ingres and JdbcRealm problems

2004-08-17 Thread Ben Stokes
I've got the debug level in the realm declaration on
99 which is the most verbose. As far as I know there's
nothing else I can set.
I'm using edbc.jar which contains the jdbc driver.

Ben


> Looks like something went wrong with the sql
> statement. Can your jdbc
> driver provide more output through some 
> configuration ? Maybe then the
> root cause can be seen.






___ALL-NEW Yahoo! Messenger - 
all new features - even more fun!  http://uk.messenger.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Ingres and JdbcRealm problems

2004-08-17 Thread Peng Tuck Kwok
Looks like something went wrong with the sql statement. Can your jdbc
driver provide more output through some configuration ? Maybe then the
root cause can be seen.

On Tue, 17 Aug 2004 10:00:50 +0100 (BST), Ben Stokes
<[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I'm currently developing a web application on Tomcat 5
> embedded in Netbeans 3.6 and connecting to an Ingres
> 2.6 database. I've setup a JdbcRealm in Tomcat to
> authenticate users against the database to allow
> access to the application and, from the outside,
> everything appears to work well with the login process
> working as it should. However, looking at the catalina
> log there are obviously problems occuring that aren't
> showing up on the web pages:-
> 
> 2004-08-17 08:22:08 JDBCRealm[Catalina]: Exception
> performing authentication
> java.sql.SQLException: line 1, The dynamically defined
> statement 'jdbc_stmt_0_0' not found.
>  Perhaps a PREPARE or DESCRIBE wasn't successful.
> at
> ca.edbc.jdbc.JdbcObject.readResults(JdbcObject.java:509)
> at
> ca.edbc.jdbc.JdbcObject.readResults(JdbcObject.java:348)
> at ca.edbc.jdbc.EdbcPrep.execute(EdbcPrep.java:357)
> at
> ca.edbc.jdbc.EdbcPrep.executeQuery(EdbcPrep.java:243)
> at
> org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:449)
> at
> org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:393)
> at
> org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:176)
> at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:551)
> at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:184)
> at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
> at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
> at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
> at
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:833)
> at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:732)
> at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:619)
> at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:688)
> at java.lang.Thread.run(Thread.java:534)
> 
> 2004-08-17 08:22:08 JDBCRealm[Catalina]: Username
> tomcat successfully authenticated
> 2004-08-17 08:22:08 JDBCRealm[Catalina]: Exception
> performing authentication
> java.sql.SQLException: line 1, The dynamically defined
> statement 'jdbc_stmt_0_0' not found.
>  Perhaps a PREPARE or DESCRIBE wasn't successful.
> at
> ca.edbc.jdbc.JdbcObject.readResults(JdbcObject.java:509)
> at
> ca.edbc.jdbc.JdbcObject.readResults(JdbcObject.java:348)
> at ca.edbc.jdbc.EdbcPrep.execute(EdbcPrep.java:357)
> at
> ca.edbc.jdbc.EdbcPrep.executeQuery(EdbcPrep.java:243)
> at
> org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:449)
> at
> org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:393)
> at
> org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:176)
> at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:551)
> at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:184)
> at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
> at
> org.apache.catalina.valves.ErrorRepo

Ingres and JdbcRealm problems

2004-08-17 Thread Ben Stokes
Hi,

I'm currently developing a web application on Tomcat 5
embedded in Netbeans 3.6 and connecting to an Ingres
2.6 database. I've setup a JdbcRealm in Tomcat to
authenticate users against the database to allow
access to the application and, from the outside,
everything appears to work well with the login process
working as it should. However, looking at the catalina
log there are obviously problems occuring that aren't
showing up on the web pages:-

2004-08-17 08:22:08 JDBCRealm[Catalina]: Exception
performing authentication
java.sql.SQLException: line 1, The dynamically defined
statement 'jdbc_stmt_0_0' not found.
 Perhaps a PREPARE or DESCRIBE wasn't successful.
at
ca.edbc.jdbc.JdbcObject.readResults(JdbcObject.java:509)
at
ca.edbc.jdbc.JdbcObject.readResults(JdbcObject.java:348)
at ca.edbc.jdbc.EdbcPrep.execute(EdbcPrep.java:357)
at
ca.edbc.jdbc.EdbcPrep.executeQuery(EdbcPrep.java:243)
at
org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:449)
at
org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:393)
at
org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:176)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:551)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:184)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:833)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:732)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:619)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:688)
at java.lang.Thread.run(Thread.java:534)

2004-08-17 08:22:08 JDBCRealm[Catalina]: Username
tomcat successfully authenticated
2004-08-17 08:22:08 JDBCRealm[Catalina]: Exception
performing authentication
java.sql.SQLException: line 1, The dynamically defined
statement 'jdbc_stmt_0_0' not found.
 Perhaps a PREPARE or DESCRIBE wasn't successful.
at
ca.edbc.jdbc.JdbcObject.readResults(JdbcObject.java:509)
at
ca.edbc.jdbc.JdbcObject.readResults(JdbcObject.java:348)
at ca.edbc.jdbc.EdbcPrep.execute(EdbcPrep.java:357)
at
ca.edbc.jdbc.EdbcPrep.executeQuery(EdbcPrep.java:243)
at
org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:449)
at
org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:393)
at
org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:176)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:551)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:184)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:833)
 

JDBCRealm and cookies

2004-08-11 Thread Deepa Ramamurthy
Hello!

Can JDBCRealm be configured to check for a cookie?

Thanks.
Deepa

Re: How to hide the JDBCRealm password from server.xml

2004-07-27 Thread Michael Echerer

QM wrote:
On Tue, Jul 27, 2004 at 05:42:51PM -0300, Claudio Carvalho wrote:
: Does anybody know how to  hide the JDBCRealm password from server.xml?
1/ This has been discussed before on the list.  (aka, check the archives.)
The quick answer is:
protect you Tomcat's server.xml from being read by unauthorized users. 
If only you as Tomcat admin are allowed to read the file, there's no 
problem in having the passwort in clear text. So this is operating 
system level security and has nothing to do with Tomcat.
2/ Please start new messages when you post to the list.  Replying to an
old message plays hell with thread-aware mailers, making such posts
harder to find (and, therefore, harder to answer).
dito
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: How to hide the JDBCRealm password from server.xml

2004-07-27 Thread QM
On Tue, Jul 27, 2004 at 05:42:51PM -0300, Claudio Carvalho wrote:
: Does anybody know how to  hide the JDBCRealm password from server.xml?

1/ This has been discussed before on the list.  (aka, check the archives.)

2/ Please start new messages when you post to the list.  Replying to an
old message plays hell with thread-aware mailers, making such posts
harder to find (and, therefore, harder to answer).

For #1, I recall options ranged from "just deal with it" to "protect the
machine/dir/file" to "implement a custom JDBCRealm."

-QM


-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to hide the JDBCRealm password from server.xml

2004-07-27 Thread Claudio Carvalho
Hi,
 
Does anybody know how to  hide the JDBCRealm password from server.xml?
 
 Thanks
 
 Claudio.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: NullPointerException JDBCRealm Oracle Thin

2004-07-05 Thread Steve
No joy. The driver name I had is actually as documented, and works in a
separate configuration used by the application. (Should also have mentioned
that the Oracle version is 9.2.0.1).  And it's definitely not that it can't
find the driver JAR, since it throws a different error if I remove it from
the Tomcat common/lib directory. NPE means it's expecting something to be
instantiated that isn't, but the previous two issues are the only thing I
can think of that I have control over and could conceivably cause that. I'm
using the XML-based realm in as a stopgap in the meantime, but it sure would
be nice to get this going.



-Original Message-
From: Niaz Habib [mailto:[EMAIL PROTECTED]
Sent: Sunday, July 04, 2004 10:39 PM
To: Tomcat Users List
Subject: Re: NullPointerException JDBCRealm Oracle Thin


The last time I used Oracle JDBC Driver (classes12.zip), the JDBC
Driver class was oracle.jdbc.driver.OracleDriver. I see that you are
using oracle.jdbc.OracleDriver as driver class while defining
JDBCDataSourceRealm. Try oracle.jdbc.driver.OracleDriver instead.

Niaz

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: NullPointerException JDBCRealm Oracle Thin

2004-07-04 Thread Niaz Habib
The last time I used Oracle JDBC Driver (classes12.zip), the JDBC
Driver class was oracle.jdbc.driver.OracleDriver. I see that you are
using oracle.jdbc.OracleDriver as driver class while defining
JDBCDataSourceRealm. Try oracle.jdbc.driver.OracleDriver instead.

Niaz

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



NullPointerException JDBCRealm Oracle Thin

2004-07-04 Thread Steve
Getting a NullPointerException at Tomcat startup. JDBCRealm configuration
excerpt from server.xml and stack trace below. I've dropped the JDBC driver
JAR into the common\lib directory and set up the realm configuration as
described in the documentation. The driver name and URL are verified because
I successfully use them to configure a datasource in web.xml. Any ideas?
Thanks!

server.xml:


  


  

  


  


Stack trace:
HttpConnector Opening server socket on all host IP addresses
Starting service Tomcat-Standalone
Apache Tomcat/4.0.6
java.lang.NullPointerException
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:164)
at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:548)
at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:613)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
at org.apache.catalina.core.StandardService.start(StandardService.java:388)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
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:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Allow user to change password in JDBCRealm

2004-06-18 Thread Robert Harper
I think this is all kept in the server's beans. To access this you need to us
the JMX mess.

I have finally figured out how to do it using the normal tomcat-users.xml
database. To load the bean server try this:

MBeanServer m_BeanServer;

if(MBeanServerFactory.findMBeanServer(null).size() > 0)
{
   m_BeanServer = (MBeanServer)BeanServerFactory.findMBeanServer(null).get(0);
}
else
{
   m_BeanServer = MBeanServerFactory.createMBeanServer();
}

then to add a user:

// build the initial name of the bean to act upon
ObjectName oname = 
  new ObjectName("Users:type=UserDatabase,database=UserDatabase" );
// next call one of the methods of the bean. I'll show how to add one
// set up the parameters
String params[] = new String[3];
String types[] = new String[3];

params[0] = strID;
params[1] = strPassword;
params[2] = strName;
types[0] = "java.lang.String";
types[1] = "java.lang.String";
types[2] = "java.lang.String";

// invoke the method
m_BeanServer.invoke( oname, "createUser", params, types );
// note this does not return the user bean as the docs say

// find the user and add a role to the user
String param[] = new String[1];
String type[] = new String[1];
param[0] = strID;
type[0] = "java.lang.String";

String userBean = (String)m_BeanServer.invoke( oname, "findUser", param, type );
// now if you have the user
if( userBean != null )
{
String param[] = new String[1];
String type[] = new String[1];
param[0] = strRole;
type[0] = "java.lang.Sring";
ObjectName oname = new ObjectName( userBean );
m_BeanServer.invoke( oname, "addRole", param, type );
}

You will have to add some exception handling but this should get you on your way
if you are using Tomcat's user authentication. I hope this helps.


Robert S. Harper

> -Original Message-
> From: Dan Barron [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 18, 2004 4:46 PM
> To: Tomcat Users List
> Subject: Allow user to change password in JDBCRealm
> 
> Hello,
> 
> I've looked around for some time now for a clear answer on this topic, but
> have not had much luck.
> 
> I have user authentication setup using JDBCRealm w/ MySQL and am able to
> login/logout and authenticate users just fine.  My question is, once a user
> is logged in, is the user's login information (uname/pass) available
> somewhere where I can easily grab it and modify it so I can allow my users
> to change their password?
> 
> Thanks,
> 
> Dan
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Allow user to change password in JDBCRealm

2004-06-18 Thread Dan Barron
Hello,
I've looked around for some time now for a clear answer on this topic, but 
have not had much luck.

I have user authentication setup using JDBCRealm w/ MySQL and am able to 
login/logout and authenticate users just fine.  My question is, once a user 
is logged in, is the user's login information (uname/pass) available 
somewhere where I can easily grab it and modify it so I can allow my users 
to change their password?

Thanks,
Dan
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


JDBCRealm problem (invalid port number)

2004-06-07 Thread Lea
Hi, 
I'm trying to use JDBCRealm and MySQL to authenticate user in tomcat 4.1. 
I followed the steps described on 
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/realm-
howto.html#JDBCRealm: 
I added a user table and a user_roles table in my database (ABCDatabase);
I made all necessary columns (user, password, role_name); 
I downloaded the MySQL driver (mysql-connector-java-3.0.14-
production.zip) and put the .jar file into $CATALINA/common/lib;
I replaced the realm definition of the server.xml by follow code snippet 
:

 
  connectionName="root"
  connectionPassword=""
  userTable="user" userNameCol="login" userCredCol="password"
  userRoleTable="user_roles" roleNameCol="role_name" />

I created the new user in slide/users/ with the same name and password as 
in my user table in the mysql server.

I can login in http://localhost:8080/admin with this user (he's not in 
tomcat-users.xml) using IE, but when I use a terminal as jakarta-slide-
webdavclient-2.0, I got the follow error message:
org.apache.commons.httpclient.URIException: invalid port number

I replaced the connectionURL (the line with  ) by lines below, 
but I got the same error.
connectionURL="jdbc:mysql://localhost_IP:3306/ABCDatabase"
connectionURL="jdbc:mysql://localhost/ABCDatabase"
connectionURL="jdbc:mysql://localhost:3306/ABCDatabase"

I  remark that there's nothing about JDBCRealm neither JDBC in the login 
file (/logs/localhost_log.txt).

Does someone know what's wrong in my program?

Thx and regards 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Implementing my own Realm based on JDBCRealm

2004-04-06 Thread Shapira, Yoav

Hi,

>Eclipse throws an error saying that it cannot resolve
>javax.management.MBeanRegistration. I cannot find this class at all.
>Searching on java.sun.com showed me, that the package
javax.management.* is
>part of J2EE 1.4.

Then you should improve your (re)search skills.  It's part of the JMX
API, which can be downloaded from the Sun website or grabbed from
$CATALINA_HOME/common/lib(/jmx.jar).

>Could anybody tell me, what I need to do to derive something from
>org.apache.catalina.realm.JDBCRealm and what I need to include to get
it
>working in either my IDE and on a production Tomcat server.

No, no one can tell you, as you have to figure out your own dependencies
which are directly related to your own code.  If you want to see what's
on the classpath we use when compiling JDBCRealm, consult tomcat's
top-level and child build.xml files.

Yoav shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Implementing my own Realm based on JDBCRealm

2004-04-06 Thread Tom Bednarz
Hi,

I like to implement my own Realm based on the JDBCRealm provided by Tomcat. I 
currently use Tomcat 5.0.19, Eclipse 3M7 is my IDE (together with MyEclipseIDE).

To implement my own Realm I like to derive my class from 
org.apache.catalina.realm.JDBCRealm

Eclipse throws an error saying that it cannot resolve 
javax.management.MBeanRegistration. I cannot find this class at all. Searching on 
java.sun.com showed me, that the package javax.management.* is part of J2EE 1.4.

Could anybody tell me, what I need to do to derive something from 
org.apache.catalina.realm.JDBCRealm and what I need to include to get it working in 
either my IDE and on a production Tomcat server.

The result of my compilation is a JAR file which I like to put into tomcat's 
common/lib directory.

Any help would be greatly appreciated!

Tom



Re: JDBCRealm with Tomcat 5 (newbie!)

2004-01-07 Thread QM
: I was trying to find an example application using the JDBCREalm (if 
: possible using Mysql). I don't mean the Tomcat5 configuration part, 
: which is well explained in the docs, but some code clarifying the 
: implementation with a servlet etc.
: 
: I don't know if you could point me to some relevant documentation?


At the risk of sounding facetious, there is no coding for you to do.
The container takes care of everything for you.

Review the servlet spec (or do a web search) for "form-based
authentication" for the details.

-QM

-- 

software  -- http://www.brandxdev.net (C++ / Java / SSL)
tech news -- http://www.RoarNetworX.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JDBCRealm with Tomcat 5 (newbie!)

2004-01-07 Thread FTP Admin
Hi,

I was trying to find an example application using the JDBCREalm (if 
possible using Mysql). I don't mean the Tomcat5 configuration part, 
which is well explained in the docs, but some code clarifying the 
implementation with a servlet etc.

I don't know if you could point me to some relevant documentation?

Thanks for your support.

Nick

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: help using JDBCRealm - how to relate a realm with a security constraint

2003-12-15 Thread Christopher Schultz
Pedro,

What i have done:
1. modify the server.xml file to add a Realm tag ()
Where did you put this declaration? In the  of your web 
application? I recall that Realm declarations can appear in multiple 
places. Make sure that it appears in the  where you have:

2. modify the web.xml to add a security-constraint tag ( 


Area de pruebas de 
seguridad
/cosa.jsp
/test.jsp
DELETE
GET
POST
PUT


  rol de administrador
YYY


)
This looks good. What is the URL that you expect to be protetced, and is 
not protected? Also, try removing the  settings, just in 
case that is complicating things.

-chris

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


help using JDBCRealm - how to relate a realm with a security constraint

2003-12-15 Thread Pedro Garcia
Hi!
I am trying to set up security management for my web applications 
through JDBCRealm.

What i have done:
1. modify the server.xml file to add a Realm tag ()

Database and corresponding tables exists

2. modify the web.xml to add a security-constraint tag ( 

		
			Area de pruebas de seguridad
			/cosa.jsp
			/test.jsp
			DELETE
			GET
			POST
			PUT
		
		
		  rol de administrador
			YYY
		
	
)

YYY is a role defined in the database

It doesn't work. So i want to know how to relate a realm declared within 
a context with the entries in the web.xml file in order to do the users 
of my web application to be authenticated against my -user, roles- database.

Thanks!

--
---
| Pedro A García Medina   |
| Groove Media|
| emailto: [EMAIL PROTECTED] |
| Tel: 6211072|
|--
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Session problem?JDBCRealm: Invalid direct reference to form login page

2003-12-13 Thread Daniel Germain
I'm trying to use the JDCBRealm from Tomcat 4.1.27 with an enhydra 5.0 
application servlet
and got the following problem "Invalid direct reference to form login page"
which seem to be related to the session management.

From what I understand, a session is first created (by enhydra SessionMgr)
when browsing unprotected page. Next a protected page is requested and we 
are
redirected to the login page but with a new session created by Tomcat 4.1.
The FormAuthenticator will save the initial request in this new session 
created by Tomcat 4.1.
The user is then properly authenticated but Tomcat try to retrieve the 
initial request
in the initial session created by Enhydra, and it is unable to access it, it 
creates
another session and say there is an "Invalid direct reference to form login 
page".

REQUEST URI   =/enhydra/catalogue/Categories.htm
cookie=JSESSIONID=R3ubmDGE-O571edTbpty5Uu6

header=referer=http://localhost:8080/enhydra/AccueilGeneral.html
header=cookie=JSESSIONID=R3ubmDGE-O571edTbpty5Uu6
requestedSessionId=R3ubmDGE-O571edTbpty5Uu6
---
  Checking constraint 'SecurityConstraint[Protected Area]' against GET 
/catalogue/Categories.htm --> true
Save request in session 'C8BC7F93D9808C8C7532B3282C364B14'
Redirect to login page '/enhydra/NewLogin.html'
 Failed authenticate() test
---
cookie=JSESSIONID=C8BC7F93D9808C8C7532B3282C364B14; 
domain=null; path=/enhydra
header=Set-Cookie=JSESSIONID=C8BC7F93D9808C8C7532B3282C364B14; 
Path=/enhydra
header=Location=http://localhost:8080/enhydra/NewLogin.html
status=302
=
REQUEST URI   =/enhydra/NewLogin.html
cookie=JSESSIONID=R3ubmDGE-O571edTbpty5Uu6
cookie=JSESSIONID=C8BC7F93D9808C8C7532B3282C364B14

header=referer=http://localhost:8080/enhydra/AccueilGeneral.html
header=cookie=JSESSIONID=R3ubmDGE-O571edTbpty5Uu6; 
JSESSIONID=C8BC7F93D9808C8C7532B3282C364B14
requestedSessionId=R3ubmDGE-O571edTbpty5Uu6
---
  Checking constraint 'SecurityConstraint[Protected Area]' against GET 
/NewLogin.html --> false
 Mapped to servlet 'enhydra' with servlet path '' and path info 
'/NewLogin.html' and update=true
---
   contentType=text/html; charset=ISO-8859-1
status=200
=
REQUEST URI   =/enhydra/j_security_check
cookie=JSESSIONID=R3ubmDGE-O571edTbpty5Uu6
cookie=JSESSIONID=C8BC7F93D9808C8C7532B3282C364B14
header=referer=http://localhost:8080/enhydra/NewLogin.html
header=cookie=JSESSIONID=R3ubmDGE-O571edTbpty5Uu6; 
JSESSIONID=C8BC7F93D9808C8C7532B3282C364B14
requestedSessionId=R3ubmDGE-O571edTbpty5Uu6
---
Security checking request POST /enhydra/j_security_check
Authentication of 'dan' was successful
Redirecting to original 'null'
 Failed authenticate() test
---
cookie=JSESSIONID=91AD787C623278EF332FE2235EAB5451; 
domain=null; path=/enhydra
header=Set-Cookie=JSESSIONID=91AD787C623278EF332FE2235EAB5451; 
Path=/enhydra
   message=Référence directe à la form de connexion (form login 
page) invalide
remoteUser=null
status=400
=

_
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: admin interface: jdbcrealm usage

2003-12-12 Thread Ostad, James
thank you.

James

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Friday, December 12, 2003 8:59 AM
To: Tomcat Users List
Subject: Re: admin interface: jdbcrealm usage


Not a bug, a feature gap ;)

-Tim

Ostad, James wrote:

> Are you saying that there is a patch for this issue, or did I just
come
> across a bug?
> 
> James
> 
> -Original Message-
> From: Bill Barker [mailto:[EMAIL PROTECTED]
> Sent: Friday, December 12, 2003 2:48 AM
> To: [EMAIL PROTECTED]
> Subject: Re: admin interface: jdbcrealm usage
> 
> 
> Patches are always welcome ;-).
> 
> "Ostad, James" <[EMAIL PROTECTED]> wrote in message
>
news:[EMAIL PROTECTED]
> ..
> I have implemented the jdbcrealm user authentication.
> Now when I go to the tomcat admin site, there is no sign of our users
> and roles.
> 
> Am I supposed to assume that once I moved to jdbcrealm, I should
forget
> about the admin site for user control?
> 
> any comment?
> 
> thanks,
> 
> James Ostad
> Application Developer/Analyst
> TMS Department
> Ex. 4457
> E-mail: [EMAIL PROTECTED]
> 
> 
> Out---> (3)
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> <---In (14)
> 
> 
> 
> 
> Out---> (3)
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



<---In (14)




Out---> (3)



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: admin interface: jdbcrealm usage

2003-12-12 Thread Tim Funk
Not a bug, a feature gap ;)

-Tim

Ostad, James wrote:

Are you saying that there is a patch for this issue, or did I just come
across a bug?
James

-Original Message-
From: Bill Barker [mailto:[EMAIL PROTECTED]
Sent: Friday, December 12, 2003 2:48 AM
To: [EMAIL PROTECTED]
Subject: Re: admin interface: jdbcrealm usage
Patches are always welcome ;-).

"Ostad, James" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
..
I have implemented the jdbcrealm user authentication.
Now when I go to the tomcat admin site, there is no sign of our users
and roles.
Am I supposed to assume that once I moved to jdbcrealm, I should forget
about the admin site for user control?
any comment?

thanks,

James Ostad
Application Developer/Analyst
TMS Department
Ex. 4457
E-mail: [EMAIL PROTECTED]
Out---> (3)



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


<---In (14)



Out---> (3)



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  1   2   3   4   5   6   >