cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominic Reynolds <>
Subject ESQL erros - cocoon2.0.3
Date Mon, 29 Jul 2002 20:23:52 GMT
I am trying to use ESQL (basic xsp page modelled on the samples).

my problem is that I get the following null pointer exception:

Original exception : java.lang.NullPointerException

And looking at the source it seems that I'm not passing a connection to 
the constructor: -

 public EsqlQuery( EsqlConnection connection, String query ) {
    this.connection = connection;
    this.limitMethod = connection.getLimitMethod();   << line 99

Now looking at the generated java code for my xsp:
is see:

  private EsqlConnectionCocoon2 _esql_connection = null;
// .
// . some non-connection related java stuff......
// .
 _esql_query = new EsqlQuery( _esql_connection, String.valueOf(
      ""       + "SELECT guid FROM appliances WHERE guid="                +
      ) );

So the generated java code is incorrect. I know the datasource i'm using 
is ok as I am using it in an action and it works fine.
I must be doing something wrong here...but what?

Below is the xsp that is called:

<?xml version="1.0"?>
        <esql:query>SELECT guid FROM appliances WHERE 
guid=<xsp-request:get-header name="guid"/></esql:query>
                 <td><esql:get-string column="product"/></td>
 <xsp:attribute name="value"><esql:get-string column="id"/></xsp:attribute>
           <p>Sorry No record</p>

Please check that your question  has not already been answered in the
FAQ before posting.     <>

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

View raw message