cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luca Morandini" <luca.morandi...@tin.it>
Subject RE: Strange behavior in SQLTransforme Cocoon 2.0.3
Date Tue, 01 Oct 2002 14:46:56 GMT
Luca,

since I know you're such a good guy, I fixed your problem...

...seriously now:

The Cocoon 2.0.3 version of SQLTransformer lacks the characters method, which in Cocoon 2.0.2
took care of the proper concatenation
of queries (something super.characters(), apparently cannot do).

Here's my patch (just a slightly modified version of the Cocoon 2.0.2 method):

    public void characters( char ary[], int start,
                            int length ) throws SAXException {
        if ( current_state != SQLTransformer.STATE_INSIDE_VALUE_ELEMENT &&
             current_state != SQLTransformer.STATE_INSIDE_QUERY_ELEMENT &&
             current_state != SQLTransformer.STATE_INSIDE_ESCAPE_STRING ) {
            super.characters( ary, start, length );
        }
        getLogger().debug( "RECEIVED CHARACTERS: " +
                           new String( ary, start, length ) );
		this.getCurrentQuery().addQueryPart( new String( ary, start, length ) );
    }

Could someone test it properly and put it in the next Cocoon release ?

Best regards,

---------------------------------------------
               Luca Morandini
               GIS Consultant
              lmorandini@ieee.org
http://utenti.tripod.it/lmorandini/index.html
---------------------------------------------


> -----Original Message-----
> From: Luca Morandini [mailto:luca.morandini1@tin.it]
> Sent: Monday, September 30, 2002 11:47 PM
> To: Cocoon-users
> Subject: Strange behavior in SQLTransforme Cocoon 2.0.3
>
>
> Folks,
>
> when I call an Oracle Stored Procedure with SQLTransformer the DBMS refuses to execute
it (lamenting a parsing error) if
> I don't put
> the call on one line.
>
> Needless to say, it worked fine up to 2.0.2.
>
> My configuration:
> - Windows 2000 Pro SP3
> - JDK 1.3.1
> - Tomcat 4.0.1
> - Cocoon 2.0.3
> - Oracle 8.1.7
>
> To sum it up:
>
> begin UMan.Logon('ammini', 'ammini', ?, ?, ?, ?, ?); end;
>
> works
>
> begin UMan.Logon('ammini',
> 'ammini', ?, ?, ?, ?, ?); end;
>
> doesn't... it gives:
> ERROR   (2002-09-30) 23:37.34:339   [sql.transformer.sql] (/cerbero-dev/login-execute.html)
> Ajp13Processor[8009][4]/SQLTransformer$Query: Caught a SQLException
> java.sql.SQLException: ORA-06550: riga 1, colonna 27:
> PLS-00103: ...
>
> Best regards,
>
> ---------------------------------------------
>                Luca Morandini
>                GIS Consultant
>               lmorandini@ieee.org
> http://utenti.tripod.it/lmorandini/index.html
> ---------------------------------------------
>
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> 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-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message