-->
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.  [ 3 posts ] 
Author Message
 Post subject: Oracle and blob - streams type cannot be used in batching
PostPosted: Wed Nov 26, 2003 11:41 am 
Beginner
Beginner

Joined: Wed Oct 08, 2003 6:34 am
Posts: 29
Ok, I'm trying to persist binary data in Oracle9i using hibernate, and I have finally gave up on using byte[] or InputStream as the type of my property, so now I'm using java.sql.Blob.

I assign the using the following sentence
Code:
    Session hibernateSession = sessionFactory.openSession(  );
    Transaction transaction = hibernateSession.beginTransaction(  );
      Publication publication = (Publication) hibernateSession.load( Publication.class, contactActionForm.getPublicationId(  ) );
      ContactInformation contact = publication.getContact(  );
(snip)
        contact.getPicture(  ).setContent( Hibernate.createBlob( contactActionForm.getPicture().getInputStream() ) );
      hibernateSession.save( publication );
      transaction.commit(  );


And then, when trying to commit I get an SQLException with the message "streams type cannot be used in batching". So what the @#$% am I doing wrong?

Regards
Jose


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 26, 2003 11:46 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
disable jdbc batch updates


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 26, 2003 1:23 pm 
Beginner
Beginner

Joined: Wed Oct 08, 2003 6:34 am
Posts: 29
Gavin,

Thanks for the reply. Now I get no exceptions, but the blob column doesnt get updated. Any idea?

Thanks, regards


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.