Hi,
Found the bug causing the problem:
The JDBCDataHelper.java file, a break statement was
missing in a switch.
case FieldTypes.DISKBLOB:
ps.setObject(col, value, FieldTypes.CHAR);
add this>>>>>>>> break;
default :
ps.setObject(col, value, fieldType);
This caused the default to be called after setObject
for a diskblob.
cheers,
Manjuka
--- Manjuka Soysa <[EMAIL PROTECTED]> wrote: > Hi
everyone,
> I have setup dbforms with mysql and tomcat.. and it
> was great to see how easy it is to work with.
> Wondering if anyone else had this problem with
> diskBlob fields. I have two fields front_image and
> back_image defined in a table like:
>
> =================================================
> <field name="front_image"
> fieldType ="diskblob"
> directory="d:\templates"
> encoding="true"/>
> =================================================
>
> And to create a new record, I have this in a
> dbforms:footer (like in the examples):
>
> =================================================
> <tr bgcolor="#fee9aa">
> <td>Front Image</td>
> <td><db:file id="pic1" fieldName="front_image"
> accept="image/*" /></td>
> </tr>
> <tr bgcolor="#fee9aa">
> <td>Back Image</td>
> <td><db:file id="pic2" fieldName="back_image"
> accept="image/*" /></td>
> </tr>
> <tr>
> <td><db:insertButton caption="button.submit"
> followUp="/templates.jsp"
> followUpOnError="/newtemplate.jsp"/></td>
>
> ================================================
>
> But when I click the insert button, I get an Unknown
> Types value error (stackTrace Below). Any help is
> greatly appreciated. Thanks!
> Manjuka
> ================================================
> 561140 [http8080-Processor4] ERROR
> org.dbforms.servlets.FileServlet - ::readDis
> kBlob - file
>
[d:\projects\idcard\tomcat\webapps\neo/Police2_front.jpg]
> not found
>
> 713422 [http8080-Processor3] ERROR
> org.dbforms.servlets.FileServlet - ::readDis
> kBlob - file
>
[d:\projects\idcard\tomcat\webapps\neo/Police1_front.jpg]
> not found
>
> 744562 [http8080-Processor2] ERROR
> org.dbforms.servlets.FileServlet - ::readDis
> kBlob - file
>
[d:\projects\idcard\tomcat\webapps\neo/Police1_front.jpg]
> not found
>
> 1015875 [http8080-Processor2] ERROR
> org.dbforms.servlets.Controller - ::process
> - SQLException:
> java.sql.SQLException: Unknown Types value
> at
>
com.mysql.jdbc.PreparedStatement.setObject(PreparedStatement.java:863
> )
> at
>
com.mysql.jdbc.PreparedStatement.setObject(PreparedStatement.java:892
> )
> at
>
org.dbforms.config.JDBCDataHelper.fillPreparedStatement(JDBCDataHelpe
>
> Find local movie times and trailers on Yahoo!
> Movies.
> http://au.movies.yahoo.com
>
>
>
-------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux
> Tutorials
> Free Linux tutorial presented by Daniel Robbins,
> President and CEO of
> GenToo technologies. Learn everything from
> fundamentals to system
>
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> _______________________________________________
> DbForms Mailing List
>
> http://www.wap-force.net/dbforms
Find local movie times and trailers on Yahoo! Movies.
http://au.movies.yahoo.com
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
DbForms Mailing List
http://www.wap-force.net/dbforms