[jboss-user] [EJB 3.0] - BLOB > 2K into Oracle 9
CarstenRudat
do-not-reply at jboss.com
Tue Nov 7 08:59:08 EST 2006
Hi,
I tried - unsuccessfully - to upload a file into an ejb:
| ejb.setMyBlob(Hibernate.createBlob(inputStream));
| // no exception thrown
|
The ejb looks like this:
| ...
| @Basic(fetch=FetchType.LAZY)
| protected java.sql.Blob myBlob;
| ...
| @Lob
| @Column(name = "myblob", columnDefinition="BLOB")
| public java.sql.Blob getMyBlob() {
| return this.myBlob;
| }
|
| public void setRtpdesign(java.sql.Blob myBlob) {
| this.myBlob = myBlob;
| }
|
Hibernate-Properties are:
| <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle9Dialect"/>
| <property name="hibernate.hbm2ddl.auto" value="update"/>
| <property name="hibernate.jdbc.use_streams_for_binary" value="true"/>
|
An upload of an file smaller than 2K works. But any other causes null in the database.
What should I do?
Best regards.
Carsten
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983748#3983748
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983748
More information about the jboss-user
mailing list