Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem persisting through Spring/Hibernate project

 
Don Blodgett
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.



 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic