Hello Bruce,

I never thouhgt of reading src/tests/jdo !!
I just used http://www.castor.org/types.html#BLOB-and-CLOB-Types .

I'm making the test today with Oracle 9i, and I will tell you if it's
ok.

Thanks for your answer.

Sylvie.
___________________
CREDI RA
Sylvie Palluel

[EMAIL PROTECTED]
___________________



> -----Message d'origine-----
> De : Bruce Snyder [mailto:[EMAIL PROTECTED] 
> Envoy� : jeudi 4 d�cembre 2003 08:58
> � : SYLVIE PALLUEL
> Objet : Re: RE : [castor-dev]Pb while Storing BLOB to Oracle Database
> 
> 
> This one time, at band camp, SYLVIE PALLUEL said:
> 
> SP>I've just tried this ( why not !!!)
> SP>      <field name="fichier" type="bytes">
> SP>        <sql type="oracle.sql.BLOB" dirty="ignore" />
> SP>        <bind-xml name="fichier" />
> SP>      </field>
> SP>
> SP>And I obtained ... Of course ... This :
> SP>
> SP>     [java] [testCastor]        at
> SP>org.apache.tools.ant.Main.main(Main.java:235)
> SP>     [java] [testCastor] 
> org.exolab.castor.mapping.MappingException: 
> SP>The SQL type oracle.sql.BLOB is not supported in this release
> SP>     [java] [testCastor]        at
> SP>org.exolab.castor.jdo.engine.SQLTypes.typeFromName(SQLTypes
> .java(Inli
> SP>ned
> SP>Compiled Code))
> SP>     [java] [testCastor]        at
> SP>org.exolab.castor.jdo.engine.JDOMappingLoader.getTypeInfo(J
> DOMappingLoad
> SP>er.java(Compiled Code))
> SP>
> SP>
> SP>Is there a way to add a special type oracleBlob ?
> SP>
> SP>Or do you think I have make a mistake somewhere?
> 
> Sylvie, 
> 
> Castor will properly persist a java.sql.Blob, but not an 
> oracle.sql.BLOB. Because it has no previous knowledge of an 
> oracle.sql.BLOB, it has no idea how to handle it. Castor will 
> not handle the persistence of any types that do not exist in 
> the org.exolab.castor.jdo.engine.SQLTypes class as a 
> TypeConverter. You can add custom types to this class, but 
> it's not very easy to maintain moving forward. I suggest 
> using the java.sql.Blob as I've used it since Oracle8i with 
> success. I suggest following the tests available in 
> src/tests/jdo. Take a look at the object mapping. Also see: 
> 
    http://www.castor.org/types.html#BLOB-and-CLOB-Types

In the future, I hope to make it easier to add new types in a clean and
pluggable manner. 

Bruce
-- 
perl -e 'print
unpack("u30","<0G)[EMAIL PROTECTED]&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'

The Castor Project 
http://www.castor.org/

Apache Geronimo 
http://incubator.apache.org/projects/geronimo.html




**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************

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

Reply via email to