You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Phil Friedman <pf...@terralink.com> on 2002/05/13 18:26:23 UTC

SQL Extention, streaming, no rows, gives: Error Fetching next row [null]

I'm upgrading from XALAN 2.0.1 to 2.3.1, if I don't disable streaming w/

<xsl:value-of select="sql:disableStreamingMode($DbCon)"/>

in a query that returns no rows I get "SQL Error Fetching next row [null]",
such as:

file:///C:/362Taxi/362ClnChr2_3_1s.bat.xsl; Line 40; Column 44; select * from aldr where 1=0
file:///C:/362Taxi/362ClnChr2_3_1s.bat.xsl; Line 42; Column 20; Error in Query
<?xml version="1.0" encoding="UTF-8"?>
<ext-error>
<message>SQL Error Fetching next row [null]</message>

This query has predictably not rows (1=0), but other queries may or may
not return rows.

Regards,  Philip Friedman -- Terralink Software Systems -- 207-772-6500
x101

Re: SQL Extention, streaming, no rows, gives: Error Fetching next row [null]

Posted by Phil Friedman <pf...@terralink.com>.
John,

Thanks for picking this up, I've stayed with 2.0.1 for this next round
of development, but would like to get more current ASAP. I run from the
command line like so:

java -Xmx512m -cp ;"C:\Program Files\apache\xalan-j_2_0_1\bin\xalan.jar";"C:\Pr
ogram Files\apache\xalan-j_2_0_1\bin\xerces.jar";"C:\Program Files\NetDirect\JD
ataConnect-2.20.1\classes" org.apache.xalan.xslt.Process  -DIAG -INDENT
2 -TT -xsl 362HdlrOut.bat.xsl -out 362HdlrOut.bat.xml 1>362HdlrOut.bat.log
2>&1

So, I don't currently have an application. Does this count as more than
one transformation? For the above example the db driver and url are hard
coded in the style sheet, but in other cases are passed on the
commandline with -PARAM like:

java  -Xmx512m -cp ;"d:\program files\apache\xalan-j_2_0_1\bin\xalan.jar";"d:\p
rogram files\apache\xalan-j_2_0_1\bin\xerces.jar";"d:\progra~1\Sybase\SA-6.0.4.
3716\jConnect-5_2\classes\jconn2.jar" org.apache.xalan.xslt.Process 
-DIAG -INDENT 2 -PARAM DbUsr 'apo' -PARAM DbPwd 'password' -PARAM DbUrl
jdbc:sybase:Tds:localhost:2638?servicename=TCWD -xsl "D:\362taxi\ssaInHdlrAll.ba
t".xsl -in 362HdlrMap.bat.xml -out "D:\362taxi\ssaInHdlrAll.bat".xml
1>"D:\362taxi\ssaInHdlrAll.bat".log 2>&1

So, do I understand you are suggesting I rewrite the
ExternalConnection.java to handle this commandline?

Regards,  Philip Friedman -- Terralink Software Systems -- 207-772-6500
x101

On Tue, 21 May 2002 18:29:04 -0700, John Gentilin <ge...@eyecatching.com> may have written:

|I will look into the error, on no rows returned. I just ran into this problem
|myself this week so it is at the top of my list.
|
|As for the connections, it is possible that the connection is dropped for each
|transformations. If you are using the default connection pool (by specifying
|connection information in the XSL file) I believe that we changed the "Min"
|connections from 5 to 1, so you will see the build connection / drop connection
|behavior. In a repetitive / production environment the SQL extension is designed
|to have externally controlled connection pools. Now you don't have to write / acquire
|connection pool code, the code in the Xalan lib is finn. You just need to establish the
|pool outside the Xalan code, i.e. in you application. I would look at the ext-connection
|sample code to see how it is accomplished. Once you do that, you have much more
|control over connection usage.
|
|Regards
|John G
|
|Phil Friedman wrote:
|
|> I'm upgrading from XALAN 2.0.1 to 2.3.1, if I don't disable streaming w/
|>
|> <xsl:value-of select="sql:disableStreamingMode($DbCon)"/>
|>
|> in a query that returns no rows I get "SQL Error Fetching next row [null]",
|> such as:
|>
|> file:///C:/362Taxi/362ClnChr2_3_1s.bat.xsl; Line 40; Column 44; select * from aldr where 1=0
|> file:///C:/362Taxi/362ClnChr2_3_1s.bat.xsl; Line 42; Column 20; Error in Query
|> <?xml version="1.0" encoding="UTF-8"?>
|> <ext-error>
|> <message>SQL Error Fetching next row [null]</message>
|>
|> This query has predictably not rows (1=0), but other queries may or may
|> not return rows.
|>
|> Regards,  Philip Friedman -- Terralink Software Systems -- 207-772-6500
|> x101


Re: SQL Extention, streaming, no rows, gives: Error Fetching next row [null]

Posted by John Gentilin <ge...@eyecatching.com>.
I will look into the error, on no rows returned. I just ran into this problem
myself this week so it is at the top of my list.

As for the connections, it is possible that the connection is dropped for each
transformations. If you are using the default connection pool (by specifying
connection information in the XSL file) I believe that we changed the "Min"
connections from 5 to 1, so you will see the build connection / drop connection
behavior. In a repetitive / production environment the SQL extension is designed
to have externally controlled connection pools. Now you don't have to write / acquire
connection pool code, the code in the Xalan lib is finn. You just need to establish the
pool outside the Xalan code, i.e. in you application. I would look at the ext-connection
sample code to see how it is accomplished. Once you do that, you have much more
control over connection usage.

Regards
John G

Phil Friedman wrote:

> I'm upgrading from XALAN 2.0.1 to 2.3.1, if I don't disable streaming w/
>
> <xsl:value-of select="sql:disableStreamingMode($DbCon)"/>
>
> in a query that returns no rows I get "SQL Error Fetching next row [null]",
> such as:
>
> file:///C:/362Taxi/362ClnChr2_3_1s.bat.xsl; Line 40; Column 44; select * from aldr where 1=0
> file:///C:/362Taxi/362ClnChr2_3_1s.bat.xsl; Line 42; Column 20; Error in Query
> <?xml version="1.0" encoding="UTF-8"?>
> <ext-error>
> <message>SQL Error Fetching next row [null]</message>
>
> This query has predictably not rows (1=0), but other queries may or may
> not return rows.
>
> Regards,  Philip Friedman -- Terralink Software Systems -- 207-772-6500
> x101