Grails
  1. Grails
  2. GRAILS-7535

Cannot locate GORM API implementation when OSIV is being used

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.4-M1, 2.0-M2
    • Fix Version/s: 2.0-RC1
    • Component/s: Testing
    • Labels:
    • Environment:
      Windows 7 x64, grails 1.4.0m1
    • Testcase included:
      yes

      Description

      I'm using OSIV to allow my DWR service to access live domain objects.

      web.xml:
      <filter>
      <filter-name>hibernateFilter</filter-name>
      <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
      <init-param>
      <param-name>singleSession</param-name>
      <param-value>true</param-value>
      </init-param>
      </filter>

      <filter-mapping>
      <filter-name>hibernateFilter</filter-name>
      <url-pattern>/dwr/*</url-pattern>
      </filter-mapping>

      Now, Domain.(anymethod) throws the following error in integration tests:

      Cannot locate GORM API implementation. You either don't have a GORM implementation installed (such as the Hibernate plugin) or you are running Grails code outside the context of a Grails application.

      This is a regression from 1.3.7.

      I can reproduce the issue.
      If the domain class has id, and version attributes defined, it is causing the above error

        Activity

        Hide
        Graeme Rocher added a comment -

        Right, that doesn't really help though. Without valid steps to reproduce we're unable to prioritize this issue.

        Show
        Graeme Rocher added a comment - Right, that doesn't really help though. Without valid steps to reproduce we're unable to prioritize this issue.
        Hide
        Raviteja added a comment -

        Please find the report attached

        Show
        Raviteja added a comment - Please find the report attached
        Hide
        Raviteja added a comment -

        Hi, so did you get a chance to look at the example and figure out what was wrong?

        Show
        Raviteja added a comment - Hi, so did you get a chance to look at the example and figure out what was wrong?
        Hide
        Graeme Rocher added a comment -

        Which zip should be tested application-1.3.7-bug-report-28092011-min.zip?

        Show
        Graeme Rocher added a comment - Which zip should be tested application-1.3.7-bug-report-28092011-min.zip?
        Hide
        Graeme Rocher added a comment -

        Ok I can reproduce with the min example. The problematic line is

                load nullable : false
        

        In GenomicBuildInfo which incorrectly tries to call a GORM method instead of applying the constraint to the property

        Show
        Graeme Rocher added a comment - Ok I can reproduce with the min example. The problematic line is load nullable : false In GenomicBuildInfo which incorrectly tries to call a GORM method instead of applying the constraint to the property

          People

          • Assignee:
            Graeme Rocher
            Reporter:
            Stefan Kendall
          • Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development