You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by "Jambunathan, Akilaprasad (Cognizant)" <Ak...@cognizant.com> on 2006/10/12 16:52:57 UTC

Ibatis Blob Insertion problems

Greetings!!!



We are using iBatis (am not sure on the version) along with Oracle
10.1.0.2.0 for one of our project. We are using BLOBs extensively, when
we are trying to insert into a table which has BLOBs we are facing some
issue. Here are the details you might be looking for.



iBatis XML snipped



                <insert id="insertFile" parameterMap="uploadFile">

                                INSERT INTO

                                FILEUPLOAD ( FILEID , FILENAME ,
UPLOADDATE, FILELOCATION)

                                VALUES

                                (#fileId#, #fileName#,TO_DATE(SYSDATE,
'MM/DD/YY'), #fileLink#)  

                </insert>

                               

                <insert id="insertFileEmptyBlob"
parameterClass="com.newsamerica.value.ffms.jobinformation.JobAttachmentV
alue">

                                INSERT INTO

                                FILEUPLOAD ( FILEID , FILENAME ,
UPLOADDATE, FILELOCATION)

                                VALUES

                                (#fileId#, #fileName#,TO_DATE(SYSDATE,
'MM/DD/YY'), empty_blob())            

                </insert>



Exception



Caused by: java.sql.SQLException: ORA-01858: a non-numeric character was
found where a numeric was expected



Please let me know on what am I doing wrong?



Warm Regards,

Akil





This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly
prohibited and may be unlawful.

  Visit us at http://www.cognizant.com

Re: Ibatis Blob Insertion problems

Posted by Brandon Goodin <br...@gmail.com>.
Just so everyone knows... I passed them the wiki link to Nathan's BLOB and
CLOB tutorial. I have also reponded privately encouraging them to make use
of the current iBATIS 2.2.0 jars.

Brandon

On 10/12/06, Jambunathan, Akilaprasad (Cognizant) <
Akilaprasad.Jambunathan@cognizant.com> wrote:
>
>  Greetings!!!
>
>
>
> We are using iBatis (am not sure on the version) along with Oracle
> 10.1.0.2.0 for one of our project. We are using BLOBs extensively, when we
> are trying to insert into a table which has BLOBs we are facing some issue.
> Here are the details you might be looking for.
>
>
>
> *iBatis XML snipped*
>
>
>
>                 <insert id="insertFile" parameterMap="uploadFile">
>
>                                 INSERT INTO
>
>                                 FILEUPLOAD ( FILEID , FILENAME ,
> UPLOADDATE, FILELOCATION)
>
>                                 VALUES
>
>                                 (#fileId#, #fileName#,TO_DATE(SYSDATE,
> 'MM/DD/YY'), #fileLink#)
>
>                 </insert>
>
>
>
>                 <insert id="insertFileEmptyBlob" parameterClass="
> com.newsamerica.value.ffms.jobinformation.JobAttachmentValue">
>
>                                 INSERT INTO
>
>                                 FILEUPLOAD ( FILEID , FILENAME ,
> UPLOADDATE, FILELOCATION)
>
>                                 VALUES
>
>                                 (#fileId#, #fileName#,TO_DATE(SYSDATE,
> 'MM/DD/YY'), empty_blob())
>
>                 </insert>
>
>
>
> *Exception*
>
> * *
>
> Caused by: *java.sql.SQLException*: ORA-01858: a non-numeric character was
> found where a numeric was expected
>
>
>
> Please let me know on what am I doing wrong?
>
>
>
> Warm Regards,
>
> Akil
>
>
>  This e-mail and any files transmitted with it are for the sole use of the
> intended recipient(s) and may contain confidential and privileged
> information.
> If you are not the intended recipient, please contact the sender by reply
> e-mail and destroy all copies of the original message.
> Any unauthorized review, use, disclosure, dissemination, forwarding,
> printing or copying of this email or any action taken in reliance on this
> e-mail is strictly
> prohibited and may be unlawful.
>
> Visit us at http://www.cognizant.com
>