Results 1 to 2 of 2

Thread: Can't update db record via hibernate

  1. #1
    Join Date
    Jul 2008
    Posts
    182

    Default Can't update db record via hibernate

    Hi, With spring mvc 3.0.4 and hibernate 3.5.3, I am using Netbeans 7 generated ear file backend CXF web service.
    The generated class mainly including a AbstractFactory.java class, where the edit(..) function have been created automatically in this class.
    I have tested the backend webserivce by calling edit() function from SoapUI, and it does update the database correctly at this point.

    When I use a web service client within another .ear file to save the updated same record to the database table, it didn't update the database table record, it leave the record unchanged.

    There is no error/exception in the log and console.

    Does issue this sound familiar?

    Any suggestion is very appreciated.
    Thanks
    Sam

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,695

    Default

    Please use the search as this question (not specifically for CXF but in general) has been answered numerous times before.

    If nothing gets updated you have no transaction. You have no transaction due to either
    1. No transaction setup at all
    2. Wrongly configured transactions (for instance only a TransactionManager, or using @Transactional without tx:annotation-driven)
    3. Duplicate scanning for @components one transactional the other not (mainly due to scanning in ContextLoaderListener and DispatcherServlet).
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •