problem for sql:param type="odt:xmlFragment" sql-type="clob" in night build

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

problem for sql:param type="odt:xmlFragment" sql-type="clob" in night build

James Gu
To use the manually input of date field, I updated to your latest night build, 3.7.0alpha.200808080109. But one of my sql processor failed after the upgrade. Please see the attached file.

   <p:processor name="oxf:sql">
        <p:input name="data" href="#instance" debug="instance"/>
        <p:input name="config">
            <sql:config>
                <result>
                    <sql:connection>
                        <sql:datasource>db</sql:datasource>
                        <sql:execute>
                            <sql:query>
                                SELECT resource_id
                                FROM XMLTable('/collection/resource-id' PASSING
                                XMLType(
                                <sql:param type="odt:xmlFragment" sql-type="clob" select="/submission/collection"/>
                                ) COLUMNS
                                resource_id VARCHAR2(100) PATH '/')
                            </sql:query>
                            <sql:result-set>
                                <sql:row-iterator>
                                    <row>
                                       <sql:get-columns format="xml"/>
                                    </row>
                                </sql:row-iterator>
                            </sql:result-set>
                        </sql:execute>
                    </sql:connection>
                </result>
            </sql:config>
        </p:input>
        <p:output name="sqlResult" id="sqlResult"/>
    </p:processor>
test.xpl
I use a sql param type="odt:xmlFragment" sql-type="clob" in my sql. The database is oracle. It throws out an oracle exception. It seems it doesn't use clob as parameter type. If I reduces the instance to several records, it works. But it doesn't work for large data. Before this upgrade, it works well under 20080724 build. Could you please check it for me?


2008-08-08 16:04:15,708 ERROR ProcessorService  - Exception at line 563 of oxf:/apps/myapp/test.xpl
java.sql.SQLException: ORA-01460: unimplemented or unreasonable conversion requested

        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)

Reply | Threaded
Open this post in threaded view
|

Re: problem for sql:param type="odt:xmlFragment" sql-type="clob" in night build

Alessandro Vernet
Administrator
On Fri, Aug 8, 2008 at 1:15 AM, JamesGu <[hidden email]> wrote:
> java.sql.SQLException: ORA-01460: unimplemented or unreasonable conversion
> requested
>
>        at
> oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
>        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
>        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)

Most likely this is due to some changed we have done recently in the
SQL processor. We have made some changes that impact how CLOB and XML
fragments are handled. Could you please include the full exception
stack trace so we can see where this code is called from? (I know
those stack traces are very long, but we need to at least see enough
of the Orbeon code to see when this is happening.)

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: problem for sql:param type="odt:xmlFragment" sql-type="clob" in night build

James Gu
orbeon.log

This is the log. Please check it. Thank you!
Reply | Threaded
Open this post in threaded view
|

Re: problem for sql:param type="odt:xmlFragment" sql-type="clob" in night build

James Gu
Hi, Alex.

I attached the log in the previous message. Did you get time to look at this problem?

James

JamesGu wrote
orbeon.log

This is the log. Please check it. Thank you!
Reply | Threaded
Open this post in threaded view
|

Re: Re: problem for sql:param type="odt:xmlFragment" sql-type="clob" in night build

Alessandro Vernet
Administrator
James,

On Tue, Aug 12, 2008 at 7:07 PM, JamesGu <[hidden email]> wrote:
> I attached the log in the previous message. Did you get time to look at this
> problem?

Could you try this again with a recent nightly build? I changed this
code again, fixed an issue I had introduced (mea culpa!) and made it
so the code which needs to access the Oracle driver works with Tomcat
5 (it was only tested and working on Tomcat 4).

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: problem for sql:param type="odt:xmlFragment" sql-type="clob" in night build

James Gu
Alex,

It works well under weblogic 10. Thank you very much!

James
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: problem for sql:param type="odt:xmlFragment" sql-type="clob" in night build

Alessandro Vernet
Administrator
James,

Excellent, I am glad to read this.

Alex

On Tue, Aug 19, 2008 at 8:49 PM, JamesGu <[hidden email]> wrote:

>
> Alex,
>
> It works well under weblogic 10. Thank you very much!
>
> James
>
> --
> View this message in context: http://www.nabble.com/problem-for-sql%3Aparam-type%3D%22odt%3AxmlFragment%22-sql-type%3D%22clob%22--in-night-build-tp18887638p19062555.html
> Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com.
>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: problem for sql:param type="odt:xmlFragment" sql-type="clob" in night build

mangvlad
In reply to this post by James Gu
Alex,

I think, I found another problem in the same area:

When I try to execute a SELECT SQL with a CLOB parameter and try to pass a regular string (not xmlFragment) like this:

<sql:param type="xs:string" sql-type="clob" select="/submission/collection/resource-id"/>

I am getting this error (unexpected attribute "sql-type"):

Error unexpected attribute "sql-type"(schema: http://orbeon.org/oxf/xml/sql)
        at org.orbeon.oxf.processor.validation.MSVValidationProcessor$8.error(MSVValidationProcessor.java:197)
        at com.sun.msv.verifier.Verifier.onError(Verifier.java:371)
        at com.sun.msv.verifier.Verifier.onError(Verifier.java:363)
        at com.sun.msv.verifier.Verifier.feedAttribute(Verifier.java:294)
        at com.sun.msv.verifier.Verifier.startElement(Verifier.java:221)
        at org.orbeon.oxf.xml.TeeContentHandler.startElement(TeeContentHandler.java:80)
        at org.orbeon.saxon.event.ContentHandlerProxy.startContent(ContentHandlerProxy.java:349)
        at org.orbeon.saxon.event.NamespaceReducer.startContent(NamespaceReducer.java:168)
        at org.orbeon.saxon.event.ReceivingContentHandler.startElement(ReceivingContentHandler.java:268)
        at org.dom4j.io.SAXWriter.startElement(SAXWriter.java:810)
        at org.orbeon.oxf.xml.dom4j.LocationSAXWriter.startElement(LocationSAXWriter.java:80)
        at org.dom4j.io.SAXWriter.write(SAXWriter.java:732)
        at org.dom4j.io.SAXWriter.writeContent(SAXWriter.java:619)
        at org.dom4j.io.SAXWriter.write(SAXWriter.java:733)
        at org.dom4j.io.SAXWriter.writeContent(SAXWriter.java:619)
        at org.dom4j.io.SAXWriter.write(SAXWriter.java:733)
        at org.dom4j.io.SAXWriter.writeContent(SAXWriter.java:619)
        at org.dom4j.io.SAXWriter.write(SAXWriter.java:733)
        at org.dom4j.io.SAXWriter.writeContent(SAXWriter.java:619)
        at org.dom4j.io.SAXWriter.write(SAXWriter.java:733)
        at org.dom4j.io.SAXWriter.writeContent(SAXWriter.java:619)
        at org.dom4j.io.SAXWriter.write(SAXWriter.java:733)
        at org.dom4j.io.SAXWriter.writeContent(SAXWriter.java:619)
        at org.dom4j.io.SAXWriter.write(SAXWriter.java:202)
        at org.dom4j.io.SAXWriter.parse(SAXWriter.java:603)
        at org.orbeon.saxon.event.Sender.sendSAXSource(Sender.java:269)
        at org.orbeon.saxon.event.Sender.send(Sender.java:124)
        at org.orbeon.saxon.IdentityTransformer.transform(IdentityTransformer.java:29)
        at org.orbeon.oxf.xml.TransformerWrapper.transform(TransformerUtils.java:594)
        at org.orbeon.oxf.processor.generator.DOMGenerator$1.readImpl(DOMGenerator.java:207)
        at org.orbeon.oxf.processor.ProcessorImpl$6.read(ProcessorImpl.java:995)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1178)
        at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:350)
        at org.orbeon.oxf.processor.validation.MSVValidationProcessor.access$700(MSVValidationProcessor.java:44)
...

Is there another way to pass a CLOB?

(I have a function, that expects a CLOB parameter. I am trying to call a SQL that uses that function:

                        <sql:execute>
                            <sql:query>
                                SELECT column_value as resource_id
                                FROM TABLE(ows_utility.collection_to_table
                                            (<sql:param type="xs:string" sql-type="clob" select="/submission/collection/resource-id"/>)
                                           )
                            </sql:query>
                            <sql:result-set>
                                <sql:row-iterator>
                                    <row>
                                       <sql:get-columns format="xml"/>
                                    </row>
                                </sql:row-iterator>
                            </sql:result-set>
                        </sql:execute>

)

Thanks,
Vlad
Reply | Threaded
Open this post in threaded view
|

Re: problem for sql:param type="odt:xmlFragment" sql-type="clob" in night build

mangvlad
In reply to this post by Alessandro Vernet
Alex,

I think, I found another problem in the same area:

When I try to execute a SELECT SQL with a CLOB parameter and try to pass a regular string (not xmlFragment) like this:

<sql:param type="xs:string" sql-type="clob" select="/submission/collection/resource-id"/>

I am getting this error (unexpected attribute "sql-type"):

Error unexpected attribute "sql-type"(schema: http://orbeon.org/oxf/xml/sql)
        at org.orbeon.oxf.processor.validation.MSVValidationProcessor$8.error(MSVValidationProcessor.java:197)
        at com.sun.msv.verifier.Verifier.onError(Verifier.java:371)
        at com.sun.msv.verifier.Verifier.onError(Verifier.java:363)
        at com.sun.msv.verifier.Verifier.feedAttribute(Verifier.java:294)
        at com.sun.msv.verifier.Verifier.startElement(Verifier.java:221)
        at org.orbeon.oxf.xml.TeeContentHandler.startElement(TeeContentHandler.java:80)
        at org.orbeon.saxon.event.ContentHandlerProxy.startContent(ContentHandlerProxy.java:349)
        at org.orbeon.saxon.event.NamespaceReducer.startContent(NamespaceReducer.java:168)
        at org.orbeon.saxon.event.ReceivingContentHandler.startElement(ReceivingContentHandler.java:268)
        at org.dom4j.io.SAXWriter.startElement(SAXWriter.java:810)
        at org.orbeon.oxf.xml.dom4j.LocationSAXWriter.startElement(LocationSAXWriter.java:80)
        at org.dom4j.io.SAXWriter.write(SAXWriter.java:732)
        at org.dom4j.io.SAXWriter.writeContent(SAXWriter.java:619)
        at org.dom4j.io.SAXWriter.write(SAXWriter.java:733)
        at org.dom4j.io.SAXWriter.writeContent(SAXWriter.java:619)
        at org.dom4j.io.SAXWriter.write(SAXWriter.java:733)
        at org.dom4j.io.SAXWriter.writeContent(SAXWriter.java:619)
        at org.dom4j.io.SAXWriter.write(SAXWriter.java:733)
        at org.dom4j.io.SAXWriter.writeContent(SAXWriter.java:619)
        at org.dom4j.io.SAXWriter.write(SAXWriter.java:733)
        at org.dom4j.io.SAXWriter.writeContent(SAXWriter.java:619)
        at org.dom4j.io.SAXWriter.write(SAXWriter.java:733)
        at org.dom4j.io.SAXWriter.writeContent(SAXWriter.java:619)
        at org.dom4j.io.SAXWriter.write(SAXWriter.java:202)
        at org.dom4j.io.SAXWriter.parse(SAXWriter.java:603)
        at org.orbeon.saxon.event.Sender.sendSAXSource(Sender.java:269)
        at org.orbeon.saxon.event.Sender.send(Sender.java:124)
        at org.orbeon.saxon.IdentityTransformer.transform(IdentityTransformer.java:29)
        at org.orbeon.oxf.xml.TransformerWrapper.transform(TransformerUtils.java:594)
        at org.orbeon.oxf.processor.generator.DOMGenerator$1.readImpl(DOMGenerator.java:207)
        at org.orbeon.oxf.processor.ProcessorImpl$6.read(ProcessorImpl.java:995)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1178)
        at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:350)
        at org.orbeon.oxf.processor.validation.MSVValidationProcessor.access$700(MSVValidationProcessor.java:44)
...

Is there another way to pass a CLOB?

(I have a function, that expects a CLOB parameter. I am trying to call a SQL that uses that function:

                        <sql:execute>
                            <sql:query>
                                SELECT column_value as resource_id
                                FROM TABLE(ows_utility.collection_to_table
                                            (<sql:param type="xs:string" sql-type="clob" select="/submission/collection/resource-id"/>)
                                           )
                            </sql:query>
                            <sql:result-set>
                                <sql:row-iterator>
                                    <row>
                                       <sql:get-columns format="xml"/>
                                    </row>
                                </sql:row-iterator>
                            </sql:result-set>
                        </sql:execute>

)

Thanks,
Vlad
Reply | Threaded
Open this post in threaded view
|

RE: Re: problem for sql:param type="odt:xmlFragment" sql-type="clob" in night build

Sahid Iqbal
In reply to this post by mangvlad
Hi there,
    Please help me how to connect with my local database. I run
application sql address book and I want to save it in my local database.
Please help me on these


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: RE: Re: problem for sql:param type="odt:xmlFragment" sql-type="clob" in night build

Hank Ratzesberger

Sahid,

I suppose it is hard even for those who are quite familiar with the
SQL processor to help you without knowing your configuration.

One question I can think of is, are you able to connect to the
database now using JDBC?  If you have read this:

http://www.orbeon.com/ops/doc/processors-sql

Then perhaps send us a snippet of your code.

Cheers,
Hank

On Sep 9, 2008, at 9:46 PM, Sahid Iqbal wrote:

> Hi there,
>     Please help me how to connect with my local database. I run
> application sql address book and I want to save it in my local  
> database.
> Please help me on these
>
> --
> You receive this message as a subscriber of the [hidden email]  
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
Hank Ratzesberger
NEES@UCSB
Institute for Crustal Studies,
University of California, Santa Barbara
805-893-8042







--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Re: RE: Re: problem for sql:param type="odt:xmlFragment" sql-type="clob" in night build

Sahid Iqbal
Hi Hank,
       
Thanks for you response, now I am able to connect with my local database
for that I follow these step.

Datasource-sql.xml
------------------
<datasource>
    <driver-class-name>com.mysql.jdbc.Driver</driver-class-name>
    <uri>jdbc:mysql://localhost:3306/orbeon</uri>  
    <username>root</username>
    <password>root</password>
</datasource>

And placed it inside

orbeon\WEB-INF\resources\config directory then it works fine



Warm Regards,
Shahid Iqbal | Software Engineer  | M P H A S I S an EDS Company  




-----Original Message-----
From: Hank Ratzesberger [mailto:[hidden email]]
Sent: Thursday, September 11, 2008 5:22 AM
To: [hidden email]
Subject: [ops-users] Re: RE: Re: problem for sql:param
type="odt:xmlFragment" sql-type="clob" in night build
Importance: High


Sahid,

I suppose it is hard even for those who are quite familiar with the
SQL processor to help you without knowing your configuration.

One question I can think of is, are you able to connect to the
database now using JDBC?  If you have read this:

http://www.orbeon.com/ops/doc/processors-sql

Then perhaps send us a snippet of your code.

Cheers,
Hank

On Sep 9, 2008, at 9:46 PM, Sahid Iqbal wrote:

> Hi there,
>     Please help me how to connect with my local database. I run
> application sql address book and I want to save it in my local  
> database.
> Please help me on these
>
> --
> You receive this message as a subscriber of the [hidden email]  
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
Hank Ratzesberger
NEES@UCSB
Institute for Crustal Studies,
University of California, Santa Barbara
805-893-8042







--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws