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: 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

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: JDBCRealm problem

2003-12-03 Thread Tim Funk
Turn debugging up to 99.

-Tim

Ostad, James wrote:
I noticed in the log file that after authentication of admin user,
another line indicates that the user admin does not have the role admin.
I am checking database to make sure that the role and user have
relationship.
any suggestion?
thanks,

james

-Original Message-
From: Ostad, James 
Sent: Wednesday, December 03, 2003 2:51 PM
To: Tomcat Users List
Subject: RE: JDBCRealm problem

Thank you.
What a educational ride.
I did the compilation of the jdbcrealm.java
Now I am getting the http status 403 !!!
again, without this realm setup in server.xml, by just using the DD
file, I don't have any restriction problem.
any suggestion?

thanks,

James

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 12:13 PM
To: Tomcat Users List
Subject: Re: JDBCRealm problem
It was a lazy way to set environment variables in unix.

Here is a simple way in ant: (just the relevant snippets, not a lesson
in ant)
...

   
   
 
   
   
   
 
   

...
   
   
 
  
 
   
...
-Tim

Ostad, James wrote:


Tim,
I am afraid that I am not familiar with the first line, CP=...
is that a copy command on unix?
thanks
james
-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 11:20 AM
To: Tomcat Users List
Subject: Re: JDBCRealm problem
Oops, wrong file:

http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-4.0/catalina/src/share/

org/apache/catalina/realm/JDBCRealm.java

-Tim

Tim Funk wrote:



http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-4.0/catalina/src/share/

org/apache/catalina/realm/JNDIRealm.java 


The easiest way to compile in this case:
CP=*All jars in $CATALINA/common/lib,All jars in $CATALINA/server/lib*
javac -classpath $CP -d $CATALINA_HOME/server/classes JNDIRealm.java
-Tim

Ostad, James wrote:



I am new in tomcat.
I am looking in tomcat site for source file for JDBCRealm.
Is this part of the tomcat source files? or it is separate?
thanks

James

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 10:20 AM
To: Tomcat Users List
Subject: Re: JDBCRealm problem
If you have a NPE, it might being thrown by the Realm. This can
happen


when there is a null role or similar. This has since been patched.
You 


can
test it by getting the latest JDBCRealm from source, compiling it and


placing it
in the appropriate nested dir in server/classes. (Which has a higher
precedence than the lib dir)
-Tim

Ostad, James wrote:




One more thing,
when I commented out the realm section in server.xml, the program
does


work with the default realm.

James

-Original Message-
From: Ostad, James Sent: Wednesday, December 03, 2003 10:08 AM
To: Tomcat Users List
Subject: RE: JDBCRealm problem
I just noticed this errors in the following files under tomcat log
directory:
catalina_log.2003-12-03.txt

2003-12-03 09:59:06 CoyoteAdapter An exception or error occurred in


the



container during the request processing
java.lang.NullPointerException
  at
org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:478)
  at
org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:394)
  at


org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAut

henticator.java:263)

localhost_log.2003-11-26.txt
2003-12-03 09:58:53 StandardManager[/webdav]: Seeding of random
number


generator has been completed
2003-12-03 09:58:53 StandardManager[/webdav] IOException while
loading


persisted sessions: java.io.EOFException
java.io.EOFException
  at


java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.ja

va:2150)
  at


java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStre

am.java:2619)

Any help would be appreciated
thanks,
James

-Original Message-
From: Ostad, James Sent: Wednesday, December 03, 2003 9:51 AM
To: Tomcat Users List
Subject: RE: JDBCRealm problem
Hi,
Thanks for the info.
Apparently, the database was not set correctly.
After correcting the previous problem, I am able to login. The log


shows



the correct authentication with no errors.
Yet, I not getting anything after the login. the web page is clear,
in


stead of taking me to the next page, by design.
the top url address is like:
http://localhost/login/j_security_check

any help, suggestion, or comment would be nice.

Thanks,
James
-Original Message-
From: Jon Wingfield [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 27, 2003 5:01 AM
To: Tomcat Users List
Subject: Re: JDBCRealm problem
The JDBCRealm does two things:
1) Authenticates the user (by checking password)
2) Authorizes the user (by checking roles)
The logs would seem to imply the JDBC driver is blowing up creating


the



prepared statement in the second step (ie reading from the roles


table).



I think Tim is right - he usually is - that there is a config
problem 


with the db or the connection to the d

RE: JDBCRealm problem

2003-12-03 Thread Ostad, James
I noticed in the log file that after authentication of admin user,
another line indicates that the user admin does not have the role admin.

I am checking database to make sure that the role and user have
relationship.
any suggestion?

thanks,

james

-Original Message-
From: Ostad, James 
Sent: Wednesday, December 03, 2003 2:51 PM
To: Tomcat Users List
Subject: RE: JDBCRealm problem


Thank you.
What a educational ride.

I did the compilation of the jdbcrealm.java
Now I am getting the http status 403 !!!

again, without this realm setup in server.xml, by just using the DD
file, I don't have any restriction problem.

any suggestion?

thanks,

James

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 12:13 PM
To: Tomcat Users List
Subject: Re: JDBCRealm problem


It was a lazy way to set environment variables in unix.

Here is a simple way in ant: (just the relevant snippets, not a lesson
in ant)

...

   
   
 
   
   
   
 
   

...

   
   
 
  
 
   
...

-Tim

Ostad, James wrote:

> Tim,
> I am afraid that I am not familiar with the first line, CP=...
> is that a copy command on unix?
> 
> thanks
> james
> 
> 
> -Original Message-
> From: Tim Funk [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 03, 2003 11:20 AM
> To: Tomcat Users List
> Subject: Re: JDBCRealm problem
> 
> 
> Oops, wrong file:
>
http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-4.0/catalina/src/share/
> org/apache/catalina/realm/JDBCRealm.java
> 
> -Tim
> 
> Tim Funk wrote:
> 
> 
>
http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-4.0/catalina/src/share/
> org/apache/catalina/realm/JNDIRealm.java 
> 
>>
>>The easiest way to compile in this case:
>>CP=*All jars in $CATALINA/common/lib,All jars in $CATALINA/server/lib*
>>javac -classpath $CP -d $CATALINA_HOME/server/classes JNDIRealm.java
>>
>>-Tim
>>
>>Ostad, James wrote:
>>
>>
>>>I am new in tomcat.
>>>I am looking in tomcat site for source file for JDBCRealm.
>>>Is this part of the tomcat source files? or it is separate?
>>>
>>>thanks
>>>
>>>James
>>>
>>>-Original Message-
>>>From: Tim Funk [mailto:[EMAIL PROTECTED]
>>>Sent: Wednesday, December 03, 2003 10:20 AM
>>>To: Tomcat Users List
>>>Subject: Re: JDBCRealm problem
>>>
>>>
>>>If you have a NPE, it might being thrown by the Realm. This can
> 
> happen
> 
>>>when there is a null role or similar. This has since been patched.
> 
> You 
> 
>>>can
>>>test it by getting the latest JDBCRealm from source, compiling it and
> 
> 
>>>placing it
>>>in the appropriate nested dir in server/classes. (Which has a higher
>>>precedence than the lib dir)
>>>
>>>-Tim
>>>
>>>Ostad, James wrote:
>>>
>>>
>>>
>>>>One more thing,
>>>>when I commented out the realm section in server.xml, the program
> 
> does
> 
>>>>work with the default realm.
>>>>
>>>>James
>>>>
>>>>-Original Message-
>>>>From: Ostad, James Sent: Wednesday, December 03, 2003 10:08 AM
>>>>To: Tomcat Users List
>>>>Subject: RE: JDBCRealm problem
>>>>
>>>>
>>>>I just noticed this errors in the following files under tomcat log
>>>>directory:
>>>>
>>>>catalina_log.2003-12-03.txt
>>>>
>>>>2003-12-03 09:59:06 CoyoteAdapter An exception or error occurred in
>>>
>>>
>>>the
>>>
>>>
>>>>container during the request processing
>>>>java.lang.NullPointerException
>>>>at
>>>>org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:478)
>>>>at
>>>>org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:394)
>>>>at
>>>>
>>>
>>>
>
org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAut
> 
>>>>henticator.java:263)
>>>>
>>>>
>>>>localhost_log.2003-11-26.txt
>>>>2003-12-03 09:58:53 StandardManager[/webdav]: Seeding of random
> 
> number
> 
>>>>generator has been completed
>>>>2003-12-03 09:58:53 StandardManager[/webdav] IOException while
> 
> loading
> 
>>>>persisted sessions: java.io.EOFException
>>>>java.io.EOFException
>>>>at
>>>>
>>>
>>>
>
java.io.ObjectInputStream

RE: JDBCRealm problem

2003-12-03 Thread Ostad, James
Thank you.
What a educational ride.

I did the compilation of the jdbcrealm.java
Now I am getting the http status 403 !!!

again, without this realm setup in server.xml, by just using the DD
file, I don't have any restriction problem.

any suggestion?

thanks,

James

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 12:13 PM
To: Tomcat Users List
Subject: Re: JDBCRealm problem


It was a lazy way to set environment variables in unix.

Here is a simple way in ant: (just the relevant snippets, not a lesson
in ant)

...

   
   
 
   
   
   
 
   

...

   
   
 
  
 
   
...

-Tim

Ostad, James wrote:

> Tim,
> I am afraid that I am not familiar with the first line, CP=...
> is that a copy command on unix?
> 
> thanks
> james
> 
> 
> -Original Message-
> From: Tim Funk [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 03, 2003 11:20 AM
> To: Tomcat Users List
> Subject: Re: JDBCRealm problem
> 
> 
> Oops, wrong file:
>
http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-4.0/catalina/src/share/
> org/apache/catalina/realm/JDBCRealm.java
> 
> -Tim
> 
> Tim Funk wrote:
> 
> 
>
http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-4.0/catalina/src/share/
> org/apache/catalina/realm/JNDIRealm.java 
> 
>>
>>The easiest way to compile in this case:
>>CP=*All jars in $CATALINA/common/lib,All jars in $CATALINA/server/lib*
>>javac -classpath $CP -d $CATALINA_HOME/server/classes JNDIRealm.java
>>
>>-Tim
>>
>>Ostad, James wrote:
>>
>>
>>>I am new in tomcat.
>>>I am looking in tomcat site for source file for JDBCRealm.
>>>Is this part of the tomcat source files? or it is separate?
>>>
>>>thanks
>>>
>>>James
>>>
>>>-Original Message-
>>>From: Tim Funk [mailto:[EMAIL PROTECTED]
>>>Sent: Wednesday, December 03, 2003 10:20 AM
>>>To: Tomcat Users List
>>>Subject: Re: JDBCRealm problem
>>>
>>>
>>>If you have a NPE, it might being thrown by the Realm. This can
> 
> happen
> 
>>>when there is a null role or similar. This has since been patched.
> 
> You 
> 
>>>can
>>>test it by getting the latest JDBCRealm from source, compiling it and
> 
> 
>>>placing it
>>>in the appropriate nested dir in server/classes. (Which has a higher
>>>precedence than the lib dir)
>>>
>>>-Tim
>>>
>>>Ostad, James wrote:
>>>
>>>
>>>
>>>>One more thing,
>>>>when I commented out the realm section in server.xml, the program
> 
> does
> 
>>>>work with the default realm.
>>>>
>>>>James
>>>>
>>>>-Original Message-
>>>>From: Ostad, James Sent: Wednesday, December 03, 2003 10:08 AM
>>>>To: Tomcat Users List
>>>>Subject: RE: JDBCRealm problem
>>>>
>>>>
>>>>I just noticed this errors in the following files under tomcat log
>>>>directory:
>>>>
>>>>catalina_log.2003-12-03.txt
>>>>
>>>>2003-12-03 09:59:06 CoyoteAdapter An exception or error occurred in
>>>
>>>
>>>the
>>>
>>>
>>>>container during the request processing
>>>>java.lang.NullPointerException
>>>>at
>>>>org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:478)
>>>>at
>>>>org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:394)
>>>>at
>>>>
>>>
>>>
>
org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAut
> 
>>>>henticator.java:263)
>>>>
>>>>
>>>>localhost_log.2003-11-26.txt
>>>>2003-12-03 09:58:53 StandardManager[/webdav]: Seeding of random
> 
> number
> 
>>>>generator has been completed
>>>>2003-12-03 09:58:53 StandardManager[/webdav] IOException while
> 
> loading
> 
>>>>persisted sessions: java.io.EOFException
>>>>java.io.EOFException
>>>>at
>>>>
>>>
>>>
>
java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.ja
> 
>>>>va:2150)
>>>>at
>>>>
>>>
>>>
>
java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStre
> 
>>>>am.java:2619)
>>>>
>>>>
>>>>Any help would be appreciated
>>>>thanks,
>>>>
>>>>Jam

Re: JDBCRealm problem

2003-12-03 Thread Tim Funk
It was a lazy way to set environment variables in unix.

Here is a simple way in ant: (just the relevant snippets, not a lesson in ant)

...

  
  

  
  
  

  

...
  
  

 

  
...
-Tim

Ostad, James wrote:

Tim,
I am afraid that I am not familiar with the first line, CP=...
is that a copy command on unix?
thanks
james
-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 11:20 AM
To: Tomcat Users List
Subject: Re: JDBCRealm problem
Oops, wrong file:
http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-4.0/catalina/src/share/
org/apache/catalina/realm/JDBCRealm.java
-Tim

Tim Funk wrote:

http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-4.0/catalina/src/share/
org/apache/catalina/realm/JNDIRealm.java 

The easiest way to compile in this case:
CP=*All jars in $CATALINA/common/lib,All jars in $CATALINA/server/lib*
javac -classpath $CP -d $CATALINA_HOME/server/classes JNDIRealm.java
-Tim

Ostad, James wrote:


I am new in tomcat.
I am looking in tomcat site for source file for JDBCRealm.
Is this part of the tomcat source files? or it is separate?
thanks

James

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 10:20 AM
To: Tomcat Users List
Subject: Re: JDBCRealm problem
If you have a NPE, it might being thrown by the Realm. This can
happen

when there is a null role or similar. This has since been patched.
You 

can
test it by getting the latest JDBCRealm from source, compiling it and


placing it
in the appropriate nested dir in server/classes. (Which has a higher
precedence than the lib dir)
-Tim

Ostad, James wrote:



One more thing,
when I commented out the realm section in server.xml, the program
does

work with the default realm.

James

-Original Message-
From: Ostad, James Sent: Wednesday, December 03, 2003 10:08 AM
To: Tomcat Users List
Subject: RE: JDBCRealm problem
I just noticed this errors in the following files under tomcat log
directory:
catalina_log.2003-12-03.txt

2003-12-03 09:59:06 CoyoteAdapter An exception or error occurred in


the


container during the request processing
java.lang.NullPointerException
   at
org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:478)
   at
org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:394)
   at


org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAut

henticator.java:263)

localhost_log.2003-11-26.txt
2003-12-03 09:58:53 StandardManager[/webdav]: Seeding of random
number

generator has been completed
2003-12-03 09:58:53 StandardManager[/webdav] IOException while
loading

persisted sessions: java.io.EOFException
java.io.EOFException
   at


java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.ja

va:2150)
   at


java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStre

am.java:2619)

Any help would be appreciated
thanks,
James

-Original Message-
From: Ostad, James Sent: Wednesday, December 03, 2003 9:51 AM
To: Tomcat Users List
Subject: RE: JDBCRealm problem
Hi,
Thanks for the info.
Apparently, the database was not set correctly.
After correcting the previous problem, I am able to login. The log


shows


the correct authentication with no errors.
Yet, I not getting anything after the login. the web page is clear,
in

stead of taking me to the next page, by design.
the top url address is like:
http://localhost/login/j_security_check

any help, suggestion, or comment would be nice.

Thanks,
James
-Original Message-
From: Jon Wingfield [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 27, 2003 5:01 AM
To: Tomcat Users List
Subject: Re: JDBCRealm problem
The JDBCRealm does two things:
1) Authenticates the user (by checking password)
2) Authorizes the user (by checking roles)
The logs would seem to imply the JDBC driver is blowing up creating


the


prepared statement in the second step (ie reading from the roles


table).


I think Tim is right - he usually is - that there is a config
problem 

with the db or the connection to the db.

A quick google later:
http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B313181
HTH,

Jon

Ostad, James wrote:



The line above the line you mentioned in the error log indicates
that

the connection was established at one point:

2003-11-26 11:53:19 JDBCRealm[localhost]: Username admin
successfully

authenticated
2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing
authentication
So, I don't think that the parameters are wrong, neither the
database

setup. The web application functions with form base authentication
without usage of realm.
It is my next step to implement the realm, which I having problem.
but, I will double check my settings and configuration to make sure


that



I didn't miss anything.

thanks,

James

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 26, 2003 4:00 PM
To: Tomcat Users List
Subject: Re:

RE: JDBCRealm problem

2003-12-03 Thread Ostad, James
Tim,
I am afraid that I am not familiar with the first line, CP=...
is that a copy command on unix?

thanks
james


-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 11:20 AM
To: Tomcat Users List
Subject: Re: JDBCRealm problem


Oops, wrong file:
http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-4.0/catalina/src/share/
org/apache/catalina/realm/JDBCRealm.java

-Tim

Tim Funk wrote:

>
http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-4.0/catalina/src/share/
org/apache/catalina/realm/JNDIRealm.java 
> 
> 
> The easiest way to compile in this case:
> CP=*All jars in $CATALINA/common/lib,All jars in $CATALINA/server/lib*
> javac -classpath $CP -d $CATALINA_HOME/server/classes JNDIRealm.java
> 
> -Tim
> 
> Ostad, James wrote:
> 
>> I am new in tomcat.
>> I am looking in tomcat site for source file for JDBCRealm.
>> Is this part of the tomcat source files? or it is separate?
>>
>> thanks
>>
>> James
>>
>> -Original Message-
>> From: Tim Funk [mailto:[EMAIL PROTECTED]
>> Sent: Wednesday, December 03, 2003 10:20 AM
>> To: Tomcat Users List
>> Subject: Re: JDBCRealm problem
>>
>>
>> If you have a NPE, it might being thrown by the Realm. This can
happen
>> when there is a null role or similar. This has since been patched.
You 
>> can
>> test it by getting the latest JDBCRealm from source, compiling it and

>> placing it
>> in the appropriate nested dir in server/classes. (Which has a higher
>> precedence than the lib dir)
>>
>> -Tim
>>
>> Ostad, James wrote:
>>
>>
>>> One more thing,
>>> when I commented out the realm section in server.xml, the program
does
>>> work with the default realm.
>>>
>>> James
>>>
>>> -Original Message-
>>> From: Ostad, James Sent: Wednesday, December 03, 2003 10:08 AM
>>> To: Tomcat Users List
>>> Subject: RE: JDBCRealm problem
>>>
>>>
>>> I just noticed this errors in the following files under tomcat log
>>> directory:
>>>
>>> catalina_log.2003-12-03.txt
>>>
>>> 2003-12-03 09:59:06 CoyoteAdapter An exception or error occurred in
>>
>>
>> the
>>
>>> container during the request processing
>>> java.lang.NullPointerException
>>> at
>>> org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:478)
>>> at
>>> org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:394)
>>> at
>>>
>>
>>
org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAut
>>
>>> henticator.java:263)
>>>
>>>
>>> localhost_log.2003-11-26.txt
>>> 2003-12-03 09:58:53 StandardManager[/webdav]: Seeding of random
number
>>> generator has been completed
>>> 2003-12-03 09:58:53 StandardManager[/webdav] IOException while
loading
>>> persisted sessions: java.io.EOFException
>>> java.io.EOFException
>>> at
>>>
>>
>>
java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.ja
>>
>>> va:2150)
>>> at
>>>
>>
>>
java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStre
>>
>>> am.java:2619)
>>>
>>>
>>> Any help would be appreciated
>>> thanks,
>>>
>>> James
>>>
>>>
>>> -Original Message-
>>> From: Ostad, James Sent: Wednesday, December 03, 2003 9:51 AM
>>> To: Tomcat Users List
>>> Subject: RE: JDBCRealm problem
>>>
>>>
>>> Hi,
>>> Thanks for the info.
>>> Apparently, the database was not set correctly.
>>> After correcting the previous problem, I am able to login. The log
>>
>>
>> shows
>>
>>> the correct authentication with no errors.
>>> Yet, I not getting anything after the login. the web page is clear,
in
>>> stead of taking me to the next page, by design.
>>> the top url address is like:
>>>
>>> http://localhost/login/j_security_check
>>>
>>> any help, suggestion, or comment would be nice.
>>>
>>> Thanks,
>>> James
>>>
>>> -Original Message-
>>> From: Jon Wingfield [mailto:[EMAIL PROTECTED]
>>> Sent: Thursday, November 27, 2003 5:01 AM
>>> To: Tomcat Users List
>>> Subject: Re: JDBCRealm problem
>>>
>>>
>>> The JDBCRealm does two things:
>>> 1) Authenticates the user (

Re: JDBCRealm problem

2003-12-03 Thread Tim Funk
Oops, wrong file:
http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/JDBCRealm.java
-Tim

Tim Funk wrote:

http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java 

The easiest way to compile in this case:
CP=*All jars in $CATALINA/common/lib,All jars in $CATALINA/server/lib*
javac -classpath $CP -d $CATALINA_HOME/server/classes JNDIRealm.java
-Tim

Ostad, James wrote:

I am new in tomcat.
I am looking in tomcat site for source file for JDBCRealm.
Is this part of the tomcat source files? or it is separate?
thanks

James

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 10:20 AM
To: Tomcat Users List
Subject: Re: JDBCRealm problem
If you have a NPE, it might being thrown by the Realm. This can happen
when there is a null role or similar. This has since been patched. You 
can
test it by getting the latest JDBCRealm from source, compiling it and 
placing it
in the appropriate nested dir in server/classes. (Which has a higher
precedence than the lib dir)

-Tim

Ostad, James wrote:


One more thing,
when I commented out the realm section in server.xml, the program does
work with the default realm.
James

-Original Message-
From: Ostad, James Sent: Wednesday, December 03, 2003 10:08 AM
To: Tomcat Users List
Subject: RE: JDBCRealm problem
I just noticed this errors in the following files under tomcat log
directory:
catalina_log.2003-12-03.txt

2003-12-03 09:59:06 CoyoteAdapter An exception or error occurred in


the

container during the request processing
java.lang.NullPointerException
at
org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:478)
at
org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:394)
at
org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAut

henticator.java:263)

localhost_log.2003-11-26.txt
2003-12-03 09:58:53 StandardManager[/webdav]: Seeding of random number
generator has been completed
2003-12-03 09:58:53 StandardManager[/webdav] IOException while loading
persisted sessions: java.io.EOFException
java.io.EOFException
at
java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.ja

va:2150)
at
java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStre

am.java:2619)

Any help would be appreciated
thanks,
James

-Original Message-
From: Ostad, James Sent: Wednesday, December 03, 2003 9:51 AM
To: Tomcat Users List
Subject: RE: JDBCRealm problem
Hi,
Thanks for the info.
Apparently, the database was not set correctly.
After correcting the previous problem, I am able to login. The log


shows

the correct authentication with no errors.
Yet, I not getting anything after the login. the web page is clear, in
stead of taking me to the next page, by design.
the top url address is like:
http://localhost/login/j_security_check

any help, suggestion, or comment would be nice.

Thanks,
James
-Original Message-
From: Jon Wingfield [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 27, 2003 5:01 AM
To: Tomcat Users List
Subject: Re: JDBCRealm problem
The JDBCRealm does two things:
1) Authenticates the user (by checking password)
2) Authorizes the user (by checking roles)
The logs would seem to imply the JDBC driver is blowing up creating


the

prepared statement in the second step (ie reading from the roles


table).

I think Tim is right - he usually is - that there is a config problem 
with the db or the connection to the db.

A quick google later:
http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B313181
HTH,

Jon

Ostad, James wrote:


The line above the line you mentioned in the error log indicates that
the connection was established at one point:
2003-11-26 11:53:19 JDBCRealm[localhost]: Username admin successfully
authenticated
2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing
authentication
So, I don't think that the parameters are wrong, neither the database
setup. The web application functions with form base authentication
without usage of realm.
It is my next step to implement the realm, which I having problem.
but, I will double check my settings and configuration to make sure


that


I didn't miss anything.

thanks,

James

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 26, 2003 4:00 PM
To: Tomcat Users List
Subject: Re: JDBCRealm problem
The problem is this:

2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing
authentication
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for


JDBC]Can't


start a cloned connection while in manual transaction mode.

Since I don't use SQL server and Java, I can't be of more help, but my
guess is
- Database setup
- Driver parameter missing
-Tim

Ostad, James wrote:



Hi everyone,
Hope everyone will have a great TG Day.
Problem: I am not able to login successfully. It keeps f

RE: JDBCRealm problem

2003-12-03 Thread Ostad, James
Tim,
I got the source files.
Now there are three jdbcrealm files:
jdbcrealm.java
jdbcrealmform.java

do I need to compile them all, or just the first one?

thanks, 

james

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 10:20 AM
To: Tomcat Users List
Subject: Re: JDBCRealm problem


If you have a NPE, it might being thrown by the Realm. This can happen
when 
there is a null role or similar. This has since been patched. You can
test it 
by getting the latest JDBCRealm from source, compiling it and placing it
in 
the appropriate nested dir in server/classes. (Which has a higher
precedence 
than the lib dir)

-Tim

Ostad, James wrote:

> One more thing,
> when I commented out the realm section in server.xml, the program does
> work with the default realm.
> 
> James
> 
> -Original Message-
> From: Ostad, James 
> Sent: Wednesday, December 03, 2003 10:08 AM
> To: Tomcat Users List
> Subject: RE: JDBCRealm problem
> 
> 
> I just noticed this errors in the following files under tomcat log
> directory:
> 
> catalina_log.2003-12-03.txt
> 
> 2003-12-03 09:59:06 CoyoteAdapter An exception or error occurred in
the
> container during the request processing
> java.lang.NullPointerException
>   at
> org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:478)
>   at
> org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:394)
>   at
>
org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAut
> henticator.java:263)
> 
> 
> localhost_log.2003-11-26.txt
> 2003-12-03 09:58:53 StandardManager[/webdav]: Seeding of random number
> generator has been completed
> 2003-12-03 09:58:53 StandardManager[/webdav] IOException while loading
> persisted sessions: java.io.EOFException
> java.io.EOFException
>   at
>
java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.ja
> va:2150)
>   at
>
java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStre
> am.java:2619)
> 
> 
> Any help would be appreciated
> thanks,
> 
> James
> 
> 
> -Original Message-
> From: Ostad, James 
> Sent: Wednesday, December 03, 2003 9:51 AM
> To: Tomcat Users List
> Subject: RE: JDBCRealm problem
> 
> 
> Hi,
> Thanks for the info.
> Apparently, the database was not set correctly.
> After correcting the previous problem, I am able to login. The log
shows
> the correct authentication with no errors.
> Yet, I not getting anything after the login. the web page is clear, in
> stead of taking me to the next page, by design.
> the top url address is like:
> 
> http://localhost/login/j_security_check
> 
> any help, suggestion, or comment would be nice.
> 
> Thanks,
> James
> 
> -Original Message-
> From: Jon Wingfield [mailto:[EMAIL PROTECTED]
> Sent: Thursday, November 27, 2003 5:01 AM
> To: Tomcat Users List
> Subject: Re: JDBCRealm problem
> 
> 
> The JDBCRealm does two things:
> 1) Authenticates the user (by checking password)
> 2) Authorizes the user (by checking roles)
> 
> The logs would seem to imply the JDBC driver is blowing up creating
the 
> prepared statement in the second step (ie reading from the roles
table).
> I think Tim is right - he usually is - that there is a config problem 
> with the db or the connection to the db.
> 
> A quick google later:
> http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B313181
> 
> HTH,
> 
> Jon
> 
> Ostad, James wrote:
> 
>>The line above the line you mentioned in the error log indicates that
>>the connection was established at one point:
>>
>>2003-11-26 11:53:19 JDBCRealm[localhost]: Username admin successfully
>>authenticated
>>2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing
>>authentication
>>
>>So, I don't think that the parameters are wrong, neither the database
>>setup. The web application functions with form base authentication
>>without usage of realm. 
>>
>>It is my next step to implement the realm, which I having problem.
>>
>>but, I will double check my settings and configuration to make sure
> 
> that
> 
>>I didn't miss anything.
>>
>>thanks,
>>
>>James
>>
>>-Original Message-
>>From: Tim Funk [mailto:[EMAIL PROTECTED]
>>Sent: Wednesday, November 26, 2003 4:00 PM
>>To: Tomcat Users List
>>Subject: Re: JDBCRealm problem
>>
>>
>>The problem is this:
>>
>>2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing
>>authentication
>>java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
> 
> JDBC]Can't

Re: JDBCRealm problem

2003-12-03 Thread Tim Funk
http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java

The easiest way to compile in this case:
CP=*All jars in $CATALINA/common/lib,All jars in $CATALINA/server/lib*
javac -classpath $CP -d $CATALINA_HOME/server/classes JNDIRealm.java
-Tim

Ostad, James wrote:

I am new in tomcat.
I am looking in tomcat site for source file for JDBCRealm.
Is this part of the tomcat source files? or it is separate?
thanks

James

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 10:20 AM
To: Tomcat Users List
Subject: Re: JDBCRealm problem
If you have a NPE, it might being thrown by the Realm. This can happen
when 
there is a null role or similar. This has since been patched. You can
test it 
by getting the latest JDBCRealm from source, compiling it and placing it
in 
the appropriate nested dir in server/classes. (Which has a higher
precedence 
than the lib dir)

-Tim

Ostad, James wrote:


One more thing,
when I commented out the realm section in server.xml, the program does
work with the default realm.
James

-Original Message-
From: Ostad, James 
Sent: Wednesday, December 03, 2003 10:08 AM
To: Tomcat Users List
Subject: RE: JDBCRealm problem

I just noticed this errors in the following files under tomcat log
directory:
catalina_log.2003-12-03.txt

2003-12-03 09:59:06 CoyoteAdapter An exception or error occurred in
the

container during the request processing
java.lang.NullPointerException
at
org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:478)
at
org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:394)
at
org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAut

henticator.java:263)

localhost_log.2003-11-26.txt
2003-12-03 09:58:53 StandardManager[/webdav]: Seeding of random number
generator has been completed
2003-12-03 09:58:53 StandardManager[/webdav] IOException while loading
persisted sessions: java.io.EOFException
java.io.EOFException
at
java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.ja

va:2150)
at
java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStre

am.java:2619)

Any help would be appreciated
thanks,
James

-Original Message-
From: Ostad, James 
Sent: Wednesday, December 03, 2003 9:51 AM
To: Tomcat Users List
Subject: RE: JDBCRealm problem

Hi,
Thanks for the info.
Apparently, the database was not set correctly.
After correcting the previous problem, I am able to login. The log
shows

the correct authentication with no errors.
Yet, I not getting anything after the login. the web page is clear, in
stead of taking me to the next page, by design.
the top url address is like:
http://localhost/login/j_security_check

any help, suggestion, or comment would be nice.

Thanks,
James
-Original Message-
From: Jon Wingfield [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 27, 2003 5:01 AM
To: Tomcat Users List
Subject: Re: JDBCRealm problem
The JDBCRealm does two things:
1) Authenticates the user (by checking password)
2) Authorizes the user (by checking roles)
The logs would seem to imply the JDBC driver is blowing up creating
the 

prepared statement in the second step (ie reading from the roles
table).

I think Tim is right - he usually is - that there is a config problem 
with the db or the connection to the db.

A quick google later:
http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B313181
HTH,

Jon

Ostad, James wrote:


The line above the line you mentioned in the error log indicates that
the connection was established at one point:
2003-11-26 11:53:19 JDBCRealm[localhost]: Username admin successfully
authenticated
2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing
authentication
So, I don't think that the parameters are wrong, neither the database
setup. The web application functions with form base authentication
without usage of realm. 

It is my next step to implement the realm, which I having problem.

but, I will double check my settings and configuration to make sure
that


I didn't miss anything.

thanks,

James

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 26, 2003 4:00 PM
To: Tomcat Users List
Subject: Re: JDBCRealm problem
The problem is this:

2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing
authentication
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
JDBC]Can't


start 
a cloned connection while in manual transaction mode.

Since I don't use SQL server and Java, I can't be of more help, but my
guess is
- Database setup
- Driver parameter missing
-Tim

Ostad, James wrote:



Hi everyone,
Hope everyone will have a great TG Day.
Problem: I am not able to login successfully. It keeps failing.

Structure: using JDBCRealm + form authentication

database property: match exactly as explained in tomcat documentation
for 

RE: JDBCRealm problem

2003-12-03 Thread Ostad, James
I am new in tomcat.
I am looking in tomcat site for source file for JDBCRealm.
Is this part of the tomcat source files? or it is separate?

thanks

James

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 10:20 AM
To: Tomcat Users List
Subject: Re: JDBCRealm problem


If you have a NPE, it might being thrown by the Realm. This can happen
when 
there is a null role or similar. This has since been patched. You can
test it 
by getting the latest JDBCRealm from source, compiling it and placing it
in 
the appropriate nested dir in server/classes. (Which has a higher
precedence 
than the lib dir)

-Tim

Ostad, James wrote:

> One more thing,
> when I commented out the realm section in server.xml, the program does
> work with the default realm.
> 
> James
> 
> -Original Message-
> From: Ostad, James 
> Sent: Wednesday, December 03, 2003 10:08 AM
> To: Tomcat Users List
> Subject: RE: JDBCRealm problem
> 
> 
> I just noticed this errors in the following files under tomcat log
> directory:
> 
> catalina_log.2003-12-03.txt
> 
> 2003-12-03 09:59:06 CoyoteAdapter An exception or error occurred in
the
> container during the request processing
> java.lang.NullPointerException
>   at
> org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:478)
>   at
> org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:394)
>   at
>
org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAut
> henticator.java:263)
> 
> 
> localhost_log.2003-11-26.txt
> 2003-12-03 09:58:53 StandardManager[/webdav]: Seeding of random number
> generator has been completed
> 2003-12-03 09:58:53 StandardManager[/webdav] IOException while loading
> persisted sessions: java.io.EOFException
> java.io.EOFException
>   at
>
java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.ja
> va:2150)
>   at
>
java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStre
> am.java:2619)
> 
> 
> Any help would be appreciated
> thanks,
> 
> James
> 
> 
> -Original Message-
> From: Ostad, James 
> Sent: Wednesday, December 03, 2003 9:51 AM
> To: Tomcat Users List
> Subject: RE: JDBCRealm problem
> 
> 
> Hi,
> Thanks for the info.
> Apparently, the database was not set correctly.
> After correcting the previous problem, I am able to login. The log
shows
> the correct authentication with no errors.
> Yet, I not getting anything after the login. the web page is clear, in
> stead of taking me to the next page, by design.
> the top url address is like:
> 
> http://localhost/login/j_security_check
> 
> any help, suggestion, or comment would be nice.
> 
> Thanks,
> James
> 
> -Original Message-
> From: Jon Wingfield [mailto:[EMAIL PROTECTED]
> Sent: Thursday, November 27, 2003 5:01 AM
> To: Tomcat Users List
> Subject: Re: JDBCRealm problem
> 
> 
> The JDBCRealm does two things:
> 1) Authenticates the user (by checking password)
> 2) Authorizes the user (by checking roles)
> 
> The logs would seem to imply the JDBC driver is blowing up creating
the 
> prepared statement in the second step (ie reading from the roles
table).
> I think Tim is right - he usually is - that there is a config problem 
> with the db or the connection to the db.
> 
> A quick google later:
> http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B313181
> 
> HTH,
> 
> Jon
> 
> Ostad, James wrote:
> 
>>The line above the line you mentioned in the error log indicates that
>>the connection was established at one point:
>>
>>2003-11-26 11:53:19 JDBCRealm[localhost]: Username admin successfully
>>authenticated
>>2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing
>>authentication
>>
>>So, I don't think that the parameters are wrong, neither the database
>>setup. The web application functions with form base authentication
>>without usage of realm. 
>>
>>It is my next step to implement the realm, which I having problem.
>>
>>but, I will double check my settings and configuration to make sure
> 
> that
> 
>>I didn't miss anything.
>>
>>thanks,
>>
>>James
>>
>>-Original Message-
>>From: Tim Funk [mailto:[EMAIL PROTECTED]
>>Sent: Wednesday, November 26, 2003 4:00 PM
>>To: Tomcat Users List
>>Subject: Re: JDBCRealm problem
>>
>>
>>The problem is this:
>>
>>2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing
>>authentication
>>java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
> 
> JDBC]Can't
> 
>&g

Re: JDBCRealm problem

2003-12-03 Thread Tim Funk
If you have a NPE, it might being thrown by the Realm. This can happen when 
there is a null role or similar. This has since been patched. You can test it 
by getting the latest JDBCRealm from source, compiling it and placing it in 
the appropriate nested dir in server/classes. (Which has a higher precedence 
than the lib dir)

-Tim

Ostad, James wrote:

One more thing,
when I commented out the realm section in server.xml, the program does
work with the default realm.
James

-Original Message-
From: Ostad, James 
Sent: Wednesday, December 03, 2003 10:08 AM
To: Tomcat Users List
Subject: RE: JDBCRealm problem

I just noticed this errors in the following files under tomcat log
directory:
catalina_log.2003-12-03.txt

2003-12-03 09:59:06 CoyoteAdapter An exception or error occurred in the
container during the request processing
java.lang.NullPointerException
at
org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:478)
at
org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:394)
at
org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAut
henticator.java:263)
localhost_log.2003-11-26.txt
2003-12-03 09:58:53 StandardManager[/webdav]: Seeding of random number
generator has been completed
2003-12-03 09:58:53 StandardManager[/webdav] IOException while loading
persisted sessions: java.io.EOFException
java.io.EOFException
at
java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.ja
va:2150)
at
java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStre
am.java:2619)
Any help would be appreciated
thanks,
James

-Original Message-
From: Ostad, James 
Sent: Wednesday, December 03, 2003 9:51 AM
To: Tomcat Users List
Subject: RE: JDBCRealm problem

Hi,
Thanks for the info.
Apparently, the database was not set correctly.
After correcting the previous problem, I am able to login. The log shows
the correct authentication with no errors.
Yet, I not getting anything after the login. the web page is clear, in
stead of taking me to the next page, by design.
the top url address is like:
http://localhost/login/j_security_check

any help, suggestion, or comment would be nice.

Thanks,
James
-Original Message-
From: Jon Wingfield [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 27, 2003 5:01 AM
To: Tomcat Users List
Subject: Re: JDBCRealm problem
The JDBCRealm does two things:
1) Authenticates the user (by checking password)
2) Authorizes the user (by checking roles)
The logs would seem to imply the JDBC driver is blowing up creating the 
prepared statement in the second step (ie reading from the roles table).
I think Tim is right - he usually is - that there is a config problem 
with the db or the connection to the db.

A quick google later:
http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B313181
HTH,

Jon

Ostad, James wrote:

The line above the line you mentioned in the error log indicates that
the connection was established at one point:
2003-11-26 11:53:19 JDBCRealm[localhost]: Username admin successfully
authenticated
2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing
authentication
So, I don't think that the parameters are wrong, neither the database
setup. The web application functions with form base authentication
without usage of realm. 

It is my next step to implement the realm, which I having problem.

but, I will double check my settings and configuration to make sure
that

I didn't miss anything.

thanks,

James

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 26, 2003 4:00 PM
To: Tomcat Users List
Subject: Re: JDBCRealm problem
The problem is this:

2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing
authentication
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
JDBC]Can't

start 
a cloned connection while in manual transaction mode.

Since I don't use SQL server and Java, I can't be of more help, but my
guess is
- Database setup
- Driver parameter missing
-Tim

Ostad, James wrote:


Hi everyone,
Hope everyone will have a great TG Day.
Problem: I am not able to login successfully. It keeps failing.

Structure: using JDBCRealm + form authentication

database property: match exactly as explained in tomcat documentation
for setting up JDBCRealm
I am including three things:

1-server.xml part for realm setup
2-web.xml of the web apps
3-errorlog file is the error log I get when I attempt to use
jdbcrealm.



-
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 PROTEC

RE: JDBCRealm problem

2003-12-03 Thread Ostad, James
One more thing,
when I commented out the realm section in server.xml, the program does
work with the default realm.

James

-Original Message-
From: Ostad, James 
Sent: Wednesday, December 03, 2003 10:08 AM
To: Tomcat Users List
Subject: RE: JDBCRealm problem


I just noticed this errors in the following files under tomcat log
directory:

catalina_log.2003-12-03.txt

2003-12-03 09:59:06 CoyoteAdapter An exception or error occurred in the
container during the request processing
java.lang.NullPointerException
at
org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:478)
at
org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:394)
at
org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAut
henticator.java:263)


localhost_log.2003-11-26.txt
2003-12-03 09:58:53 StandardManager[/webdav]: Seeding of random number
generator has been completed
2003-12-03 09:58:53 StandardManager[/webdav] IOException while loading
persisted sessions: java.io.EOFException
java.io.EOFException
at
java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.ja
va:2150)
at
java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStre
am.java:2619)


Any help would be appreciated
thanks,

James


-Original Message-
From: Ostad, James 
Sent: Wednesday, December 03, 2003 9:51 AM
To: Tomcat Users List
Subject: RE: JDBCRealm problem


Hi,
Thanks for the info.
Apparently, the database was not set correctly.
After correcting the previous problem, I am able to login. The log shows
the correct authentication with no errors.
Yet, I not getting anything after the login. the web page is clear, in
stead of taking me to the next page, by design.
the top url address is like:

http://localhost/login/j_security_check

any help, suggestion, or comment would be nice.

Thanks,
James

-Original Message-
From: Jon Wingfield [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 27, 2003 5:01 AM
To: Tomcat Users List
Subject: Re: JDBCRealm problem


The JDBCRealm does two things:
1) Authenticates the user (by checking password)
2) Authorizes the user (by checking roles)

The logs would seem to imply the JDBC driver is blowing up creating the 
prepared statement in the second step (ie reading from the roles table).
I think Tim is right - he usually is - that there is a config problem 
with the db or the connection to the db.

A quick google later:
http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B313181

HTH,

Jon

Ostad, James wrote:
> The line above the line you mentioned in the error log indicates that
> the connection was established at one point:
> 
> 2003-11-26 11:53:19 JDBCRealm[localhost]: Username admin successfully
> authenticated
> 2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing
> authentication
> 
> So, I don't think that the parameters are wrong, neither the database
> setup. The web application functions with form base authentication
> without usage of realm. 
> 
> It is my next step to implement the realm, which I having problem.
> 
> but, I will double check my settings and configuration to make sure
that
> I didn't miss anything.
> 
> thanks,
> 
> James
> 
> -Original Message-
> From: Tim Funk [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, November 26, 2003 4:00 PM
> To: Tomcat Users List
> Subject: Re: JDBCRealm problem
> 
> 
> The problem is this:
> 
> 2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing
> authentication
> java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
JDBC]Can't
> start 
> a cloned connection while in manual transaction mode.
> 
> Since I don't use SQL server and Java, I can't be of more help, but my
> guess is
> - Database setup
> - Driver parameter missing
> 
> -Tim
> 
> Ostad, James wrote:
> 
>>Hi everyone,
>>Hope everyone will have a great TG Day.
>>
>>Problem: I am not able to login successfully. It keeps failing.
>>
>>Structure: using JDBCRealm + form authentication
>>
>>database property: match exactly as explained in tomcat documentation
>>for setting up JDBCRealm
>>
>>I am including three things:
>>
>>1-server.xml part for realm setup
>>2-web.xml of the web apps
>>3-errorlog file is the error log I get when I attempt to use
> 
> jdbcrealm.
> 
> 
> 
> -
> 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: 

RE: JDBCRealm problem

2003-12-03 Thread Ostad, James
I just noticed this errors in the following files under tomcat log
directory:

catalina_log.2003-12-03.txt

2003-12-03 09:59:06 CoyoteAdapter An exception or error occurred in the
container during the request processing
java.lang.NullPointerException
at
org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:478)
at
org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:394)
at
org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAut
henticator.java:263)


localhost_log.2003-11-26.txt
2003-12-03 09:58:53 StandardManager[/webdav]: Seeding of random number
generator has been completed
2003-12-03 09:58:53 StandardManager[/webdav] IOException while loading
persisted sessions: java.io.EOFException
java.io.EOFException
at
java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.ja
va:2150)
at
java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStre
am.java:2619)


Any help would be appreciated
thanks,

James


-Original Message-
From: Ostad, James 
Sent: Wednesday, December 03, 2003 9:51 AM
To: Tomcat Users List
Subject: RE: JDBCRealm problem


Hi,
Thanks for the info.
Apparently, the database was not set correctly.
After correcting the previous problem, I am able to login. The log shows
the correct authentication with no errors.
Yet, I not getting anything after the login. the web page is clear, in
stead of taking me to the next page, by design.
the top url address is like:

http://localhost/login/j_security_check

any help, suggestion, or comment would be nice.

Thanks,
James

-Original Message-
From: Jon Wingfield [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 27, 2003 5:01 AM
To: Tomcat Users List
Subject: Re: JDBCRealm problem


The JDBCRealm does two things:
1) Authenticates the user (by checking password)
2) Authorizes the user (by checking roles)

The logs would seem to imply the JDBC driver is blowing up creating the 
prepared statement in the second step (ie reading from the roles table).
I think Tim is right - he usually is - that there is a config problem 
with the db or the connection to the db.

A quick google later:
http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B313181

HTH,

Jon

Ostad, James wrote:
> The line above the line you mentioned in the error log indicates that
> the connection was established at one point:
> 
> 2003-11-26 11:53:19 JDBCRealm[localhost]: Username admin successfully
> authenticated
> 2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing
> authentication
> 
> So, I don't think that the parameters are wrong, neither the database
> setup. The web application functions with form base authentication
> without usage of realm. 
> 
> It is my next step to implement the realm, which I having problem.
> 
> but, I will double check my settings and configuration to make sure
that
> I didn't miss anything.
> 
> thanks,
> 
> James
> 
> -Original Message-
> From: Tim Funk [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, November 26, 2003 4:00 PM
> To: Tomcat Users List
> Subject: Re: JDBCRealm problem
> 
> 
> The problem is this:
> 
> 2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing
> authentication
> java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
JDBC]Can't
> start 
> a cloned connection while in manual transaction mode.
> 
> Since I don't use SQL server and Java, I can't be of more help, but my
> guess is
> - Database setup
> - Driver parameter missing
> 
> -Tim
> 
> Ostad, James wrote:
> 
>>Hi everyone,
>>Hope everyone will have a great TG Day.
>>
>>Problem: I am not able to login successfully. It keeps failing.
>>
>>Structure: using JDBCRealm + form authentication
>>
>>database property: match exactly as explained in tomcat documentation
>>for setting up JDBCRealm
>>
>>I am including three things:
>>
>>1-server.xml part for realm setup
>>2-web.xml of the web apps
>>3-errorlog file is the error log I get when I attempt to use
> 
> jdbcrealm.
> 
> 
> 
> -
> 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]



<---In (14)




Out---> (3)



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



RE: JDBCRealm problem

2003-12-03 Thread Ostad, James
Hi,
Thanks for the info.
Apparently, the database was not set correctly.
After correcting the previous problem, I am able to login. The log shows
the correct authentication with no errors.
Yet, I not getting anything after the login. the web page is clear, in
stead of taking me to the next page, by design.
the top url address is like:

http://localhost/login/j_security_check

any help, suggestion, or comment would be nice.

Thanks,
James

-Original Message-
From: Jon Wingfield [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 27, 2003 5:01 AM
To: Tomcat Users List
Subject: Re: JDBCRealm problem


The JDBCRealm does two things:
1) Authenticates the user (by checking password)
2) Authorizes the user (by checking roles)

The logs would seem to imply the JDBC driver is blowing up creating the 
prepared statement in the second step (ie reading from the roles table).
I think Tim is right - he usually is - that there is a config problem 
with the db or the connection to the db.

A quick google later:
http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B313181

HTH,

Jon

Ostad, James wrote:
> The line above the line you mentioned in the error log indicates that
> the connection was established at one point:
> 
> 2003-11-26 11:53:19 JDBCRealm[localhost]: Username admin successfully
> authenticated
> 2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing
> authentication
> 
> So, I don't think that the parameters are wrong, neither the database
> setup. The web application functions with form base authentication
> without usage of realm. 
> 
> It is my next step to implement the realm, which I having problem.
> 
> but, I will double check my settings and configuration to make sure
that
> I didn't miss anything.
> 
> thanks,
> 
> James
> 
> -Original Message-
> From: Tim Funk [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, November 26, 2003 4:00 PM
> To: Tomcat Users List
> Subject: Re: JDBCRealm problem
> 
> 
> The problem is this:
> 
> 2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing
> authentication
> java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
JDBC]Can't
> start 
> a cloned connection while in manual transaction mode.
> 
> Since I don't use SQL server and Java, I can't be of more help, but my
> guess is
> - Database setup
> - Driver parameter missing
> 
> -Tim
> 
> Ostad, James wrote:
> 
>>Hi everyone,
>>Hope everyone will have a great TG Day.
>>
>>Problem: I am not able to login successfully. It keeps failing.
>>
>>Structure: using JDBCRealm + form authentication
>>
>>database property: match exactly as explained in tomcat documentation
>>for setting up JDBCRealm
>>
>>I am including three things:
>>
>>1-server.xml part for realm setup
>>2-web.xml of the web apps
>>3-errorlog file is the error log I get when I attempt to use
> 
> jdbcrealm.
> 
> 
> 
> -
> 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: JDBCRealm problem

2003-11-27 Thread Jon Wingfield
The JDBCRealm does two things:
1) Authenticates the user (by checking password)
2) Authorizes the user (by checking roles)
The logs would seem to imply the JDBC driver is blowing up creating the 
prepared statement in the second step (ie reading from the roles table).
I think Tim is right - he usually is - that there is a config problem 
with the db or the connection to the db.

A quick google later:
http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B313181
HTH,

Jon

Ostad, James wrote:
The line above the line you mentioned in the error log indicates that
the connection was established at one point:
2003-11-26 11:53:19 JDBCRealm[localhost]: Username admin successfully
authenticated
2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing
authentication
So, I don't think that the parameters are wrong, neither the database
setup. The web application functions with form base authentication
without usage of realm. 

It is my next step to implement the realm, which I having problem.

but, I will double check my settings and configuration to make sure that
I didn't miss anything.
thanks,

James

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 26, 2003 4:00 PM
To: Tomcat Users List
Subject: Re: JDBCRealm problem
The problem is this:

2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing
authentication
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Can't
start 
a cloned connection while in manual transaction mode.

Since I don't use SQL server and Java, I can't be of more help, but my
guess is
- Database setup
- Driver parameter missing
-Tim

Ostad, James wrote:

Hi everyone,
Hope everyone will have a great TG Day.
Problem: I am not able to login successfully. It keeps failing.

Structure: using JDBCRealm + form authentication

database property: match exactly as explained in tomcat documentation
for setting up JDBCRealm
I am including three things:

1-server.xml part for realm setup
2-web.xml of the web apps
3-errorlog file is the error log I get when I attempt to use
jdbcrealm.



-
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]


RE: JDBCRealm problem

2003-11-26 Thread Ostad, James
The line above the line you mentioned in the error log indicates that
the connection was established at one point:

2003-11-26 11:53:19 JDBCRealm[localhost]: Username admin successfully
authenticated
2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing
authentication

So, I don't think that the parameters are wrong, neither the database
setup. The web application functions with form base authentication
without usage of realm. 

It is my next step to implement the realm, which I having problem.

but, I will double check my settings and configuration to make sure that
I didn't miss anything.

thanks,

James

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 26, 2003 4:00 PM
To: Tomcat Users List
Subject: Re: JDBCRealm problem


The problem is this:

2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing
authentication
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Can't
start 
a cloned connection while in manual transaction mode.

Since I don't use SQL server and Java, I can't be of more help, but my
guess is
- Database setup
- Driver parameter missing

-Tim

Ostad, James wrote:
> Hi everyone,
> Hope everyone will have a great TG Day.
> 
> Problem: I am not able to login successfully. It keeps failing.
> 
> Structure: using JDBCRealm + form authentication
> 
> database property: match exactly as explained in tomcat documentation
> for setting up JDBCRealm
> 
> I am including three things:
> 
> 1-server.xml part for realm setup
> 2-web.xml of the web apps
> 3-errorlog file is the error log I get when I attempt to use
jdbcrealm.



-
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: JDBCRealm problem

2003-11-26 Thread Tim Funk
The problem is this:

2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing authentication
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Can't start 
a cloned connection while in manual transaction mode.

Since I don't use SQL server and Java, I can't be of more help, but my guess is
- Database setup
- Driver parameter missing
-Tim

Ostad, James wrote:
Hi everyone,
Hope everyone will have a great TG Day.
Problem: I am not able to login successfully. It keeps failing.

Structure: using JDBCRealm + form authentication

database property: match exactly as explained in tomcat documentation
for setting up JDBCRealm
I am including three things:

1-server.xml part for realm setup
2-web.xml of the web apps
3-errorlog file is the error log I get when I attempt to use jdbcrealm.


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


RE: JDBCRealm problem

2003-11-26 Thread Ostad, James
one more thing, you might have notice by my first email, I am
initializing the database connection within the web.xml. I am not sure
that has to do with the problem.
The initialization in web.xml is for internal bean usage.

thanks,
James

-Original Message-
From: Ostad, James 
Sent: Wednesday, November 26, 2003 12:23 PM
To: Tom (E-mail)
Subject: JDBCRealm problem


Hi everyone,
Hope everyone will have a great TG Day.

Problem: I am not able to login successfully. It keeps failing.

Structure: using JDBCRealm + form authentication

database property: match exactly as explained in tomcat documentation
for setting up JDBCRealm

I am including three things:

1-server.xml part for realm setup
2-web.xml of the web apps
3-errorlog file is the error log I get when I attempt to use jdbcrealm.
 
you will find them in this email accordingly.

Any help will be appreciated.


server.xml**



web.xml*



 
   jdbcDriver
 
com.microsoft.jdbc.sqlserver.SQLServerDriver


   jdbcURL
 
jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=imag
e


   jdbcUserName
   image 


   jdbcPassword
   image 


   minimumConnections
   1


   maximumConnections
   5


   web.InitializeConnectionPool



  gateway
 Gateway
Entry to CRC
  /Gateway.jsp
  
  
  crcForm
 crcForm
Form to request data
  /Forms/crcForm.jsp
  
  
gateway
/Gateway
  
  
crcForm
/form
  
  

20


 
util.sql.ConnNotAvailException
/error/server_busy.html


util.sql.ShuttingDownException
/error/server_shutdown.html

   


  RestrictedResources
   /form
  POST
  GET


  admin

  
  
FORM

  /login/login.jsp
  /login/error.jsp

  
  
A simple restricted-access user role.
admin
  
 


errorlogfile*


some of you would like to have all errors, some don't. So I attached the
error logfile.


Thanks,

James Ostad
Application Developer/Analyst
TMS Department
Ex. 4457
E-mail: [EMAIL PROTECTED]


Out---> (3)


<---In (14)


Out---> (3)



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



JDBCRealm problem

2003-11-26 Thread Ostad, James
Hi everyone,
Hope everyone will have a great TG Day.

Problem: I am not able to login successfully. It keeps failing.

Structure: using JDBCRealm + form authentication

database property: match exactly as explained in tomcat documentation
for setting up JDBCRealm

I am including three things:

1-server.xml part for realm setup
2-web.xml of the web apps
3-errorlog file is the error log I get when I attempt to use jdbcrealm.
 
you will find them in this email accordingly.

Any help will be appreciated.


server.xml**



web.xml*



 
   jdbcDriver
 
com.microsoft.jdbc.sqlserver.SQLServerDriver


   jdbcURL
 
jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=imag
e


   jdbcUserName
   image 


   jdbcPassword
   image 


   minimumConnections
   1


   maximumConnections
   5


   web.InitializeConnectionPool



  gateway
 Gateway
Entry to CRC
  /Gateway.jsp
  
  
  crcForm
 crcForm
Form to request data
  /Forms/crcForm.jsp
  
  
gateway
/Gateway
  
  
crcForm
/form
  
  

20


 
util.sql.ConnNotAvailException
/error/server_busy.html


util.sql.ShuttingDownException
/error/server_shutdown.html

   


  RestrictedResources
   /form
  POST
  GET


  admin

  
  
FORM

  /login/login.jsp
  /login/error.jsp

  
  
A simple restricted-access user role.
admin
  
 


errorlogfile*


some of you would like to have all errors, some don't. So I attached the
error logfile.


Thanks,

James Ostad
Application Developer/Analyst
TMS Department
Ex. 4457
E-mail: [EMAIL PROTECTED]


Out---> (3)
2003-11-26 11:51:17 HostConfig[localhost]: Deploying configuration descriptor admin.xml
2003-11-26 11:51:26 HostConfig[localhost]: Deploying configuration descriptor 
manager.xml
2003-11-26 11:51:26 WebappLoader[/manager]: Deploying class repositories to work 
directory D:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\manager
2003-11-26 11:51:26 ContextConfig[/manager]: Configured an authenticator for method 
BASIC
2003-11-26 11:51:26 StandardManager[/manager]: Seeding random number generator class 
java.security.SecureRandom
2003-11-26 11:51:26 StandardManager[/manager]: Seeding of random number generator has 
been completed
2003-11-26 11:51:26 StandardManager[/manager] IOException while loading persisted 
sessions: java.io.EOFException
java.io.EOFException
at 
java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2150)
at 
java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2619)
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:726)
at java.io.ObjectInputStream.(ObjectInputStream.java:251)
at 
org.apache.catalina.util.CustomObjectInputStream.(CustomObjectInputStream.java:103)
at org.apache.catalina.session.StandardManager.load(StandardManager.java:408)
at org.apache.catalina.session.StandardManager.start(StandardManager.java:655)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3585)
at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
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:700)
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:252)
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.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.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAX

RE: JDBCRealm problem with MySQL after adding password and changing user account

2003-01-14 Thread mech
Strange, I found this non-";"-separated example in:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/realm-howto.html#JDBCRea
lm




Your note for the & in xml is true, but shouldn't matter in a quoted
string, or do I mix something up now?

Anyway... Using the connectionName, connectionPassword attributes and
you are on the safe side...

Michael


> -Original Message-
> From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]] 
> Sent: Dienstag, 14. Januar 2003 14:25
> To: Tomcat Users List; [EMAIL PROTECTED]
> Subject: RE: JDBCRealm problem with MySQL after adding 
> password and changing user account
> 
> 
> If you want to use & inside xml you have to encode it.
> 
> ?user=praksis&password=foo
> should be changed to
> ?user=praksis&password=foo
> 
> 
> BTW: In the JDBCRealm-howto they use ; to seperate
> the password from the user.
> 
> ?user=praksis;password=foo
> 
> As I'm not using mysql I'm not shure if that is correct.
> 
> > -Original Message-
> > From: mech [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, January 14, 2003 2:06 PM
> > To: [EMAIL PROTECTED]
> > Subject: JDBCRealm problem with MySQL after adding password
> > and changing
> > user account
> > 
> > 
> > connectionURL="jdbc:mysql://localhost:3307/praksis?user=praksi
> > s&password
> > =siskarp"
> > userTable="benutzer" userNameCol="email" 
> > userCredCol="passwort"
> > userRoleTable="rollen" roleNameCol="rollenname" 
> digest="SHA-1"/>
> > 
> > Now I only get weird error messages from the xml parser:
> > org.xml.sax.SAXParseException: The reference to entity 
> "password" 
> > must end with the ';' delimiter.
> > 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:tomcat-user-> [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: <mailto:[EMAIL PROTECTED]>
> 


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




RE: JDBCRealm problem with MySQL after adding password and changing user account

2003-01-14 Thread Ralph Einfeldt
If you want to use & inside xml you have to encode it.

?user=praksis&password=foo
should be changed to
?user=praksis&password=foo


BTW: In the JDBCRealm-howto they use ; to seperate
the password from the user.

?user=praksis;password=foo

As I'm not using mysql I'm not shure if that is correct.

> -Original Message-
> From: mech [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 14, 2003 2:06 PM
> To: [EMAIL PROTECTED]
> Subject: JDBCRealm problem with MySQL after adding password 
> and changing
> user account
> 
> 
> connectionURL="jdbc:mysql://localhost:3307/praksis?user=praksi
> s&password
> =siskarp"
>   userTable="benutzer" userNameCol="email"
> userCredCol="passwort"
>   userRoleTable="rollen" roleNameCol="rollenname"
> digest="SHA-1"/>
> 
> Now I only get weird error messages from the xml parser:
>   org.xml.sax.SAXParseException: The reference to entity
> "password" must end with the ';' delimiter.
> 

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




RE: JDBCRealm problem with MySQL after adding password and changing user account (bug, unclear tomcat documentation or my stupidity?)

2003-01-14 Thread mech
Sorry, for the post... Solved it myself.
The trick was that you should NOT put your password into the
"connectionURL"

instead one can use:



Although I have no idea why the tomcat documentation offers an example
for exactly the case where you put username and password into the
"connectionURL". 
For some reason it works unless you only specify a user in the URL, but
for more one has to split the data into "connectionURL",
"connectionName" and "connectionPassword"

Did anybody have similar experiences? Is this a bug while parsing the
server.xml?
At least it doesn't seem to be very consistent, if connectionURL works
with "jdbc:mysql://localhost:3307/praksis?user=root" but not with
"jdbc:mysql://localhost:3307/praksis?user=root&password=test"

So I start using ONLY "connectionName" and "connectionPassword" as I
might get gray hairs soon enough anyway... ;-)

Michael


> -Original Message-
> From: mech [mailto:[EMAIL PROTECTED]] 
> Sent: Dienstag, 14. Januar 2003 14:06
> To: [EMAIL PROTECTED]
> Subject: JDBCRealm problem with MySQL after adding password 
> and changing user account
> 
> 
> Hi,
> 
> I have a problem with my Tomcat 4.1.18 JDBCRealm setup on 
> Solaris in server.xml
> 
> Previously I had this in my context definition in server.xml 
> and it works fine:
> 
>debug="99"
>   driverName="com.mysql.jdbc.Driver"
>  
> connectionURL="jdbc:mysql://localhost:3307/praksis?user=root"
>   userTable="benutzer" 
> userNameCol="email" userCredCol="passwort"
>   userRoleTable="rollen" roleNameCol="rollenname" 
> digest="SHA-1"/>
> 
> Then I added a new user in MySQL named "praksis" to replace 
> the root access and tried to change to this setup:
> 
>debug="99"
>   driverName="com.mysql.jdbc.Driver"
>  
> connectionURL="jdbc:mysql://localhost:3307/praksis?user=praksi
> s&password
> =siskarp"
>   userTable="benutzer" 
> userNameCol="email" userCredCol="passwort"
>   userRoleTable="rollen" roleNameCol="rollenname" 
> digest="SHA-1"/>
> 
> Now I only get weird error messages from the xml parser:
>   org.xml.sax.SAXParseException: The reference to entity 
> "password" must end with the ';' delimiter.
> 
> Thus I tried 
> "jdbc:mysql://localhost:3307/praksis?user=praksis&password=sis
> karp;" but this didn't do the trick... Does it mean anything 
> else? I use "mysql-connector-java-2.0.14.jar" in common/lib 
> (for tomcat) and webapps/praksis/WEB-INF/libs (for struts)
> 
> But I believe the connectionURL is correct because I looked 
> it up in the tomcat doc under jdbc realms. 
> The MySQL setup/user setup should be okay aswell, because my 
> Struts connection pool works with:
> 
>   
>   
>value="com.mysql.jdbc.Driver"/>
>value="jdbc:mysql://localhost:3307/praksis"/>
>   
>   
>   
>value="siskarp"/>
> 
>   
> 
> So right now, I'm using a root access without password for my 
> JDBC Realm, because the different JDBC Realm prohibits Tomcat 
> from starting up. But my webapp itself can utilize the struts 
> connection pool with above user account setup without any problems.
> 
> Actually I don't know what I did wrong and was hoping for 
> help that I can use the "praksis" user for both purposes.
> 
> Thanks!
> Michael
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:tomcat-user-> [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: <mailto:[EMAIL PROTECTED]>
> 


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




JDBCRealm problem with MySQL after adding password and changing user account

2003-01-14 Thread mech
Hi,

I have a problem with my Tomcat 4.1.18 JDBCRealm setup on Solaris in
server.xml

Previously I had this in my context definition in server.xml and it
works fine:

  

Then I added a new user in MySQL named "praksis" to replace the root
access and tried to change to this setup:

  

Now I only get weird error messages from the xml parser:
org.xml.sax.SAXParseException: The reference to entity
"password" must end with the ';' delimiter.

Thus I tried
"jdbc:mysql://localhost:3307/praksis?user=praksis&password=siskarp;" but
this didn't do the trick... Does it mean anything else? I use
"mysql-connector-java-2.0.14.jar" in common/lib (for tomcat) and
webapps/praksis/WEB-INF/libs (for struts)

But I believe the connectionURL is correct because I looked it up in the
tomcat doc under jdbc realms. 
The MySQL setup/user setup should be okay aswell, because my Struts
connection pool works with:









  


So right now, I'm using a root access without password for my JDBC
Realm, because the different JDBC Realm prohibits Tomcat from starting
up. But my webapp itself can utilize the struts connection pool with
above user account setup without any problems.

Actually I don't know what I did wrong and was hoping for help that I
can use the "praksis" user for both purposes.

Thanks!
Michael


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




JDBCRealm problem (EMPTY page after login)

2002-04-03 Thread Alvin Wang

Hi! I am using JDBCRealm in Tomcat to setup the user authentication. For
example if the user want to access abc.html, Tomcat will first display the
login.jsp page. However, after the user logs in, it shows an EMPTY page. The
user has to refresh the browser to see the content of abc.html

Can any guru tell me how to fix this? Thanks!

Alvin


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: tomcat4 and JDBCRealm problem

2001-10-02 Thread Epling, Bob

Craig,

Thanks for the help...
I guess I need to get my glasses checked...
When I read step 3 I read it as $CATALINA_HOME/lib without the server...
I will read more carefully next time...

Thanks again,
Bob Epling

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 02, 2001 10:25 AM
To: [EMAIL PROTECTED]
Subject: RE: tomcat4 and JDBCRealm problem




On Tue, 2 Oct 2001, Epling, Bob wrote:

> Date: Tue, 2 Oct 2001 08:35:18 -0600
> From: "Epling, Bob" <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: RE: tomcat4 and JDBCRealm problem
>
> Craig,
>
> Thanks for the advice.  For grins I wrote a quickie program in java
that
> connected to the database and
> listed the users.  It worked fine using the same parameters that were
in
> the server.xml for Tomcat.
> So, I started to scratch my head some more and took a harder look at
> catalina.bat.
> Even though I had my NT classpath pointing to the mysql.jar, I decided
> to add the mysql.jar path
> to the following line in catalina.bat:
>
> ---> set
>
CP=%CATALINA_HOME%\bin\bootstrap.jar;%JAVA_HOME%\lib\tools.jar;c:\javali
> b\mysql.jar
>
> Voila!...it worked.
> Can you tell me why it didn't pick up the jar file from my NT
classpath
> or from the lib directory in the TOMCAT_HOME?
>

That's really simple - the standard startup scripts for Tomcat 4.0
totally
ignore whatever CLASSPATH variable you might have installed before
starting Tomcat.  Classpaths get more users in more trouble than
anything
I have ever seen, so Tomcat uses a different technique:

* If you need a JAR file available to a particular webapp, put it in the
  /WEB-INF/lib directory of that webapp.

* If you need a JAR file available to all web apps (but not to the
  internal classes of Tomcat), put it in $CATALINA_HOME/lib.

* If you need a JAR file available to Tomcat internal classes (as is
  the case with the driver required by JDBCRealm), but it in
  $CATALINA_HOME/server/lib.

* If you need a JAR file available to *both* applications and Tomcat
  internal classes, put it in $CATALINA_HOME/common/lib.

> Maybe the instructions for setting up a JDBCRealm need to be modified
to
> add this little tidbit of info.
>

It's already there.  The online version of the docs included with Tomcat
is at:

 
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/realm-howto.html#JDBCRea
lm

see step 3 under the "Quick Start" instructions.

More info on the class loading architecture is also available:

 http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader-howto.html

> Thanks for the help,
> Bob Epling
>

Craig




Re: tomcat4 and JDBCRealm problem

2001-10-02 Thread Brian Richards

If you are using Tomcat 4 put it in CATALINA_HOME\common\lib
- Original Message - 
From: "Epling, Bob" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 02, 2001 10:35 AM
Subject: RE: tomcat4 and JDBCRealm problem


Craig,

Thanks for the advice.  For grins I wrote a quickie program in java that
connected to the database and
listed the users.  It worked fine using the same parameters that were in
the server.xml for Tomcat.
So, I started to scratch my head some more and took a harder look at
catalina.bat.
Even though I had my NT classpath pointing to the mysql.jar, I decided
to add the mysql.jar path
to the following line in catalina.bat:

---> set
CP=%CATALINA_HOME%\bin\bootstrap.jar;%JAVA_HOME%\lib\tools.jar;c:\javali
b\mysql.jar

Voila!...it worked.
Can you tell me why it didn't pick up the jar file from my NT classpath
or from the lib directory in the TOMCAT_HOME?

Maybe the instructions for setting up a JDBCRealm need to be modified to
add this little tidbit of info.

Thanks for the help,
Bob Epling

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 01, 2001 8:52 PM
To: [EMAIL PROTECTED]
Subject: Re: tomcat4 and JDBCRealm problem


The fact that you are getting a SQLException (rather than a
ClassNotFoundException) implies that the problem is *not* in locating
the
driver - it is in the parameters you are specifying to establish the
database connection.  Double (and triple) check your values for the
"connectionName", "connectionPassword", and "connectionURL" parameters,
as
well as the security permissions you have set up in the MySQL database
itself.

Craig McClanahan


On Mon, 1 Oct 2001, Epling, Bob wrote:

> Date: Mon, 1 Oct 2001 16:50:41 -0600
> From: "Epling, Bob" <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: tomcat4 and JDBCRealm problem
>
> Hi all,
>
> I have tomcat4 set up on my winnt machine and it works fine with basic
> Memory realm authentication.
> I followed the steps in setting up a JDBCRealm using mysql and I get
the
> following error when starting Tomcat:
>
> Starting service Tomcat-Standalone
> Apache Tomcat/4.0
> Catalina.start: LifecycleException:  Exception opening database
> connection:  java.sql.SQLException: org.gjt.mm.mysql.Dri
> ver
> LifecycleException:  Exception opening database connection:
> java.sql.SQLException: org.gjt.mm.mysql.Driver
> at
org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:615)
> at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108)
> at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:307)
> at
>
org.apache.catalina.core.StandardService.start(StandardService.java:388)
> at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:505)
> at
org.apache.catalina.startup.Catalina.start(Catalina.java:776)
> at
> org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
> at
> org.apache.catalina.startup.Catalina.process(Catalina.java:179)
> at java.lang.reflect.Method.invoke(Native Method)
> at
> org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:218)
> - Root Cause -
> java.sql.SQLException: org.gjt.mm.mysql.Driver
> at
org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:538)
> 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:307)
> at
>
org.apache.catalina.core.StandardService.start(StandardService.java:388)
> at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:505)
> at
org.apache.catalina.startup.Catalina.start(Catalina.java:776)
> at
> org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
> at
> org.apache.catalina.startup.Catalina.process(Catalina.java:179)
> at java.lang.reflect.Method.invoke(Native Method)
> at
> org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:218)
>
> I've tried putting the mysql jar in c:\javalib and also under
> c:\tomcat4.0\lib
> but no luck.  This is my server.xml file currently:
>
>
>   
>
> 
>
>   
>
>
> driverName="org.gjt.mm.mysql.Driver"
>
> connectionURL="jdbc:mysql://localhost:3306/tomcatusers?user=root"
>  userTable="users" userNameCol="user_name"
> userCredCol="user_pass"
>  userRoleTable="user_roles" roleNameCol="role_name" />
>
>
> I can see the tables I have setup on my nt box in mysql.
> I can query those tables using mysql.
>
> Any help is appreciated.
>
> Thanks,
> Bob
>







RE: tomcat4 and JDBCRealm problem

2001-10-02 Thread Craig R. McClanahan



On Tue, 2 Oct 2001, Epling, Bob wrote:

> Date: Tue, 2 Oct 2001 08:35:18 -0600
> From: "Epling, Bob" <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: RE: tomcat4 and JDBCRealm problem
>
> Craig,
>
> Thanks for the advice.  For grins I wrote a quickie program in java that
> connected to the database and
> listed the users.  It worked fine using the same parameters that were in
> the server.xml for Tomcat.
> So, I started to scratch my head some more and took a harder look at
> catalina.bat.
> Even though I had my NT classpath pointing to the mysql.jar, I decided
> to add the mysql.jar path
> to the following line in catalina.bat:
>
> ---> set
> CP=%CATALINA_HOME%\bin\bootstrap.jar;%JAVA_HOME%\lib\tools.jar;c:\javali
> b\mysql.jar
>
> Voila!...it worked.
> Can you tell me why it didn't pick up the jar file from my NT classpath
> or from the lib directory in the TOMCAT_HOME?
>

That's really simple - the standard startup scripts for Tomcat 4.0 totally
ignore whatever CLASSPATH variable you might have installed before
starting Tomcat.  Classpaths get more users in more trouble than anything
I have ever seen, so Tomcat uses a different technique:

* If you need a JAR file available to a particular webapp, put it in the
  /WEB-INF/lib directory of that webapp.

* If you need a JAR file available to all web apps (but not to the
  internal classes of Tomcat), put it in $CATALINA_HOME/lib.

* If you need a JAR file available to Tomcat internal classes (as is
  the case with the driver required by JDBCRealm), but it in
  $CATALINA_HOME/server/lib.

* If you need a JAR file available to *both* applications and Tomcat
  internal classes, put it in $CATALINA_HOME/common/lib.

> Maybe the instructions for setting up a JDBCRealm need to be modified to
> add this little tidbit of info.
>

It's already there.  The online version of the docs included with Tomcat
is at:

 http://jakarta.apache.org/tomcat/tomcat-4.0-doc/realm-howto.html#JDBCRealm

see step 3 under the "Quick Start" instructions.

More info on the class loading architecture is also available:

 http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader-howto.html

> Thanks for the help,
> Bob Epling
>

Craig




RE: tomcat4 and JDBCRealm problem

2001-10-02 Thread Epling, Bob

Craig,

Thanks for the advice.  For grins I wrote a quickie program in java that
connected to the database and
listed the users.  It worked fine using the same parameters that were in
the server.xml for Tomcat.
So, I started to scratch my head some more and took a harder look at
catalina.bat.
Even though I had my NT classpath pointing to the mysql.jar, I decided
to add the mysql.jar path
to the following line in catalina.bat:

---> set
CP=%CATALINA_HOME%\bin\bootstrap.jar;%JAVA_HOME%\lib\tools.jar;c:\javali
b\mysql.jar

Voila!...it worked.
Can you tell me why it didn't pick up the jar file from my NT classpath
or from the lib directory in the TOMCAT_HOME?

Maybe the instructions for setting up a JDBCRealm need to be modified to
add this little tidbit of info.

Thanks for the help,
Bob Epling

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 01, 2001 8:52 PM
To: [EMAIL PROTECTED]
Subject: Re: tomcat4 and JDBCRealm problem


The fact that you are getting a SQLException (rather than a
ClassNotFoundException) implies that the problem is *not* in locating
the
driver - it is in the parameters you are specifying to establish the
database connection.  Double (and triple) check your values for the
"connectionName", "connectionPassword", and "connectionURL" parameters,
as
well as the security permissions you have set up in the MySQL database
itself.

Craig McClanahan


On Mon, 1 Oct 2001, Epling, Bob wrote:

> Date: Mon, 1 Oct 2001 16:50:41 -0600
> From: "Epling, Bob" <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: tomcat4 and JDBCRealm problem
>
> Hi all,
>
> I have tomcat4 set up on my winnt machine and it works fine with basic
> Memory realm authentication.
> I followed the steps in setting up a JDBCRealm using mysql and I get
the
> following error when starting Tomcat:
>
> Starting service Tomcat-Standalone
> Apache Tomcat/4.0
> Catalina.start: LifecycleException:  Exception opening database
> connection:  java.sql.SQLException: org.gjt.mm.mysql.Dri
> ver
> LifecycleException:  Exception opening database connection:
> java.sql.SQLException: org.gjt.mm.mysql.Driver
> at
org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:615)
> at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108)
> at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:307)
> at
>
org.apache.catalina.core.StandardService.start(StandardService.java:388)
> at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:505)
> at
org.apache.catalina.startup.Catalina.start(Catalina.java:776)
> at
> org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
> at
> org.apache.catalina.startup.Catalina.process(Catalina.java:179)
> at java.lang.reflect.Method.invoke(Native Method)
> at
> org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:218)
> - Root Cause -
> java.sql.SQLException: org.gjt.mm.mysql.Driver
> at
org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:538)
> 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:307)
> at
>
org.apache.catalina.core.StandardService.start(StandardService.java:388)
> at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:505)
> at
org.apache.catalina.startup.Catalina.start(Catalina.java:776)
> at
> org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
> at
> org.apache.catalina.startup.Catalina.process(Catalina.java:179)
> at java.lang.reflect.Method.invoke(Native Method)
> at
> org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:218)
>
> I've tried putting the mysql jar in c:\javalib and also under
> c:\tomcat4.0\lib
> but no luck.  This is my server.xml file currently:
>
>
>   
>
> 
>
>   
>
>
> driverName="org.gjt.mm.mysql.Driver"
>
> connectionURL="jdbc:mysql://localhost:3306/tomcatusers?user=root"
>  userTable="users" userNameCol="user_name"
> userCredCol="user_pass"
>  userRoleTable="user_roles" roleNameCol="role_name" />
>
>
> I can see the tables I have setup on my nt box in mysql.
> I can query those tables using mysql.
>
> Any help is appreciated.
>
> Thanks,
> Bob
>




Re: tomcat4 and JDBCRealm problem

2001-10-01 Thread Craig R. McClanahan

The fact that you are getting a SQLException (rather than a
ClassNotFoundException) implies that the problem is *not* in locating the
driver - it is in the parameters you are specifying to establish the
database connection.  Double (and triple) check your values for the
"connectionName", "connectionPassword", and "connectionURL" parameters, as
well as the security permissions you have set up in the MySQL database
itself.

Craig McClanahan


On Mon, 1 Oct 2001, Epling, Bob wrote:

> Date: Mon, 1 Oct 2001 16:50:41 -0600
> From: "Epling, Bob" <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: tomcat4 and JDBCRealm problem
>
> Hi all,
>
> I have tomcat4 set up on my winnt machine and it works fine with basic
> Memory realm authentication.
> I followed the steps in setting up a JDBCRealm using mysql and I get the
> following error when starting Tomcat:
>
> Starting service Tomcat-Standalone
> Apache Tomcat/4.0
> Catalina.start: LifecycleException:  Exception opening database
> connection:  java.sql.SQLException: org.gjt.mm.mysql.Dri
> ver
> LifecycleException:  Exception opening database connection:
> java.sql.SQLException: org.gjt.mm.mysql.Driver
> at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:615)
> at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108)
> at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:307)
> at
> org.apache.catalina.core.StandardService.start(StandardService.java:388)
> at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:505)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:776)
> at
> org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
> at
> org.apache.catalina.startup.Catalina.process(Catalina.java:179)
> at java.lang.reflect.Method.invoke(Native Method)
> at
> org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:218)
> - Root Cause -
> java.sql.SQLException: org.gjt.mm.mysql.Driver
> at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:538)
> 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:307)
> at
> org.apache.catalina.core.StandardService.start(StandardService.java:388)
> at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:505)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:776)
> at
> org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
> at
> org.apache.catalina.startup.Catalina.process(Catalina.java:179)
> at java.lang.reflect.Method.invoke(Native Method)
> at
> org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:218)
>
> I've tried putting the mysql jar in c:\javalib and also under
> c:\tomcat4.0\lib
> but no luck.  This is my server.xml file currently:
>
>
>   
>
> 
>
>   
>
>
> driverName="org.gjt.mm.mysql.Driver"
>
> connectionURL="jdbc:mysql://localhost:3306/tomcatusers?user=root"
>  userTable="users" userNameCol="user_name"
> userCredCol="user_pass"
>  userRoleTable="user_roles" roleNameCol="role_name" />
>
>
> I can see the tables I have setup on my nt box in mysql.
> I can query those tables using mysql.
>
> Any help is appreciated.
>
> Thanks,
> Bob
>




tomcat4 and JDBCRealm problem

2001-10-01 Thread Epling, Bob

Hi all,

I have tomcat4 set up on my winnt machine and it works fine with basic
Memory realm authentication.
I followed the steps in setting up a JDBCRealm using mysql and I get the
following error when starting Tomcat:

Starting service Tomcat-Standalone
Apache Tomcat/4.0
Catalina.start: LifecycleException:  Exception opening database
connection:  java.sql.SQLException: org.gjt.mm.mysql.Dri
ver
LifecycleException:  Exception opening database connection:
java.sql.SQLException: org.gjt.mm.mysql.Driver
at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:615)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:307)
at
org.apache.catalina.core.StandardService.start(StandardService.java:388)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:505)
at org.apache.catalina.startup.Catalina.start(Catalina.java:776)
at
org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at
org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at java.lang.reflect.Method.invoke(Native Method)
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:218)
- Root Cause -
java.sql.SQLException: org.gjt.mm.mysql.Driver
at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:538)
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:307)
at
org.apache.catalina.core.StandardService.start(StandardService.java:388)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:505)
at org.apache.catalina.startup.Catalina.start(Catalina.java:776)
at
org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at
org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at java.lang.reflect.Method.invoke(Native Method)
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:218)

I've tried putting the mysql jar in c:\javalib and also under
c:\tomcat4.0\lib
but no luck.  This is my server.xml file currently:


  



  

  
  
  

I can see the tables I have setup on my nt box in mysql.
I can query those tables using mysql.

Any help is appreciated.

Thanks,
Bob



Re: jdbcRealm problem

2001-08-09 Thread Taavi Tiirik

> From: Francois Bronsard 
> ...
> The trace of the session state that authetication was successful,
> yet, the system keeps asking for username and password and finally
> fails. Any idea what could be wrong?

Make sure you comment out SimpleRealm interceptor if you use JDBCRealm.
I accidentally left in both interceptors on one server and it did the
very same thing... JDBCRealm log messages said that authentication
was successful but it still displayed an error page.

Did it help?

with best wishes,
Taavi





RE: jdbcRealm problem

2001-08-06 Thread Michael Wentzel

Check your Remote User, User Principal and Auth Type header values 
and see if they are getting set after the authorization call.  If
not this could be the problem.  If this is the case I would suggest
putting some additional debug code in JDBCRealm and recompiling it
(or using a debugger) to figure out where everything's going wrong.

Also, do you have any roles set up or are your constraints global?


---
Michael Wentzel
Software Developer
Software As We Think - http://www.aswethink.com



jdbcRealm problem

2001-08-06 Thread Francois Bronsard

Hi everyone,

I'm trying to use JDBCRealm for authetication and I'm having some problems.
The trace of the session state that authetication was successful, yet, the
system keeps asking for username and password and finally fails.  Any idea
what could be wrong?

Here is the server.xml setting: (I checked the database connection and it
works fine with that driver and URL)


The trace in the tomcat windows is:
2001-08-06 10:37:24 - ContextManager: JDBCRealm: The database connection is null
 or was found to be closed. Trying to re-open it.
2001-08-06 10:37:24 - ContextManager: JDBCRealm: JDBCRealm.authenticate: SELECT
user_pass FROM account WHERE userid = ?
2001-08-06 10:37:24 - ContextManager: JDBCRealm: Authentication successful for u
ser j2ee
2001-08-06 10:37:24 - ContextManager: JDBCRealm: Auth ok, user=j2ee

and yet, the system keeps asking me to login!

Help greatly appreciated,
Francois Bronsard