List of supported types:

         BIT  | TINYINT | SMALLINT    | INTEGER    | BIGINT    | FLOAT
        | REAL | NUMERIC | DECIMAL     | CHAR       | VARCHAR   |
LONGVARCHAR
        | DATE | TIME    | TIMESTAMP   | BINARY     | VARBINARY |
LONGVARBINARY
        | NULL | OTHER   | JAVA_OBJECT | DISTINCT   | STRUCT    | ARRAY
        | BLOB | CLOB    | REF         | BOOLEANINT | BOOLEANCHAR

from
http://cvs.apache.org/viewcvs/jakarta-turbine-torque/src/dtd/database.dtd

maybe try BINARY? just a guess...

what you are trying to do (in concept) should work fine.... (disclaimer:
haven't done it myself :))


----- Original Message -----
From: "Xavier Michel" <[EMAIL PROTECTED]>
To: "Turbine-User" <[EMAIL PROTECTED]>
Sent: Wednesday, September 05, 2001 8:40 PM
Subject: Insert Blob in mysql with turbine


> Hi,
>
> I tried ti insert blob in mysql using the object generated by:
>   <table name="ARTISTE"  idMethod="autoincrement">
>
>     <column name="ID" type="INTEGER" required="true"
>            autoIncrement="true"
>            primaryKey="true" />
>
>     <column name="NOM" type="VARCHAR" required="true" size="50"/>
>     <column name="TROMBINE" type="BLOB" />
>   </table>
>
> In my action I have:
> -------------------
> ....
> FileItem trombine = data.getParameters().getFileItem("trombine");
> if (trombine!=null)
>     aArtiste.setOeuvre(trombine.get());
> ...
>
> And I got:
> Exception:  java.lang.reflect.InvocationTargetException
> Stack Trace follows:
> java.lang.reflect.InvocationTargetException: java.lang.Exception: property
> trombine is of unsupported type class [B
> at
>
org.apache.turbine.util.parser.BaseValueParser.setProperty(BaseValueParser.j
> ava:1366)
> at
>
org.apache.turbine.util.parser.BaseValueParser.setProperties(BaseValueParser
> .java:1220)
> at pf.cs.gtr.modules.actions.ArtisteAction.doInsert(ArtisteAction.java:49)
> at java.lang.reflect.Method.invoke(Native Method)
> at
>
org.apache.turbine.util.velocity.VelocityActionEvent.executeEvents(VelocityA
> ctionEvent.java:166)...
>
> Where I'm wrong? It's possible to store image in mySQL using Turbine and
get
> it back or should store it in the file system?
>
> Thanks for your help.
>
> Xa.
>
>
> Central Services Tahiti
> Xavier Michel
> [EMAIL PROTECTED]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to