Hi, Werner !
 
Thank you for your answer. I just have found a solution to my problem - 
SQLEngine.java, lline 597

    public Object create( Database database, Object conn, Object[] fields, Object 
identity )
            throws DuplicateIdentityException, PersistenceException {
            ....


                    } else {
                        if ( _fields[i].columns.length != 1 )
                            throw new PersistenceException( "Complex field expected! 
");
                        Object value = toSQL( i, 0, fields[i]);
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

                        SQLTypes.setObject( stmt, count++, toSQL( i, 0, fields[i]), 
_fields[i].columns[0].sqlType );
                    }
    ...
    
In case fields[i] is an InputStream, the first call to toSQL(i, 0, fields[i]) leaves 
InputStream in invalid state, and the second call to toSQL( i, 0, fields[i]) return 
byte[0].


With best regards,
Vadim Solonovich
mailto:[EMAIL PROTECTED]

----- Original Message ----- 
From: "Werner Guttmann" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 06, 2004 4:03 PM
Subject: Re: [castor-dev] BLOBs problem with castor 0.9.5.1/0.9.5.2 and MySQL 3.23/4.0


> Vadim,
> 
> can you please browse the bug repository at 
> 
> http://bugzilla.exolab.org 
> 
> as I remember that your bug description is similar to an already existing one. If 
> that's the case, can you please add your details to it ?
> 
> In addition, can you please share more information about the specific problem you 
> are having. What exactly is the problem you are experiencing ? Can you 
> please provide a short example (code, ammping file, SQL schema, etc.) so that we 
> could reproduce your problem ?
> 
> Thanks
> Werner
> 
> On Fri, 6 Feb 2004 15:14:09 +0300, Vadim Solonovich wrote:
> 
> >Hi, All !
> >
> >I find a problem with BLOBs in Castor 0.9.5.1-0.9.5.2.
> >Castor JDO do not properly handle creating object which has a BLOB as InputStream .
> >I found this with MySQL 3.23 and 4.0
> >I have a mapping like
> >
> >    <class ... >
> >        <field name="stream" type="stream" >
> >          <sql name="stream" type="blob" dirty="ignore"/>
> >        </field>
> >    </class>
> >
> >
> >Castor 0.9.4.3, and 0.9.5 works right. 
> >Should I post a bug, or the problem is  solved in CVS ?
> >
> >
> >Vadim Solonovich,
> >mailto:[EMAIL PROTECTED],
> >
> >----------------------------------------------------------- 
> >If you wish to unsubscribe from this mailing, send mail to
> >[EMAIL PROTECTED] with a subject of:
> >        unsubscribe castor-dev
> >
> 
> ----------------------------------------------------------- 
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>         unsubscribe castor-dev
> 

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to