You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Erwin Burgstaller <bu...@knapp.co.at> on 2001/01/04 15:56:54 UTC

esql Problem: no results

Hi,

I'm trying to use esql. I don't get any errors but simply no output. The
<esql:query> seems to be executed (if I put a wrong field into the SELECT, I
get an error-message from the Mysql-Server).

My file looks like this:

<?xml version="1.0"?>

<?cocoon-process type="xsp"?>
<!-- <?cocoon-process type="xslt"?> -->
<?xml-stylesheet href="anlagen-stkl.xsl" type="text/xsl"?>


<xsp:page
  xmlns:xsp="http://www.apache.org/1999/XSP/Core"
  xmlns:esql="http://apache.org/cocoon/SQL/v2"
>
  <page title="anl-stkl">

	<table>

		<tablehead>
			<colhead>Position</colhead>
			<colhead>Material Nummer</colhead>
	                <colhead>Variante</colhead>
		        <colhead>Beschreibung</colhead>
	                <colhead>Menge</colhead>
	                <colhead>ME</colhead>
	                <colhead>Nennb.</colhead>
		</tablehead>

        <esql:connection>
        <esql:driver>org.gjt.mm.mysql.Driver</esql:driver>
        <esql:dburl>jdbc:mysql://localhost/ecommerce</esql:dburl>
        <esql:username>xxxxx</esql:username>
        <esql:password>xxxxx</esql:password>
        <esql:execute-query>
          <esql:query>

            SELECT auf_pos, mat, var, menge, meh, nb FROM
            anlstkl WHERE mnr=490

          </esql:query>

          <esql:results>
             <rowset>
               <esql:row-results>
                 <row>
                   <auf_pos><esql:get-string column="auf_pos"/></auf_pos>
                   <mat>
                       <xsp:attribute name="type">
                           <esql:get-string column="typ"/>
                       </xsp:attribute>
                       <esql:get-string column="mat"/>
                   </mat>
                   <var><esql:get-int column="var"/></var>
                   <menge><esql:get-int column="menge"/></menge>
                   <meh><esql:get-string column="meh"/></meh>
                   <nb><esql:get-ing column="nb"/></nb>
                 </row>
               </esql:row-results>
             </rowset>
           </esql:results>
        </esql:execute-query>
        </esql:connection>

	</table>

  </page>

</xsp:page>

----------------------------------------

The select statement produces 2 lines, but all I get is:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<?xml-stylesheet href="anlagen-stkl.xsl" type="text/xsl"?>
<page title="anl-stkl">

        


        <table>

        
                <tablehead>
                        <colhead>Position</colhead>
                        <colhead>Material Nummer</colhead>
                        <colhead>Variante</colhead>
                        <colhead>Beschreibung</colhead>
                        <colhead>Menge</colhead>
                        <colhead>ME</colhead>
                        <colhead>Nennb.</colhead>
                </tablehead>
        

        

        </table>

        <langset host="
                        edvls17.knapp.at
                " url="
                        /samples/secure/anlagen-stkl-esql.xml
                ">
                
                
        </langset>

  </page>

<!-- This page was served from cache in 1845 milliseconds by Cocoon 1.8.1-dev -->





Re: esql Problem: no results

Posted by Erwin Burgstaller <be...@knapp.co.at>.
Sorry for posting this twice, thought this one will not go through because
of the 'wrong' new mail-adress. In fact it took very long.

Erwin


Re: esql Problem: no results

Posted by Matthew Cordes <mc...@maine.edu>.
Hey Donald,


Attachments:
*	esql-test.xml - simple xsp page
*	_esql_test.java - generated java code
*	results - results from 2 trials, 1 that was supposed to 
	cause esql:results to act (this worked) and 1 to test no-results
	this did nothing.

I think there is an error in esql taglib and no-results is never 
being	called because in the template that matches esql:execute-query
(esql:no-results parent) templates matching esql:results, and 
esql:error-results are explicitly applied but there is not one that would
cause the template that matches esql:no-results to be used.  I believe this
block is simply missing as <xsl:apply-templates/> or 
<xsl:apply-templates select="esql:no-results"/>

In any case I could be wrong, please enlighten me.

-matt


On Thu, Jan 04, 2001 at 08:09:29PM -0500, Donald Ball wrote:
> On Thu, 4 Jan 2001, Matthew Cordes wrote:
> 
> > I too have experienced this with 1.39 from cvs ( if there is a newer version
> > please ignore this message ).  The <esql:no-results> block when a sibling of
> > <esql:results> and child of <esql:execute-query> never seems to be called.
> 
> the no-results element must appear after the results element if it exists.
> it works fine for me. if you are having trouble, send in a message with
> your xsp page and the generated java source code attached.
> 
> - donald
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
> 

Re: esql Problem: no results

Posted by Donald Ball <ba...@webslingerZ.com>.
On Thu, 4 Jan 2001, Matthew Cordes wrote:

> I too have experienced this with 1.39 from cvs ( if there is a newer version
> please ignore this message ).  The <esql:no-results> block when a sibling of
> <esql:results> and child of <esql:execute-query> never seems to be called.

the no-results element must appear after the results element if it exists.
it works fine for me. if you are having trouble, send in a message with
your xsp page and the generated java source code attached.

- donald


Re: esql Problem: no results

Posted by Matthew Cordes <mc...@maine.edu>.
I too have experienced this with 1.39 from cvs ( if there is a newer version
please ignore this message ).  The <esql:no-results> block when a sibling of
<esql:results> and child of <esql:execute-query> never seems to be called.

-matt

----- Original Message -----
From: "Donald Ball" <ba...@webslingerZ.com>
To: <co...@xml.apache.org>
Sent: Thursday, January 04, 2001 6:27 PM
Subject: Re: esql Problem: no results


> On Thu, 4 Jan 2001, Erwin Burgstaller wrote:
>
> > I'm trying to use esql. I don't get any errors but simply no output. The
> > <esql:query> seems to be executed (if I put a wrong field into the
SELECT, I
> > get an error-message from the Mysql-Server).
>
> this all looks fine to me... are you sure you're using the latest esql
> from cvs? if so, can you send the generated java source code from your
> repository?
>
> - donald
>
> > My file looks like this:
> >
> > <?xml version="1.0"?>
> >
> > <?cocoon-process type="xsp"?>
> > <!-- <?cocoon-process type="xslt"?> -->
> > <?xml-stylesheet href="anlagen-stkl.xsl" type="text/xsl"?>
> >
> >
> > <xsp:page
> >   xmlns:xsp="http://www.apache.org/1999/XSP/Core"
> >   xmlns:esql="http://apache.org/cocoon/SQL/v2"
> > >
> >   <page title="anl-stkl">
> >
> > <table>
> >
> > <tablehead>
> > <colhead>Position</colhead>
> > <colhead>Material Nummer</colhead>
> >                 <colhead>Variante</colhead>
> >         <colhead>Beschreibung</colhead>
> >                 <colhead>Menge</colhead>
> >                 <colhead>ME</colhead>
> >                 <colhead>Nennb.</colhead>
> > </tablehead>
> >
> >         <esql:connection>
> >         <esql:driver>org.gjt.mm.mysql.Driver</esql:driver>
> >         <esql:dburl>jdbc:mysql://localhost/ecommerce</esql:dburl>
> >         <esql:username>xxxxx</esql:username>
> >         <esql:password>xxxxx</esql:password>
> >         <esql:execute-query>
> >           <esql:query>
> >
> >             SELECT auf_pos, mat, var, menge, meh, nb FROM
> >             anlstkl WHERE mnr=490
> >
> >           </esql:query>
> >
> >           <esql:results>
> >              <rowset>
> >                <esql:row-results>
> >                  <row>
> >                    <auf_pos><esql:get-string
column="auf_pos"/></auf_pos>
> >                    <mat>
> >                        <xsp:attribute name="type">
> >                            <esql:get-string column="typ"/>
> >                        </xsp:attribute>
> >                        <esql:get-string column="mat"/>
> >                    </mat>
> >                    <var><esql:get-int column="var"/></var>
> >                    <menge><esql:get-int column="menge"/></menge>
> >                    <meh><esql:get-string column="meh"/></meh>
> >                    <nb><esql:get-ing column="nb"/></nb>
> >                  </row>
> >                </esql:row-results>
> >              </rowset>
> >            </esql:results>
> >         </esql:execute-query>
> >         </esql:connection>
> >
> > </table>
> >
> >   </page>
> >
> > </xsp:page>
> >
> > ----------------------------------------
> >
> > The select statement produces 2 lines, but all I get is:
> >
> > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
"http://www.w3.org/TR/REC-html40/strict.dtd">
> > <?xml-stylesheet href="anlagen-stkl.xsl" type="text/xsl"?>
> > <page title="anl-stkl">
> >
> >
> >
> >
> >         <table>
> >
> >
> >                 <tablehead>
> >                         <colhead>Position</colhead>
> >                         <colhead>Material Nummer</colhead>
> >                         <colhead>Variante</colhead>
> >                         <colhead>Beschreibung</colhead>
> >                         <colhead>Menge</colhead>
> >                         <colhead>ME</colhead>
> >                         <colhead>Nennb.</colhead>
> >                 </tablehead>
> >
> >
> >
> >
> >         </table>
> >
> >         <langset host="
> >                         edvls17.knapp.at
> >                 " url="
> >                         /samples/secure/anlagen-stkl-esql.xml
> >                 ">
> >
> >
> >         </langset>
> >
> >   </page>
> >
> > <!-- This page was served from cache in 1845 milliseconds by Cocoon
1.8.1-dev -->
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> > For additional commands, e-mail: cocoon-users-help@xml.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>


Re: esql Problem: no results

Posted by Erwin Burgstaller <be...@knapp.co.at>.
On Thu, 4 Jan 2001, Donald Ball wrote:
>this all looks fine to me... are you sure you're using the latest esql
>from cvs? if so, can you send the generated java source code from your
>repository?
>
>- donald

I got it working, I had to take the <rowset> tag out of between
<esql:results> and <esql:row-results> although I don't understand why.

>>           <esql:results>
>>              <rowset>
                ^^^^ didn't work!
>>                <esql:row-results>
>>                  <row>

No I have it surround <esql:connection>.

Erwin

-- 
KNAPP Logistics Automation                  (ber@knapp.co.at / +43 316 495-618)


Re: esql Problem: no results

Posted by Donald Ball <ba...@webslingerZ.com>.
On Thu, 4 Jan 2001, Erwin Burgstaller wrote:

> I'm trying to use esql. I don't get any errors but simply no output. The
> <esql:query> seems to be executed (if I put a wrong field into the SELECT, I
> get an error-message from the Mysql-Server).

this all looks fine to me... are you sure you're using the latest esql
from cvs? if so, can you send the generated java source code from your
repository?

- donald

> My file looks like this:
>
> <?xml version="1.0"?>
>
> <?cocoon-process type="xsp"?>
> <!-- <?cocoon-process type="xslt"?> -->
> <?xml-stylesheet href="anlagen-stkl.xsl" type="text/xsl"?>
>
>
> <xsp:page
>   xmlns:xsp="http://www.apache.org/1999/XSP/Core"
>   xmlns:esql="http://apache.org/cocoon/SQL/v2"
> >
>   <page title="anl-stkl">
>
> 	<table>
>
> 		<tablehead>
> 			<colhead>Position</colhead>
> 			<colhead>Material Nummer</colhead>
> 	                <colhead>Variante</colhead>
> 		        <colhead>Beschreibung</colhead>
> 	                <colhead>Menge</colhead>
> 	                <colhead>ME</colhead>
> 	                <colhead>Nennb.</colhead>
> 		</tablehead>
>
>         <esql:connection>
>         <esql:driver>org.gjt.mm.mysql.Driver</esql:driver>
>         <esql:dburl>jdbc:mysql://localhost/ecommerce</esql:dburl>
>         <esql:username>xxxxx</esql:username>
>         <esql:password>xxxxx</esql:password>
>         <esql:execute-query>
>           <esql:query>
>
>             SELECT auf_pos, mat, var, menge, meh, nb FROM
>             anlstkl WHERE mnr=490
>
>           </esql:query>
>
>           <esql:results>
>              <rowset>
>                <esql:row-results>
>                  <row>
>                    <auf_pos><esql:get-string column="auf_pos"/></auf_pos>
>                    <mat>
>                        <xsp:attribute name="type">
>                            <esql:get-string column="typ"/>
>                        </xsp:attribute>
>                        <esql:get-string column="mat"/>
>                    </mat>
>                    <var><esql:get-int column="var"/></var>
>                    <menge><esql:get-int column="menge"/></menge>
>                    <meh><esql:get-string column="meh"/></meh>
>                    <nb><esql:get-ing column="nb"/></nb>
>                  </row>
>                </esql:row-results>
>              </rowset>
>            </esql:results>
>         </esql:execute-query>
>         </esql:connection>
>
> 	</table>
>
>   </page>
>
> </xsp:page>
>
> ----------------------------------------
>
> The select statement produces 2 lines, but all I get is:
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
> <?xml-stylesheet href="anlagen-stkl.xsl" type="text/xsl"?>
> <page title="anl-stkl">
>
>
>
>
>         <table>
>
>
>                 <tablehead>
>                         <colhead>Position</colhead>
>                         <colhead>Material Nummer</colhead>
>                         <colhead>Variante</colhead>
>                         <colhead>Beschreibung</colhead>
>                         <colhead>Menge</colhead>
>                         <colhead>ME</colhead>
>                         <colhead>Nennb.</colhead>
>                 </tablehead>
>
>
>
>
>         </table>
>
>         <langset host="
>                         edvls17.knapp.at
>                 " url="
>                         /samples/secure/anlagen-stkl-esql.xml
>                 ">
>
>
>         </langset>
>
>   </page>
>
> <!-- This page was served from cache in 1845 milliseconds by Cocoon 1.8.1-dev -->
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
>