Tapestry
  1. Tapestry
  2. TAPESTRY-2615

IOC autobuild conflict between org.hibernate.Session and the FullTextSession from the hibernate serach module

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.15
    • Fix Version/s: 5.0.15
    • Component/s: tapestry-hibernate
    • Labels:
      None

      Description

      i use Tapestry's hibernate module and wrote an service that use the FullTextSession from the hibernate search module.
      since howards svn commit (release 686850 / TAPESTRY-2571: Add configuration to turn off the automatic creation of ValueEncoders for Hibernate entities)
      my application throw an exception at startup like this:

      Caused by: java.lang.RuntimeException: Service interface org.hibernate.Session is matched by 2 services: FullTextSession, Session.
      Automatic dependency resolution requires that exactly one service implement the interface.

      my suggestion is:
      add a Marker "HibernateCore" to all Session parameters in the build calls in HibernateModule

        Activity

        Sven Homburg created issue -
        Hide
        Sven Homburg added a comment -

        my sample solution

        Show
        Sven Homburg added a comment - my sample solution
        Sven Homburg made changes -
        Field Original Value New Value
        Attachment Hibernate_Session_Marker.patch [ 12388738 ]
        Hide
        Howard M. Lewis Ship added a comment -

        Actually, I'm thinking we should contribute the local Session object to the Alias service.

        Show
        Howard M. Lewis Ship added a comment - Actually, I'm thinking we should contribute the local Session object to the Alias service.
        Howard M. Lewis Ship made changes -
        Assignee Howard M. Lewis Ship [ hlship ]
        Howard M. Lewis Ship made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Howard M. Lewis Ship made changes -
        Affects Version/s 5.0.15 [ 12313350 ]
        Affects Version/s 5.0.14 [ 12313214 ]
        Howard M. Lewis Ship made changes -
        Resolution Fixed [ 1 ]
        Status In Progress [ 3 ] Closed [ 6 ]
        Hide
        Howard M. Lewis Ship added a comment -

        When you inject a Session other than the default Session, you'll need to disambiguate the reference, typically with a marker annotation.

        Show
        Howard M. Lewis Ship added a comment - When you inject a Session other than the default Session, you'll need to disambiguate the reference, typically with a marker annotation.
        Mark Thomas made changes -
        Workflow jira [ 12440581 ] Default workflow, editable Closed status [ 12568816 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12568816 ] jira [ 12591849 ]

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Sven Homburg
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development