tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eddie Bush <>
Subject Re: Null Pointer Exception - would you please take a look?
Date Tue, 18 Jun 2002 18:57:24 GMT
I'm getting really annoyed =)  It seems you people haven't actually read my
question thoroughly enough to actually understand what I'm doing.  The
thought crosses my mind that you see the subject and then just scan and put
in some standard "Oh he's an idiot - he needs to do this" response.  The
problem is with a JDBCRealm!  I do NOTHING to send/receive anything to/from
the database.  I was of the understanding that Tomcat did this when I
configured the realm and set up the security-constraint.

While I believe my XML to be valid and correct, I will happily post it for
inspection if someone thinks it would help.  Here is a sequence of what
happens and the actors that are involved:

Actors:  Me and Tomcat

Me:  Enter url of page that is protected by a security constraint into my
browsers address bar.  Press enter.
Tomcat:  Returns to the client a page that looks like:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<META http-equiv=Content-Type content="text/html;

(This is not what the actual page is - it's a JSP file - index.jsp - with
much different content.  Also notice I'm not calling a servlet!  Even if I
were, it wouldn't make a bit of difference at this point because Tomcat
hasn't authenticated me!  This happens when Tomcat should authenticate me -
it is NOT my coding!!!)

In my server log file, I have an error that starts off as:

2002-06-17 12:29:28 [org.apache.catalina.connector.warp.WarpRequestHandler]
    at interbase.interclient.PreparedStatement.setString(Unknown Source)
    at org.apache.catalina.realm.JDBCRealm.credentials(
    at org.apache.catalina.realm.JDBCRealm.authenticate(
    at org.apache.catalina.realm.JDBCRealm.authenticate(

My catalina.out has no indication of anything having gone awry - it merely
has status messages indicating that the server was started (why isn't there
a timestamp in here?).

Any ideas?  Thank you for having actually READ THE ENTIRE MESSAGE so you
UNDERSTAND my problem before having issued a reply =)  Ack!  I'm sorry but
I'm frustrated by the responses I am getting - makes me wanna just jump up
and down and scream at the top of my lungs ... Please - I BEG of you - clue
me in here - any thoughts why this is happening?  Again, I can post my XML
if you think I need to.

A couple of questions people have asked up to this point, along with the

Q: Are you passing a null string?
A: I get this when I try to visit a URL that falls under a security
constraint.  It's a JDBCRealm.  Tomcat handles this - it is not my code.

Q: Are you sure the fields in your table match what Tomcat is expecting?
A: Initially they didn't.  My fields were of length 14 and Tomcat says they
should be 15 -- but they're varchar, so does that really matter?  I rebuilt
the tables so that anything Tomcat uses matches exactly what the docs say -
meaning I made my fields to be of length 15.  I still get the same
response - exactly the same response.

Is this the JDBCRealm?  I put my DB driver in common/lib - so Tomcat SHOULD
be able to find it - right?  Is this the appropriate spot?  Is it possible
(and how possible?) that this is my driver?  I use this driver just fine
doing JDBC stuff all the time - no problem.

Thanks for your time!


----- Original Message -----
From: "August Detlefsen" <>
To: "Tomcat Users List" <>
Sent: Tuesday, June 18, 2002 1:24 PM
Subject: Re: Null Pointer Exception - would you please take a look?

> If you are trying to insert a NULL into a NOT NULL column (or are
> trying to insert special chars or the String is too long), you should
> get a SQLException, not a NullPointerException.
> You should recheck that you are actually getting a valid Connection

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

View raw message