Skip to content

Data service JPA query doesnt compile when invoked from a Java class #14519

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
olavgg opened this issue Oct 15, 2019 · 1 comment
Open

Data service JPA query doesnt compile when invoked from a Java class #14519

olavgg opened this issue Oct 15, 2019 · 1 comment

Comments

@olavgg
Copy link
Contributor

olavgg commented Oct 15, 2019

Steps to Reproduce

  1. Build the application

Expected Behaviour

No compile error

Actual Behaviour

/home/olav/dataquerybug/build/tmp/compileGroovy/groovy-java-stubs/com/example/BookService.java:13: error: element value must be a constant expression
@grails.gorm.services.Query(value=null)  java.util.List<java.lang.String> getTitles();
                                  ^
1 error
startup failed:
Compilation failed; see the compiler error output for details.

1 error


FAILURE: Build failed with an exception.

Environment Information

  • Operating System: Ubuntu 18.04
  • GORM Version: 7.0.0
  • **Grails Version ** 4:00
  • JDK Version: Openjdk 11

Example Application

https://github.com/olavgg/dataquerybug

@graemerocher
Copy link
Contributor

Seems like a bug in the joint Groovy compiler

@olavgg olavgg changed the title Data service JPA query doesnt compile when being invoked from a Java class Data service JPA query doesnt compile when invoked from a Java class Oct 15, 2019
@jdaugherty jdaugherty transferred this issue from apache/grails-data-mapping Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants