Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-15303

Building grails with Jenkins is causing an exception during runtime.

    Details

    • Similar Issues:

      Description

      Creating a grails war in IntelliJ does not introduce an exception during runtime for domain mapping. Attached are example domains that are causing the issue. When the project is built in Jenkins it seems that it does not take into consideration the static mappedBy field in DomainOne (Attached).
      Building with IntelliJ the mappedBy is working properly during runtime.

        Attachments

        1. DomainOne.groovy
          0.3 kB
        2. DomainOneFix.groovy
          0.3 kB
        3. DomainTwo.groovy
          0.2 kB

          Activity

          Hide
          hardwickj James Hardwick added a comment -

          For starters, you are using invalid syntax for your hasMany map in DomainOne. I'd fix that first and then probably close this bug.

          Show
          hardwickj James Hardwick added a comment - For starters, you are using invalid syntax for your hasMany map in DomainOne. I'd fix that first and then probably close this bug.
          Hide
          fbouchedid Fares Bouchedid added a comment -

          This is the fix for DomainOne.groovy
          Please Delete DomainOne.groovy

          Show
          fbouchedid Fares Bouchedid added a comment - This is the fix for DomainOne.groovy Please Delete DomainOne.groovy
          Hide
          fbouchedid Fares Bouchedid added a comment -

          That was a mistake creating sample grails domains. The issue still exist and I uploaded a new Domain called DomainOneFix.groovy

          Show
          fbouchedid Fares Bouchedid added a comment - That was a mistake creating sample grails domains. The issue still exist and I uploaded a new Domain called DomainOneFix.groovy
          Hide
          hardwickj James Hardwick added a comment -

          You still have invalid syntax. "mapping" is supposed to be a closure, but you are defining it sort of like a map (See http://grails.org/doc/latest/guide/single.html#ormdsl)

          Please attach a complete zipped app containing this example that shows this working correctly. I have a hard time believing it would work correctly anywhere, let alone Jenkins. The jenkins grails plugin isn't going to alter the runtime GORM mapping behavior of grails. The only way it could do so is if you supplied an external config as part of the build step, which is a standard Grails convention anyways and again nothing specific to Jenkins.

          Show
          hardwickj James Hardwick added a comment - You still have invalid syntax. "mapping" is supposed to be a closure, but you are defining it sort of like a map (See http://grails.org/doc/latest/guide/single.html#ormdsl ) Please attach a complete zipped app containing this example that shows this working correctly. I have a hard time believing it would work correctly anywhere, let alone Jenkins. The jenkins grails plugin isn't going to alter the runtime GORM mapping behavior of grails. The only way it could do so is if you supplied an external config as part of the build step, which is a standard Grails convention anyways and again nothing specific to Jenkins.

            People

            • Assignee:
              jeffg2one jeffg2one
              Reporter:
              fbouchedid Fares Bouchedid
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: