Yeah, buffer is full !

I open one connection for every rows, and another connection in each one :
<?xml version="1.0"?>


<xsp:page language="java"
          xmlns:xsp="http://apache.org/xsp";
          xmlns:xsp-request="http://apache.org/xsp/request/2.0";
          xmlns:esql="http://apache.org/cocoon/SQL/v2";>

<Root>
<xsp:comment>Extraction catalogue (c)2003 MediaXtend</xsp:comment>
<esql:connection><esql:dburl>jdbc:mysql://localhost/my_db</ esql:dburl><esql:username>log</esql:username><esql:password>pass</ esql:password>
<esql:execute-query>
<esql:query>SELECT a.cle,a.refcomplete,a.titreindex,a.soustitre,a.resume,a.nsupports,s.supp ort,a.cab,lcase(a.ref) AS image,l.label,c.publicTTC,a.motscles FROM article AS a LEFT JOIN label AS l ON l.cle=a.label LEFT JOIN codeprix AS c ON c.cle=a.codeprix LEFT JOIN support AS s ON s.cle=a.support WHERE a.catalogue=7 AND a.dispo=1 AND a.supprime=0 AND a.parution &lt; '2003-05-31' AND genre=2 AND catalogue=7 ORDER BY a.titreindex, a.motscles, a.soustitre</esql:query>
<esql:results>
<esql:row-results>
<disque>
<ref><esql:get-string column="refcomplete"/></ref>
<titre><esql:get-string column="titreindex"/></titre>
<soustitre><esql:get-string column="soustitre"/></soustitre>
<resume><esql:get-string column="resume"/></resume>
<label><esql:get-string column="label"/></label>
<prix><esql:get-string column="publicTTC"/></prix>
<support><esql:get-string column="nsupports"/> <esql:get-string column="support"/></support>
<xsp:logic>
String lbl = <esql:get-string column="label"/>;
lbl = lbl.toLowerCase();
lbl = lbl.replace( ' ' ,'_' );
lbl = lbl.replace( '\'' ,'_' );
</xsp:logic>
<xsp:element name="codebarre"><xsp:attribute name="href">file:///Scrat/abeille/images/codes-barres/<xsp:expr>lbl</ xsp:expr>/<esql:get-string column="cab"/>.eps</xsp\
:attribute></xsp:element>
<xsp:element name="image"><xsp:attribute name="href">file:///Scrat/abeille/images/references/<esql:get-string column="image"/>.tiff</xsp:attribute></xsp:element>
<recompenses><esql:connection><esql:dburl>jdbc:mysql://localhost/ my_db</esql:dburl><esql:username>log</ esql:username><esql:password>pass</esql:password><esql:execute- query><esql:query>SELECT ra.article,r.code FROM recompensearticle AS ra LEFT JOIN recompense AS r ON r.cle = ra.recompense WHERE ra.article = <esql:get-string column="cle"/> LIMIT 0,8</esql:query><esql:results><esql:row-results>
<xsp:element name="recompense"><xsp:attribute name="href">file:///Scrat/abeille/images/recompenses/couleurs/ <esql:get-string column="code"/>.eps</xsp:attribute></xsp:element></esql:row-results></ esql:results></esql:execute-query></esql:connection>
</recompenses>
</disque>
</esql:row-results>
</esql:results>
</esql:execute-query>
</esql:connection>
</Root>


</xsp:page>

Le mardi, 3 juin 2003, à 16:53 Europe/Paris, Lionel Crine a écrit :

It seems that the buffer is full.

Do you open a connection for every rows ?


At 15:28 03/06/2003 +0200, you wrote:
Hi,

I'm trying to extract rows from my MySQL database and convert it to an XML file, using Tomcat/Cocoon.
I'm running :
FreeBSD 5.0R
Sun JRE 1.3.1 (patchset 8)
Tomcat 4.1.18
Cocoon 2.0.4
MySQL 3.23.54
MySQL J/Connector 3.0.6


When I start loading my page (a simple XSP/ESQL), I get the normal XML datas but after a moment download stops and a HTML page is added at end of file. All of my other pages work but this one that extract a lot of rows (more than 4,000) doesn't work.
In the html part, I got an error page with this message :
[...]
org.apache.cocoon.ProcessingException: Exception in ServerPagesGenerator.generate(): java.lang.RuntimeException: Error opening connection to dburl: jdbc:mysql://localhost/my_db: Unable to connect to any hosts due to exception: java.net.SocketException: No buffer space available
[...]


Any ideas ?

Thanks

Nicolas SANDRI


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to