Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Problem persisting through Spring/Hibernate project

 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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.



 
I AM MIGHTY! Especially when I hold this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic