-->
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: Blobbing to and from MySQL
PostPosted: Wed Jan 27, 2010 1:16 am 
Newbie

Joined: Sat Sep 27, 2003 2:13 am
Posts: 7
Hi gang, got a weird problem and hoping someone can give me a hint.

I have an Image class with binary data which I represent as byte[] (I also tried Blob which I may go back to as it probably will use less memory - streams instead of large byte arrays).

I have the proper mapping and my data saves fine (I can see my saved data using a DB tool outside my application) but for whatever reason I seem to have random read problems inside my application following my initial save.

i.e. I save a number of Blob records to the DB (doing a flush, commit, then clear after each) but then random records won't retrieve unless I kill the VM and start over at which point all records fetch fine.

Nothing gets thrown by Hibernate during the fetch (Session.get() or even Criteria.getUnique...), the fetch just returns null.

Running on Mac using JVM 1.6.0.17, MySQL J/Connector 5.1.8 and MySQL DB 5.1.37, and Hibernate 3.3.2.

I've looked for memory and connection leaks and haven't found anything obvious and am at a loss as to where to look.

This appears to be some kind of caching or session synchronization issue as I can see the saved records in the DB outside my running application I just don't seem to be able to fetch them inside my current application.

Any tips or hints appreciated.

Thanks,

Martin


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.