Questions tagged [grails-3.1]

Version 3.1 of the grails Open Source web application framework that uses the Spring, Hibernate, Groovy programming language, which is in turn based on the Java virtual machine (JVM) and Java. Use it in addition to the grails and grails-3 tags in specific question to grails 3.1.

From the Grails documentation:

What's new in Grails 3.1?

Grails 3.1 is at the milestone stage, but already includes the following new features.

Spring Boot 1.3 and Spring 4.2

Grails 3.1 has been upgraded to Spring Boot 1.3 and Spring 4.2.

Improvements to Grails 3 Profiles

Profile Publishing and Repositories

The following improvements are available in Grails profiles:

  • Profiles are now published as regular JAR files to any Maven compatible repository (Artifactory, Nexus etc.).
  • Additional profiles can be created easiy with the new create-profile command.
  • Profiles can now contribute to the generation of the build
  • Profiles can now have one or many features

For more information see the new section on Profiles in the user guide.

175 questions
1
vote
1 answer

Grails `respond` returns null

I want to send validation errors back to a different page (add), so I have this for my save action: @Transactional(readOnly = false) def save(AddDomainCommand command) { if (command.validate() && session.isLoggedIn && session.publisher) { …
Alex
  • 8,093
  • 6
  • 49
  • 79
1
vote
1 answer

grailsLinkGenerator issue in Grails 3 interceptor?

I am getting an error in my interceptor for Grails 3.1.4 The return type of java.lang.Object getGrailsLinkGenerator() incompatible with grails.web.mapping.LinkGenerator in grails.artefact.controller.support.Response Redirect The code that I…
Sachin Aryal
  • 781
  • 14
  • 36
1
vote
0 answers

Grails use SQLQuery result as transient value in domain class rendering

Let's say i have the following domain classes: The first domain class Tag.groovy allows me to build a dynamic category structure with different layers (layer1, layer2 and layer3). Each activity from Activity.groovy belongs to a certain category and…
feuernurmitm
  • 312
  • 2
  • 11
1
vote
1 answer

Can I call a grails service in a domain object constructor?

Grails version: 3.1.2 I have a versioning service (VersionService) that I would like to call whenever I create a new instance of a domain object (VersionedDomainClass). I would like the VersionedDomainClass to handle calling the service, but when I…
1
vote
2 answers

Running a controller Unit Test works in IntelliJ but not using grails test-app

I am facing a small challenge on which i do not know how to tackle it. In my current application we are using RabbitMQ as an AMQP broker (using ​spring-rabbit​) and we successfully have written integration-tests where the RabbitMQ ConnectionFactory…
Marco
  • 15,101
  • 33
  • 107
  • 174
1
vote
1 answer

Grails 3 Static Resource Cache Configuration

My Grails 3 website includes many static resources like js and css, I found all these static resources are set to "no-cache" and "max-age=0" by default, which cause every time reloading the page, all these static resources have to be downloaded…
Leo
  • 142
  • 1
  • 3
  • 11
1
vote
2 answers

Grails 3.1 JSON-Views, rendering a Category Tree

I'm using Graisl 3.1.1, rest-api profile. I'm trying to build a Category Tree but I haven some problems rendering the categories in JSON-Views. I'm using json templates, one for the parent and another for the child. Basically I want to generate a…
Adrian Rodriguez
  • 452
  • 4
  • 19
1
vote
2 answers

GORM doesn't handle mapping of associations which have a further association in their composite primary key

I'm trying to map existing tables in a GORM/Grails app. Most of the tables have composite primary keys (not my choice). I'm finding that when I map an association to a class (parent of a child) where the composite key of the parent class contains an…
U47
  • 193
  • 14
1
vote
1 answer

CRUD using Grails 3.1.x Spring Security with Rest

Trying to develop a web CRUD application using Grails 3.1.X Spring Security with REST. Any tutorials with examples would help me.
Amarnath R
  • 973
  • 3
  • 14
  • 33
1
vote
0 answers

Hibernate giving a NullPointerException when starting my Grails 3.1.0 Project

I have created a Grails 3.1.0 project with 5 Domain classes 3 of the Domains are the User, Role and UserRole from the Spring Security Plugin and the other 2 are in a 1 to many relationship. I am connecting to MySQL 5.6 and my dbCreate is set to…
1
vote
0 answers

Upgrade webapp Grails 2 to Grails 3 : cannot see index.html anymore

I just updated my Grails 2 webapp project (Grails back end and Angular as front-end) to Grails 3. I moved all the web-app folder from my grails2 project to src/main/webapp (tried also in src/main/resources) folder. Now running bootRun…
Jérôme
  • 11
  • 3
0
votes
0 answers

Can't run Grails application, return error exception

I was trying to run an old grails 3.1.1 with the gradle.properties grailsVersion=3.1.1 gradleWrapperVersion=2.9 But i receive the error message below, any advice in this? org.springframework.beans.factory.BeanCreationException: Error creating bean…
Iverson
  • 179
  • 3
  • 11
0
votes
0 answers

Grails 3.1 - Null properties of domain instance is saving in mongodb

I am saving instance in mongodb but getting some null properties saved. I have used below configuration in Application.yml to use MongoSession grails: mongodb: engine: mapping I am using below code for saving my instance but it was saving null…
0
votes
1 answer

Grails 3.1.16 Interceptors not filtering on method

I'm trying to use Grails interceptors to match specific uri having specific HTTP methods. The method argument of the match method is however ignored, despite the fact that I upgraded my Grails version from 3.1.1 to 3.1.16, where that issue should be…
Heschoon
  • 2,915
  • 9
  • 26
  • 55
0
votes
1 answer

Grails 3.1.16: No Datastore Session bound to thread, and configuration does not allow creation of non-transactional one here grails

I am getting No Datastore Session bound to thread, and configuration does not allow creation of non-transactional one here grails while calling DomainMappingCached() function. Function returns the class object of DomainMapping where as function…
Zaid Khan
  • 54
  • 1
  • 6