Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-28-2007, 03:48 PM
Senior Member
 
Join Date: Jun 2007
Posts: 119
Peter is on a distinguished road
org.hibernate.exception.GenericJDBCException: could not insert
Hi,

I am new to hibernate and would like to store a image using Blob in oracle database.

I am creating a java.sql.Blob instance using Hibernate.createBlob(InputStream in) method. But when i try to save the object into the database this error appears
Code:
org.hibernate.exception.GenericJDBCException: could not insert: [user.Product] at org.hibernate.exception.ErrorCodeConverter.handledNonSpecificException (ErrorCodeConverter.java:92) at org.hibernate.exception.ErrorCodeConverter.convert (ErrorCodeConverter.java:80) at org.hibernate.exception.JDBCExceptionHelper.convert (JDBCExceptionHelper.java:43) at org.hibernate.persister.BasicEntityPersister.insert (BasicEntityPersister.java:1683) at org.hibernate.persister.BasicEntityPersister.insert (BasicEntityPersister.java:2012) at org.hibernate.action.EntityInsertAction.execute (EntityInsertAction.java:42) at org.hibernate.impl.ActionQueue.executeActions (ActionQueue.java:232) at org.hibernate.impl.ActionQueue.executeActions (ActionQueue.java:137) at org.hibernate.event.AbstractFlushingEventListener.performExecutions (AbstractFlushingEventListener.java:255) at org.hibernate.event.DefaultFlushEventListener.onFlush (DefaultFlushEventListener.java:26) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:814) at org.hibernate.transaction.JDBCTransaction.commit (JDBCTransaction.java:75) at oracle.jdbc.dbaccess.DBError.throwSqlException (DBError.java:179) at oracle.jdbc.driver.OraclePreparedStatement.addBatch (OraclePreparedStatement.java:4073)
mmm any ideas?
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-04-2007, 03:57 PM
Ed Ed is offline
Senior Member
 
Join Date: Jun 2007
Posts: 110
Ed is on a distinguished road
Are you mapping your blob to byte[] array?
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 07-04-2007, 04:00 PM
Senior Member
 
Join Date: Jun 2007
Posts: 164
Heather is on a distinguished road
Here that is the problem
Dadidadida: 06/01/2005 - 07/01/2005
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Insert Help!!!! shaungoater New To Java 1 06-14-2008 05:14 AM
Trouble with factory method - unhandled exception type Exception desmond5 New To Java 1 03-08-2008 08:41 PM
How do insert a Graphic carl New To Java 1 08-01-2007 07:30 AM
how to insert tables into JTextPane osval AWT / Swing 1 07-29-2007 11:11 AM
org.hibernate.ejb.Version <clinit> INFO: Hibernate EntityManager 3.2.0.CR1 Heather Database 2 06-30-2007 05:01 PM


All times are GMT +3. The time now is 02:13 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org