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

Building grails with Jenkins is causing an exception during runtime.

      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.

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

          [JENKINS-15303] Building grails with Jenkins is causing an exception during runtime.

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

          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.

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

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

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

          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

          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.

          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.

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

              Created:
              Updated: