tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eddie Bush <ekb...@swbell.net>
Subject Re: Null Pointer Exception - would you please take a look?
Date Tue, 18 Jun 2002 19:26:31 GMT
But why would this be happening?  I haven't even been presented with a
prompt at which I could enter a usename/password!  I understand what you are
saying - but I'm not sure ... I'm not sure =)  No, I don't really have
another DBMS I can plug in easily.  Let me go ahead and post my realm
definition - maybe someone will see a problem with it:

<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
             driverName="interbase.interclient.Driver"
             connectionURL="jdbc:interbase://host//path/to/my/data/file.gdb"
             connectionName="validuser"
             connectionPassword="validuserpswd"
             userTable="member"
             userNameCol="username"
             userCredCol="passwd"
             userRoleTable="member_role"
             roleNameCol="rolename"
/>

Is this good?  It's nested in an Engine element (WarpEngine) which is nested
in a Connector element (WarpConnector) which is nested in a Service element
which is nested in a Server element.  Basically what I did was take the
config file that came with Tomcat, cut out ALL of the stand-alone stuff -
and leave the Warp stuff.  Does it sound as though I've approached this
poorly?  It works for everything except this danged authentication!

Thanks so much!

Eddie

----- Original Message -----
From: "Tim Funk" <funkman@joedog.org>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
Sent: Tuesday, June 18, 2002 2:22 PM
Subject: Re: Null Pointer Exception - would you please take a look?


> This may be to much to ask for - but are you able to get this to work
> with a different DBMS?  On first glance, it appears you (not literally)
> might be passing null to the JDBC driver's setString() method and the
> JDBC driver can't handle the null value. Consequently - things explode.
> If so - it would be JDBC driver's fault and not tomcat. (But that could
> be subject to opinion too)
>
> -Tim
>
> Eddie Bush wrote:
> > 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">
> > <HTML><HEAD>
> > <META http-equiv=Content-Type content="text/html;
> > charset=windows-1252"></HEAD>
> > <BODY><PRE></PRE></BODY></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]
> > java.lang.NullPointerException
> >     at interbase.interclient.PreparedStatement.setString(Unknown Source)
> >     at org.apache.catalina.realm.JDBCRealm.credentials(JDBCRealm.java)
> >     at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java)
> >     at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java)
> >
> > 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
> > answer:
> >
> > 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!
> >
> > Eddie
>
>
> --
> To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message