cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jarmo.Bloms...@ccc.fi
Subject PLSQL function returning CLOB
Date Fri, 05 Jul 2002 12:07:38 GMT
Hi,

I use oracle 8.1.7.3 in W2k, JDBC 2 oracle classes using oci8 driver, Tomcat
4.0.4, and Cocoon 2.1-dev.

It works fine with varchar2, and string

How should I handle a CLOB in included example.

There is also commented the esql:get-ascii tag, that gives annother error
message, but lets handle one problem at a time :-)

TIA
Jarmo

---

package test is
function tst3 return clob is
  cl clob;
  buf varchar2(100);
begin
  dbms_lob.createtemporary(cl,true);
  buf := 'CLOB FROM PLSQL RETURN';
  dbms_lob.write(cl,length(buf),1,buf);
  return cl;
end;
end;

I tested with this xsp:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsp:page
   language="java"
   xmlns:xsp="http://apache.org/xsp"
   xmlns:esql="http://apache.org/cocoon/SQL/v2"
>
 <page>
  <title>A Simple XSP Page</title>
   <content>
   <esql:connection>
    <esql:pool>sapjeda</esql:pool>
     <esql:execute-query>
      <esql:call>
       begin <esql:parameter direction="out" type ="AsciiStream">
<xsp:expr>1</xsp:expr></esql:parameter>
         := test.tst3; end;
      </esql:call>

      <esql:call-results>
        <!--<esql:get-ascii column="1" from-call="yes" />-->
      </esql:call-results>

    </esql:execute-query>
   </esql:connection>

  </content>
 </page>
</xsp:page>

And got following error stack:

Sorry about the finnish

Cocoon 2 - Internal server error

--------------------------------------------------------------------------------

type fatal

message Exception in ServerPagesGenerator.generate()

description org.apache.cocoon.ProcessingException: Exception in
ServerPagesGenerator.generate(): java.lang.RuntimeException: Error executing
statement: begin ? := test.tst3; end; : java.sql.SQLException: ORA-06550: rivi
1, sarake 35: PLS-00382: lauseke on väärän tyyppinen ORA-06550: rivi 1, sarake
15: PL/SQL: Statement ignored

sender org.apache.cocoon.servlet.CocoonServlet

source Cocoon servlet

stack-trace

org.apache.cocoon.ProcessingException: Exception in
ServerPagesGenerator.generate(): java.lang.RuntimeException: Error executing
statement:         begin ?          := test.tst3; end;       :
java.sql.SQLException: ORA-06550: rivi 1, sarake 35:
PLS-00382: lauseke on väärän tyyppinen
ORA-06550: rivi 1, sarake 15:
PL/SQL: Statement ignored

     at
org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGenerator.java:275)

     at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:520)

     at
org.apache.cocoon.components.pipeline.impl.CachingProcessingPipeline.processXMLPipeline(CachingProcessingPipeline.java:194)

     at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:495)

     at
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:142)

     at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:83)

     at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:160)

     at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)

     at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:157)

     at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)
     at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:152)

     at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:327)

     at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:309)

     at
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:131)

     at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:83)

     at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:160)

     at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)

     at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:157)

     at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)

     at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:152)
     at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:327)

     at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:309)

     at org.apache.cocoon.Cocoon.process(Cocoon.java:585)
     at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:999)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)

     at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)

     at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)

     at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
     at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)

     at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
     at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
     at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
     at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
     at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)

     at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
     at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
     at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
     at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
     at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
     at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)

     at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
     at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)

     at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
     at java.lang.Thread.run(Thread.java:479)
java.lang.RuntimeException: Error executing statement:         begin ?
:= test.tst3; end;       : java.sql.SQLException: ORA-06550: rivi 1, sarake 35:
PLS-00382: lauseke on väärän tyyppinen
ORA-06550: rivi 1, sarake 15:
PL/SQL: Statement ignored

     at org.apache.cocoon.www.jbl.docs.tst3_xsp.generate(C:\Program Files\Apache
 Tomcat
4.0\work\Standalone\localhost\cocoon\cocoon-files\org/apache/cocoon/www/jbl/docs\tst3_xsp.java:438)

     at
org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGenerator.java:263)

     at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:520)

     at
org.apache.cocoon.components.pipeline.impl.CachingProcessingPipeline.processXMLPipeline(CachingProcessingPipeline.java:194)

     at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:495)

     at
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:142)

     at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:83)

     at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:160)

     at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)
     at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:157)

     at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)

     at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:152)

     at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:327)

     at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:309)

     at
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:131)

     at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:83)

     at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:160)

     at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)

     at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:157)
     at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)

     at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:152)

     at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:327)

     at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:309)

     at org.apache.cocoon.Cocoon.process(Cocoon.java:585)
     at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:999)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)

     at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)

     at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)

     at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
     at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)

     at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
     at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
     at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
     at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
     at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)

     at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
     at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
     at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
     at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
     at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
     at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)

     at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
     at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)

     at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
     at java.lang.Thread.run(Thread.java:479)


request-uri

/cocoon/jbl/tst3.xml

path-info

jbl/tst3.xml



---------------------------------------------------------------------
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>


Mime
View raw message