-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Problem mit Blobs, Hibernate 3, Oracle10g
PostPosted: Thu Jul 03, 2008 8:03 am 
Newbie

Joined: Thu Jul 03, 2008 7:51 am
Posts: 2
hallo zusammen:
ich habe auf einer oracle 10g eine tabelle generiert:

create table contact(
id number(22) primary key not null,
attachment blob,
attachmentname varchar2(255))
tablespace users
storage (initial 2M pctincrease 0)
lob (attachment) store AS (
tablespace users
storage (initial 10M)
enable storage in row
pctversion 5
chunk 1
index lob_attachment_idx (tablespace users storage (initial 1M)));

beim versuch diese durch hibernate zu befüllen habe ich das problem, dass große dateien nicht in der datenbank landen. eine fehlermeldung erhalte ich nicht.

die klassendefinition sieht so aus:
@Entity
@Table(name="contact")
public class Contact extends APersistenceListable {

@Id
@SequenceGenerator(name="s_contact", sequenceName="s_contact", allocationSize=0)
@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="s_contact")
private Long id;

@Lob
private Blob attachment;

@Length(max=255)
private String attachmentname;

public InputStream getBlobStream() throws SQLException {
if (getAttachment () == null) {
return null;
}
return getAttachment().getBinaryStream();
}

public void setBlobStream(InputStream sourceStream) throws IOException {
setAttachment (Hibernate.createBlob(sourceStream));
}
}

hat hier irgendjemand eine idee was schief läuft?
gruss
dieter


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.