Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-7440

Doc: Load-time weaving limitations with Tomcat and Hibernate

    Details

    • Type: Task
    • Status: Reopened
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 4.3 GA
    • Component/s: None
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      When I use Hibernate to persist an object of a class which inherits from an abstract (entity) class: nothing happens if version=3.0" inside web.xml

      If I change version="2.5" then everything works fine. I'll attach a testcase. The war file is missing all Spring JARs and hibernate3.jar which can be downloaded at http://sourceforge.net/projects/hibernate/files/hibernate3/3.6.0.Beta2

      When you enable logging for Hibernate and set org.hibernate.SQL to level DEBUG, then you'll see that there is a SQL INSERT statement when web.xml has version="2.5", but there is no INSERT statement when changing to version="3.0".

      The issue described at https://jira.springframework.org/browse/SPR-7350 is gone. This is a new one.

      1. testcase.war
        6.12 MB
        Juergen Zimmermann

        Issue Links

          Activity

          Hide
          costin Costin Leau added a comment -
          Show
          costin Costin Leau added a comment - Tomcat issue raised here: https://issues.apache.org/bugzilla/show_bug.cgi?id=52549
          Hide
          asaikali Adib Saikali added a comment -

          Hi Costin,

          I have spent the past week trying to figure out why Spring LTW does not work with Tomcat 7.0.25, finally I know why. I think it would be great to put a note in the LTW setup guide in the manual to warn people about the issue with Tomcat LTW.

          Show
          asaikali Adib Saikali added a comment - Hi Costin, I have spent the past week trying to figure out why Spring LTW does not work with Tomcat 7.0.25, finally I know why. I think it would be great to put a note in the LTW setup guide in the manual to warn people about the issue with Tomcat LTW.
          Hide
          matotuzo Martin Tuzinsky added a comment -

          Hi, it seems to me also related to the Tomcat 8. Is there any workaround?

          Show
          matotuzo Martin Tuzinsky added a comment - Hi, it seems to me also related to the Tomcat 8. Is there any workaround?
          Hide
          juzerali Juzer Ali added a comment -

          @Adib, agreed totally. I wasted 3 days before landing up on this page to understand that LTW doesn't work with servlet 3.0. Wish I could figure this out earlier. There should be a warning about this in Chapter 10.

          Show
          juzerali Juzer Ali added a comment - @Adib, agreed totally. I wasted 3 days before landing up on this page to understand that LTW doesn't work with servlet 3.0. Wish I could figure this out earlier. There should be a warning about this in Chapter 10 .
          Hide
          shadow Andrei Ivanov added a comment -

          You should create a minimal project to reproduce the issue then: https://github.com/spring-projects/spring-framework-issues

          Show
          shadow Andrei Ivanov added a comment - You should create a minimal project to reproduce the issue then: https://github.com/spring-projects/spring-framework-issues

            People

            • Assignee:
              juergen.hoeller Juergen Hoeller
              Reporter:
              juergen.zimmermann Juergen Zimmermann
              Last updater:
              Juergen Hoeller
            • Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Days since last comment:
                11 weeks, 1 day ago