jamesdh opened a new issue, #14488:
URL: https://github.com/apache/grails-core/issues/14488

   ### Task List
   
   - [x] Steps to reproduce provided
   - [x] Stacktrace (if present) provided
   - [x] Example that reproduces the problem uploaded to Github
   - [x] Full description of the issue provided (see below)
   
   ### Steps to Reproduce
   
   1. Generate two separate domain models, both abstract. The intent is that 
they would be the root of an inheritance hierarchy.
   2. For one model generate a regular Grails service.
   3. For the other, generate a GORM Data service.
   4. Declare the GORM Data service within the regular service
   5. Implement a method which uses 
   6. Attempt to execute said method during runtime
   
   ### Expected Behaviour
   
   The GORM Data service is injected on init and executes as expected
   
   ### Actual Behaviour
   
   The GORM Data service is null
   
   ```
   AAbstractServiceSpec.test something
   Condition failed with Exception:
   
   aAbstractService.serviceMethod()
   |                |
   null             java.lang.NullPointerException: Cannot invoke method 
serviceMethod() on null object
                        at 
com.abstracts.AAbstractServiceSpec.$tt__$spock_feature_0_0(AAbstractServiceSpec.groovy:15)
                        at groovy.lang.Closure.call(Closure.java:405)
                        at groovy.lang.Closure.call(Closure.java:421)
                        at 
grails.gorm.transactions.GrailsTransactionTemplate$1.doInTransaction(GrailsTransactionTemplate.groovy:68)
                        at 
org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)
                        at 
grails.gorm.transactions.GrailsTransactionTemplate.executeAndRollback(GrailsTransactionTemplate.groovy:65)
   ```
   
   ### Environment Information
   
   - **Operating System**: MacOS 10.15.7
   - **GORM Version:** 7.0.4 / 7.0.8
   - **Grails Version (if using Grails):** 4.0.3 / 4.0.6
   - **JDK Version:** 1.8.0_265
   
   ### Example Application
   
   I add this to an example I used for a previous bug:
   - 
https://github.com/jamesdh/gorm-data-services-where-bug/commit/b3b83a1acaa41ecec9684275ec4d368ce613261c
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to