Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-2525

Tapestry-Hibernate integration incompatible with Hibernate 5.x

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.4
    • 5.4.1
    • tapestry-hibernate
    • None

    Description

      The following exception is thrown when attempting to start up tapestry with the latest stable version of Hibernate (5.0.6.Final):

      java.lang.NoSuchMethodError: org.hibernate.cfg.Configuration.getClassMappings()Ljava/util/Iterator;
      	at org.apache.tapestry5.hibernate.modules.HibernateModule.contributeValueEncoderSource(HibernateModule.java:95) ~[tapestry-hibernate-5.4.0.jar:na]
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_60]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_60]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_60]
      	at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_60]
      	at org.apache.tapestry5.ioc.internal.ContributionDefImpl.invokeMethod(ContributionDefImpl.java:125) ~[tapestry-ioc-5.4.0.jar:na]
      

      That is due to the fact that getClassMappings() was removed from org.hibernate.cfg.Configuration in Hibernate 5.

      Luckily, it isn't really needed, and there is a backwards compatible way to do without it. I.e., tapestry can easily become compatible with Hibernate 5 without breaking compatibility with Hibernate 3 and 4.

      I'll create a pull request on GitHub and link to it here.

      Attachments

        Activity

          People

            kaosko Kalle Korhonen
            annorax I D
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 20m
                20m