• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem persisting through Spring/Hibernate project

 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am attempting to save an entity which has a custom UserType to handle a Blob field. If I comment out the property for the Blob from the Hibernate mapping file I am able to save the entity just fine. I know that there must be something very small that is not correct. The code worked previously and was able to save the entity with the Blob just fine, unfortunately I am not able to find what could have changed to cause this problem. The following is a stack trace of the exception, any help is appricated.

 
Don Blodgett
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are there any suggestions on this? I am completely lost as to why this is not working. I have a transaction manager defined in my application context using the following, but I am not sure where I should be using the transactionManager bean.



If I take it out I get an error indicating that there must be one, but I am not using it anywhere else, so I assume that it is being used internally by Spring. Not sure why it is null when it gets to the org.springframework.jdbc.support.lob.LobCreatorUtils.registerTransactionSynchronization method, as I understand it this transactionManager bean should be used to maintain the transaction while the Spring LOB handler commits the LOB to the database. There has to be something (likely small) that I am missing, I appreciate any help on this.
 
Don Blodgett
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have managed to find a solution that works for me. For those that are interested see the following. Basically what I did was wrap my DAO bean in an org.springframework.transaction.interceptor.TransactionProxyFactoryBean.



 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic