-->
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.  [ 5 posts ] 
Author Message
 Post subject: Blob Type
PostPosted: Sat Dec 17, 2005 3:50 am 
Beginner
Beginner

Joined: Thu Jun 09, 2005 3:18 am
Posts: 34
Location: India
Blob imBlob = img.getImageBlob();

byte[] allBytesInBlob = imBlob.getBytes(1, (int)imBlob.length());

I am getting the following exception

java.lang.UnsupportedOperationException: Blob may not be manipulated from creating session

Please help me


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 17, 2005 8:35 pm 
Senior
Senior

Joined: Wed Jul 13, 2005 4:31 pm
Posts: 142
Location: Seattle, WA
I am doing the exact same thing... without problems
Blob blob = image.getImage();
byte[] ret = blob.getBytes((long) 1, (int) blob.length());

Provide some more context information...not sure what's going on here.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 20, 2005 6:15 am 
Beginner
Beginner

Joined: Thu Jun 09, 2005 3:18 am
Posts: 34
Location: India
anar wrote:
I am doing the exact same thing... without problems
Blob blob = image.getImage();
byte[] ret = blob.getBytes((long) 1, (int) blob.length());

Provide some more context information...not sure what's going on here.


I follwoed the following example

http://hansonchar.blogspot.com/2005/06/ ... te-in.html


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 20, 2005 6:12 pm 
Senior
Senior

Joined: Wed Jul 13, 2005 4:31 pm
Posts: 142
Location: Seattle, WA
I would recommend using the solution of writing a UserType for Blob instead.

See the last entry in the post -
http://hibernate.org/56.html


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 21, 2005 12:23 am 
Beginner
Beginner

Joined: Thu Jun 09, 2005 3:18 am
Posts: 34
Location: India
anar wrote:
I would recommend using the solution of writing a UserType for Blob instead.

See the last entry in the post -
http://hibernate.org/56.html




Thanks Anar


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

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.