[ http://issues.apache.org/jira/browse/COCOON-825?page=all ]
David Crossley updated COCOON-825: ---------------------------------- Bugzilla Id: (was: 23542) Other Info: [Patch available] Description: It concerns 2.0.3+ as well. Two changes to properly handle clob's for Oracle: 1. File esql.xsl: in <xsl:template match="esql:row-results//esql:get-xml|esql:call-results//esql:get-xml"> instead of get-string use get-clob. Issue: or make it much cleaner - in get-string-encoded check if column is CLOB and call get-clob from there - I don't understand fully the issue with encoded. 2. Fix problem with temporary clob for Oracle When such a statement is used in esql: select something_what_returnes_temporary_clob from dual (it applies also for call statement) Oracle keeps return clob in TEMP segment and is not willing to free it. Solution: according to Oracle JDBC docs call freeTemporary! Patch: File EsqlHelper.java: In each place where the CLOB/BLOB is taken (getBlob, getClob), put before return: //ORACLE 'temporary lob' problem patch start if (dbClob.getClass().getName().equals("oracle.sql.CLOB")) dbClob.getClass().getMethod("freeTemporary", new Class[0]).invoke(dbClob, new Object[0]); //ORACLE 'temporary lob' problem patch end Hope it will be in the next release, if need some explanation feel free to use my email. Tomasz Bech was: It concerns 2.0.3+ as well. Two changes to properly handle clob's for Oracle: 1. File esql.xsl: in <xsl:template match="esql:row-results//esql:get-xml|esql:call-results//esql:get-xml"> instead of get-string use get-clob. Issue: or make it much cleaner - in get-string-encoded check if column is CLOB and call get-clob from there - I don't understand fully the issue with encoded. 2. Fix problem with temporary clob for Oracle When such a statement is used in esql: select something_what_returnes_temporary_clob from dual (it applies also for call statement) Oracle keeps return clob in TEMP segment and is not willing to free it. Solution: according to Oracle JDBC docs call freeTemporary! Patch: File EsqlHelper.java: In each place where the CLOB/BLOB is taken (getBlob, getClob), put before return: //ORACLE 'temporary lob' problem patch start if (dbClob.getClass().getName().equals("oracle.sql.CLOB")) dbClob.getClass().getMethod("freeTemporary", new Class[0]).invoke(dbClob, new Object[0]); //ORACLE 'temporary lob' problem patch end Hope it will be in the next release, if need some explanation feel free to use my email. Tomasz Bech > [PATCH] Fix Bug: Better handling of CLOB in esql (get-xml) and handling of > Oracle 'temporary lobs' > -------------------------------------------------------------------------------------------------- > > Key: COCOON-825 > URL: http://issues.apache.org/jira/browse/COCOON-825 > Project: Cocoon > Type: Bug > Components: - Components: Avalon > Versions: 2.1.8 > Environment: Operating System: All > Platform: All > Reporter: Tomasz Bech > Assignee: Cocoon Developers Team > Attachments: esql.xsl.diff > > It concerns 2.0.3+ as well. > Two changes to properly handle clob's for Oracle: > 1. > File esql.xsl: > in <xsl:template > match="esql:row-results//esql:get-xml|esql:call-results//esql:get-xml"> > instead of get-string use get-clob. > Issue: or make it much cleaner - in get-string-encoded check if column is CLOB > and call get-clob from there - I don't understand fully the issue with > encoded. > 2. Fix problem with temporary clob for Oracle > When such a statement is used in esql: > select something_what_returnes_temporary_clob from dual > (it applies also for call statement) > Oracle keeps return clob in TEMP segment and is not willing to free it. > Solution: according to Oracle JDBC docs call freeTemporary! > Patch: > File EsqlHelper.java: > In each place where the CLOB/BLOB is taken (getBlob, getClob), put before > return: > //ORACLE 'temporary lob' problem patch start > if (dbClob.getClass().getName().equals("oracle.sql.CLOB")) > dbClob.getClass().getMethod("freeTemporary", new Class[0]).invoke(dbClob, > new Object[0]); > //ORACLE 'temporary lob' problem patch end > Hope it will be in the next release, > if need some explanation feel free to use my email. > Tomasz Bech -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira