You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Leszek Gawron <ou...@kompuart.pl> on 2003/01/09 10:36:05 UTC

ESQL problem - current cocoon HEAD

I'm using cocoon to communicate with MS SQL Server via MS JDBC driver (Java
1.3). After switching to current HEAD I get an error message that did not
exist in my previous version:

org.apache.cocoon.ProcessingException: Exception in
ServerPagesGenerator.generate(): java.lang.RuntimeException: Error executing
statement:      select id, ope_opeid from gemini_users where device_id =
'ouzo'    : java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
JDBC]0 is not a valid row parameter value for the ResultSet.Absolute method.

Is this a bug or a matter of configuration?
        ouzo

-- 
            __
         | /  \ |        Leszek Gawron            //  \\
        \_\\  //_/      ouzo@vip.net.pl          _\\()//_
         .'/()\'.     Phone: +48(600)341118     / //  \\ \
          \\  //  recursive: adj; see recursive  | \__/ |


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: [FIX FOUND PLEASE PATCH]Re: ESQL problem - current cocoon HEAD

Posted by Torsten Curdt <tc...@dff.st>.
Leszek Gawron wrote:
> I was right. That is how JdbcEsqlQuery.getResultRows() shoud look like:
> 
> public void getResultRows() throws SQLException {
> 	if ( getSkipRows() > 0 )
> 		getResultSet().absolute(getSkipRows());
> 	setPosition(getSkipRows());
> }
> 
> I am not familiar with patch submitting so someone please patch the source
> 	ouzo

I'll commit it after work...
--
Torsten



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


[FIX FOUND PLEASE PATCH]Re: ESQL problem - current cocoon HEAD

Posted by Leszek Gawron <ou...@kompuart.pl>.
I was right. That is how JdbcEsqlQuery.getResultRows() shoud look like:

public void getResultRows() throws SQLException {
	if ( getSkipRows() > 0 )
		getResultSet().absolute(getSkipRows());
	setPosition(getSkipRows());
}

I am not familiar with patch submitting so someone please patch the source
	ouzo


-- 
            __
         | /  \ |        Leszek Gawron            //  \\
        \_\\  //_/      ouzo@vip.net.pl          _\\()//_
         .'/()\'.     Phone: +48(600)341118     / //  \\ \
          \\  //  recursive: adj; see recursive  | \__/ |


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: ESQL problem - current cocoon HEAD

Posted by Leszek Gawron <ou...@kompuart.pl>.
On Thu, Jan 09, 2003 at 11:03:38AM +0100, Torsten Curdt wrote:
> >No I don't.
> >
> >Shouldnt JdbcEsqlQuery.getResultRows() look like this (just a guess - I'm 
> >not
> >experienced with jdbc):
> >
> >public void getResultRows() throws SQLException {
> >    	if ( getSkipRows() > 0 )
> >        	getResultSet().absolute(getSkipRows());
> >        setPosition(getSkipRows());
> >    }
> >
> >current version does not check getSkipRows() for zero equality
> 
> Do you use the esql:max-rows?
no - it's the most simple query you can imagine: 


<esql:connection>
    <esql:pool>cdn</esql:pool>
    <esql:execute-query>
        <esql:query>
            select id, ope_opeid from gemini_users where device_id = '<xsp:expr>username</xsp:expr>'
        </esql:query>
        <esql:results>
            <esql:row-results>
                <xsp-session:set-attribute name="userid"><esql:get-string column="id"/></xsp-session:set-attribute>
                <xsp-session:set-attribute name="opeid"><esql:get-string column="ope_opeid"/></xsp-session:set-attribute>
                <action:set-success/>
            </esql:row-results>
        </esql:results>
        <esql:no-results>
            <xsp-session:invalidate/>
            <action:set-failure/>
        </esql:no-results>
    </esql:execute-query>
</esql:connection>

	ouzo
-- 
            __
         | /  \ |        Leszek Gawron            //  \\
        \_\\  //_/      ouzo@vip.net.pl          _\\()//_
         .'/()\'.     Phone: +48(600)341118     / //  \\ \
          \\  //  recursive: adj; see recursive  | \__/ |


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: ESQL problem - current cocoon HEAD

Posted by Torsten Curdt <tc...@dff.st>.
> No I don't.
> 
> Shouldnt JdbcEsqlQuery.getResultRows() look like this (just a guess - I'm not
> experienced with jdbc):
> 
> public void getResultRows() throws SQLException {
>     	if ( getSkipRows() > 0 )
>         	getResultSet().absolute(getSkipRows());
>         setPosition(getSkipRows());
>     }
> 
> current version does not check getSkipRows() for zero equality

Do you use the esql:max-rows?

> I'm checking that now but rebuild takes a lot of time
> 	ouzo

Thanks - please report back
--
Torsten


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: ESQL problem - current cocoon HEAD

Posted by Leszek Gawron <ou...@kompuart.pl>.
On Thu, Jan 09, 2003 at 10:39:42AM +0100, Torsten Curdt wrote:
> Leszek Gawron wrote:
> >I'm using cocoon to communicate with MS SQL Server via MS JDBC driver (Java
> >1.3). After switching to current HEAD I get an error message that did not
> >exist in my previous version:
> >
> >org.apache.cocoon.ProcessingException: Exception in
> >ServerPagesGenerator.generate(): java.lang.RuntimeException: Error 
> >executing
> >statement:      select id, ope_opeid from gemini_users where device_id =
> >'ouzo'    : java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
> >JDBC]0 is not a valid row parameter value for the ResultSet.Absolute 
> >method.
> >
> >Is this a bug or a matter of configuration?
> >        ouzo
> >
> 
> Do you use the limit feature?
No I don't.

Shouldnt JdbcEsqlQuery.getResultRows() look like this (just a guess - I'm not
experienced with jdbc):

public void getResultRows() throws SQLException {
    	if ( getSkipRows() > 0 )
        	getResultSet().absolute(getSkipRows());
        setPosition(getSkipRows());
    }

current version does not check getSkipRows() for zero equality

I'm checking that now but rebuild takes a lot of time
	ouzo
	
-- 
            __
         | /  \ |        Leszek Gawron            //  \\
        \_\\  //_/      ouzo@vip.net.pl          _\\()//_
         .'/()\'.     Phone: +48(600)341118     / //  \\ \
          \\  //  recursive: adj; see recursive  | \__/ |


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: ESQL problem - current cocoon HEAD

Posted by Torsten Curdt <tc...@dff.st>.
Leszek Gawron wrote:
> I'm using cocoon to communicate with MS SQL Server via MS JDBC driver (Java
> 1.3). After switching to current HEAD I get an error message that did not
> exist in my previous version:
> 
> org.apache.cocoon.ProcessingException: Exception in
> ServerPagesGenerator.generate(): java.lang.RuntimeException: Error executing
> statement:      select id, ope_opeid from gemini_users where device_id =
> 'ouzo'    : java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
> JDBC]0 is not a valid row parameter value for the ResultSet.Absolute method.
> 
> Is this a bug or a matter of configuration?
>         ouzo
> 

Do you use the limit feature?
--
Torsten


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org