You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by davide semprini <se...@hotmail.com> on 2000/11/22 15:55:58 UTC

AGAIN error null pointer ESQL

HI,
tanks for reply me ,
but the error persist
I have to create also the xsl stylesheet
to display the rowset? I don't think so,
my file is correct but why null pointer error?

---------- dadde.xml----------------

<?xml version="1.0"?>
<?xml-logicsheet
href="resource://org/apache/cocoon/processor/xsp/library/sql/esql.xsl"?>
<?cocoon-process type="xsp"?>
<xsp:page
  language="java"
  xmlns:esql="http://apache.org/cocoon/SQL/v2"
  xmlns:xsp="http://www.apache.org/1999/XSP/Core">
  <page>
    <esql:connection>
      <esql:driver>oracle.jdbc.oracle.OracleDriver</esql:driver>
      <esql:dburl>jdbc:oracle:thin:@sirio.cineca.it:1521:sdb</esql:dburl>
      <esql:username>semprini</esql:username>
      <esql:password>semprini</esql:password>
      <esql:execute-query>
     <esql:query>select nome from dati</esql:query>

     <esql:results>
       <esql:row-results>
       <nome><esql:get-string column="nome"/></nome>
       </esql:row-results>
       <esql:no-results>
       <blank>No results returned</blank>
       </esql:no-results>
       <esql:error-results>
       <error>There was a database error</error>
       </esql:error-results>

       </esql:results>
     </esql:execute-query>
</esql:connection>
</page>
</xsp:page>


I have to set in my cocoon.properties another setting
about esql?

tanks a lot !!!!!!!
















>From: Kevin Sonney <ke...@webslingerz.com>
>Reply-To: cocoon-users@xml.apache.org
>To: cocoon-users@xml.apache.org
>Subject: Re: error null pointer ESQL
>Date: Wed, 22 Nov 2000 09:37:55 -0500 (EST)
>
>Davide -
>
>On Wed, 22 Nov 2000, davide semprini wrote:
> > i try to work in cocoon with this file:
> >
> > dadde.xml--------------------------
><trim />
>
>Looking at the doc, The first thing I'd do is put the return data from the
>row-results into a tag, and catch the other conditions, like so :
>
><!-- result processing -->
><esql:results>
><!-- if we have data returned -->
><esql:row-results>
><nome><esql:get-string column="nome"/></nome>
></esql:row-results>
><!-- if no data is returned -->
><esql:no-results>
><blanco>No results returned</blanco>
></esql:no-results>
><!-- error in resultset -->
><esql:error-results>
><error>There was a database error</error>
></esql:error-results>
></esql:results>
><!-- end result processing -->
>
>HTH
>
>--
>+-------------------------------------------+
>| Kevin Sonney        kevin@webslingerZ.com |
>| Systems Programmer    www.webslingerZ.com |
>+-------------------------------------------+
>
>"The weakest link in any civil rights case is always the
>defendant. Imagine being a lawyer and getting a call from me. That's why I
>try to, uh, behave myself." - Hunter S. Thompson
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
>For additional commands, e-mail: cocoon-users-help@xml.apache.org
>

_____________________________________________________________________________________
Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com


Re: AGAIN error null pointer ESQL

Posted by Kevin Sonney <ke...@webslingerz.com>.
On Wed, 22 Nov 2000, davide semprini wrote:
> tanks for reply me ,
> but the error persist

Gah. I just realized you're specifying the esql logic sheet in the
document. Althoguh correct, you may want to do so in cocoon.properties
instead.

Perhaps the xsp engine is having trouble loading the logic sheet from a
resource URL instead of a file or href?

> I have to create also the xsl stylesheet
> to display the rowset? I don't think so,

If you were using xslt, yes, you would. As the doc you've sent doesn't
though, you don't need to worry about that just yet.

> my file is correct but why null pointer error?

I'd try removing the xml-logicsheet tag, as mention below :

> I have to set in my cocoon.properties another setting
> about esql?

The default cocoon.proerties from CVS should have the esql logic sheet
definied properly. Please try that instead of specifying insode the actual
XML doc.

> tanks a lot !!!!!!!

No problem. I'm doing the best I can *grin*. 

-- 
+-------------------------------------------+
| Kevin Sonney        kevin@webslingerZ.com |
| Systems Programmer    www.webslingerZ.com |
+-------------------------------------------+

"The weakest link in any civil rights case is always the
defendant. Imagine being a lawyer and getting a call from me. That's why I
try to, uh, behave myself." - Hunter S. Thompson