cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sidney Chong" <>
Subject Re: sqlprocessor question
Date Wed, 01 Dec 1999 03:22:44 GMT
ok, I'm found the problem: I was getting a null pointer exception.

After a good deal of printlns (BTW, anyone knows a better way to debug
cocoon code?), I came down to this:

Class: ConnectionDefs
Method: public Properties getQueryProperties(String name)
BUG: this mtd returns null if name is not found in the query_props_table
hence causing the nullpointer exception to be raised in
SQLProcessor.process() (line 116)

FIX: I've changed the mtd to the following:

public Properties getQueryProperties(String name) {
  if (name == null) return default_query_props;
  Properties query_prop = query_props_table.get(name);
  if (query_prop == null) return default_query_props;
  return query_prop;

Donald, how does that sound?


----- Original Message -----
From: "Donald Ball" <>
To: <>
Sent: Wednesday, 01 December, 1999 5:22 AM
Subject: Re: sqlprocessor question

> On Tue, 30 Nov 1999, Sidney Chong wrote:
> > Hi, wondering if anyone can help... I'm trying to use the sqlprocessor
> > am not successful. The source file and output are as follows:
> >
> > I've setup the driver's classpath and in fact, I am using the same
> > in a producer. Hence I'm pretty sure the database access is ok. Any
> Offhand it looks like it's throwing an exception during connection
> creation. Is there anything suspicious in your servlet engine's error
> logs?
> - donald

View raw message