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:24:40 UTC

error null pointer ESQL

hi,
i try to work in cocoon with this file:

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:@*********.it:1521:****</esql:dburl>
      <esql:username>******</esql:username>
      <esql:password>******</esql:password>
      <esql:execute-query>
        <esql:query>select nome from dati</esql:query>
       <esql:results>
       <esql:row-results>
       <esql:get-string column="nome"/>
       </esql:row-results>
       </esql:results>
     </esql:execute-query>
</esql:connection>
</page>
</xsp:page>

table dati contain nome varchar2 , cognome varchar2



but don't work cocoon return me:
Error found handling the request.
java.lang.NullPointerException
	at org.apache.cocoon.processor.xsp.XSPProcessor.process(Compiled Code)
	at org.apache.cocoon.Engine.handle(Compiled Code)
	at org.apache.cocoon.Cocoon.service(Compiled Code)
	at javax.servlet.http.HttpServlet.service(Compiled Code)
	at org.apache.jserv.JServConnection.processRequest(Compiled Code)
	at org.apache.jserv.JServConnection.run(Compiled Code)
	at java.lang.Thread.run(Compiled Code)

why? it's correct my dadde.xml?

tanks a lot!!!!!


semprini davide





why, i read the previous mail list






>From: Drasko Kokic <dr...@yahoo.com>
>Reply-To: cocoon-users@xml.apache.org
>To: cocoon-users@xml.apache.org
>Subject: Re: HELP ESQL
>Date: Wed, 22 Nov 2000 04:56:52 -0800 (PST)
>
>I guess ... esql.xml in the samples directory is "a
>little bit information" :-)
>
>HTH
>Drasko
>
>--- davide semprini <se...@hotmail.com>
>wrote:
> > Hi kevin,
> > it's the first time that I use cocoon,
> > for me is important just a little bit information,
> > as namespaces taglib connection to execute query
> > and the taglib <esql:get-string> ...
> > everybody use esql and where they find just
> > little bit information?
> >
> > please help me!!!!
> >
> > tanks a lot
> >
> >
> >
> >
> > >From: Kevin Sonney <ke...@webslingerz.com>
> > >Reply-To: cocoon-users@xml.apache.org
> > >To: cocoon-users@xml.apache.org
> > >Subject: Re: HELP ESQL
> > >Date: Wed, 22 Nov 2000 07:10:27 -0500 (EST)
> > >
> > >Hi David!
> > >
> > >On Wed, 22 Nov 2000, davide semprini wrote:
> > > > please any person can help me find
> > > > a full documentation of ESQL TAGLIB? and some
> > example?
> > >
> > >At the moment, Donald hasn't documented more than a
> > couple of calls int he
> > >taglib. I haven't checked to see if he's updated
> > the examples either.
> > >
> > >You can read the taglib itself, or check the mail
> > archives for the users
> > >and the dev lists. I've been trying to answer
> > questions to the best of my
> > >ability, but haven't written a definitive guide or
> > anything. *grin*
> > >
> > >Good luck, and if you need help, I'll be on & off
> > line over the american
> > >holiday.
> > >
> > >--
> > >+-------------------------------------------+
> > >| 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
> >
> >
> >
>---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > cocoon-users-unsubscribe@xml.apache.org
> > For additional commands, e-mail:
> > cocoon-users-help@xml.apache.org
> >
>
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Shopping - Thousands of Stores. Millions of Products.
>http://shopping.yahoo.com/
>
>---------------------------------------------------------------------
>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: error null pointer ESQL

Posted by Kevin Sonney <ke...@webslingerz.com>.
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