Missing application log file, Realm authenication error

2005-01-12 Thread Peter Moore
Hi,
I'm trying to track down an odd Realm authentication problem, but I 
can't seem to get anything to show up in any of the logs.  My 
application (henceforth referred to as "myapp") deploys successfully via 
war file with the manager application.  When I try to access those 
portions of the application under security constraints, I am presented 
with an HTTP BASIC authentication dialog.  However, the dialog keeps 
popping up, even though I "know" I'm using the correct username and 
password.  I "know" this, because I've compared the SHA digest in the 
database against one generated from the password.  Take that for what 
it's worth...  ;-)

What's really bugging me is that _NOTHING_ gets logged as to why the 
authentication failed.  One interesting thing I'm seeing, is that even 
though I've defined a  in my  (see below), this log 
file isn't showing up.  I get "catalina.out" and 
"localhost_log.date.txt," but nothing else.  In localhost_log, I do see 
this line, so I have to assume that something is happening:
   2005-01-12 16:35:00 ContextConfig[/myapp]: Configured an 
authenticator for method BASIC

Any help on this would be greatly appreciated, as I'm about out of ideas.
Versions:
---
Tomcat: 4.1.31
Red Hat 9.0  (yes, I have this as part of the TC start: export 
LD_ASSUME_KERNEL=2.4.1)
Sun JVM: 1.5

I have made the following additions to server.xml for my two JDBC 
datasources:

   
   
...
   (Yes, this information is correct.  It has been tested and 
double-checked.)
   

   
   
...
   (Yes, this information is correct)
   


My application's context.xml file:
-

  
   verbosity="4"
   className="org.apache.catalina.logger.FileLogger"
   prefix="pcs_log."
   suffix=".txt"
   timestamp="true"
  />
 
   
   
  

   

Interesting bits from my applicaton's web.xml:
--
  
 DB Connection
 db_default
 javax.sql.DataSource
 Container
  
  
 DB Connection for statistics only
 db_stats
 javax.sql.DataSource
 Container
  
...
   
   
   Admin
   /admin/*
   
   
   super
   administrator
   
   
...
   
   BASIC
   Application Secure Realm
   
...
   
 super
   
   
 administrator
   
   
 user
   
   
     stats
   
--
Does anyone have any ideas, or perhaps see something obvious that I'm 
missing?

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


Re: Missing application log file, Realm authenication error

2005-01-13 Thread Peter Moore
I've managed to figure out what was going on.  Hopefully someone else 
will find my struggles to be of use.

Using the ant deploy task doesn't appear to do exactly the same thing as 
using "Upload a WAR file to install" via the manager application.  I was 
assuming this was true, because I wasn't sure I could trust how I was 
using the ant task yet **.  The ant task will look inside your META-INF 
folder for a "context.xml" file, and (in TC 4.1) install that context 
into server.xml.  However, directly using the manager application 
doesn't do that.  I think that means that the default context was being 
used for my application, rather than the one in context.xml.  Somehow, 
that was causing my SQLException to not get logged at all.  BTW, the 
SQLException I was looking for was "Server connection failure during 
transaction," which appears to have been caused by using an older 
version of the MySQL Connector/J component (3.0.4) with a newer version 
of the MySQL server (4.1.7).  [EMAIL PROTECTED]& multi-server applications...

** If you ever get this error:  "java.net.UnknownHostException: C", 
you're probably passing a war file with an absolute path something like 
"C:\...\warfile.war".  There may be some way to make the passed file 
relative, but the way I found to get around this is to change "file://" 
to "file:///".

-Peter

Peter Moore wrote:
Hi,
I'm trying to track down an odd Realm authentication problem, but I 
can't seem to get anything to show up in any of the logs.  My 
application (henceforth referred to as "myapp") deploys successfully 
via war file with the manager application.  When I try to access those 
portions of the application under security constraints, I am presented 
with an HTTP BASIC authentication dialog.  However, the dialog keeps 
popping up, even though I "know" I'm using the correct username and 
password.  I "know" this, because I've compared the SHA digest in the 
database against one generated from the password.  Take that for what 
it's worth...  ;-)

What's really bugging me is that _NOTHING_ gets logged as to why the 
authentication failed.  One interesting thing I'm seeing, is that even 
though I've defined a  in my  (see below), this log 
file isn't showing up.  I get "catalina.out" and 
"localhost_log.date.txt," but nothing else.  In localhost_log, I do 
see this line, so I have to assume that something is happening:
   2005-01-12 16:35:00 ContextConfig[/myapp]: Configured an 
authenticator for method BASIC

Any help on this would be greatly appreciated, as I'm about out of ideas.
Versions:
---
Tomcat: 4.1.31
Red Hat 9.0  (yes, I have this as part of the TC start: export 
LD_ASSUME_KERNEL=2.4.1)
Sun JVM: 1.5

I have made the following additions to server.xml for my two JDBC 
datasources:
 

   
   
...
   (Yes, this information is correct.  It has been tested and 
double-checked.)
   

   
   
...
   (Yes, this information is correct)
   
 


My application's context.xml file:
-

  
   verbosity="4"
   className="org.apache.catalina.logger.FileLogger"
   prefix="pcs_log."
   suffix=".txt"
   timestamp="true"
  />
 
   
   
 
   
   resourceName="Application Secure Realm"
   className="org.apache.catalina.realm.DataSourceRealm"
   dataSourceName="jdbc/db_devel"
   userTable="employee"
   userNameCol="login"
   userCredCol="password"
   userRoleTable="employee"
   roleNameCol="role"
   digest="SHA"
   />


Interesting bits from my applicaton's web.xml:
--
  
 DB Connection
 db_default
 javax.sql.DataSource
 Container
  
  
 DB Connection for statistics only
 db_stats
 javax.sql.DataSource
 Container
  
...
   
   
   Admin
   /admin/*
   
       
   super
   administrator
   
   
...
   
   BASIC
   Application Secure Realm
   
...
   
 super
   
   
 administrator
   
   
 user
   
   
 stats
   
--
Does anyone have any ideas, or perhaps see something obvious that I'm 
missing?

Thanks,
   Peter Moore
-
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]