Questions tagged [grails-2.2]

Grails is a web application framework that uses Groovy and Java. The framework is oriented around high-productivity application development, and uses common Java technologies such as Hibernate and Spring.

Grails is a web application framework that uses Groovy and Java. The framework is oriented around high-productivity application development, and uses common Java technologies such as Hibernate and Spring.

136 questions
0
votes
0 answers

Is there a way to follow a redirect url while doing integration testing in grails?

I am using grails 2.2 An integration test looks like this reservationController.params["participant"] = ["firstName": "Hello", "lastName": "Hello", "gender": "MALE", 'phone': '1234567890','email': 'john@doe.com'] def mm =…
kofhearts
  • 3,607
  • 8
  • 46
  • 79
0
votes
1 answer

Creating SSL Certificate Server failed to start: com.ibm.crypto.tools.KeyTool error?

i am using grails 2.2. I am running the grails app using the following command run-app -noreloading -https -Dgrails.server.port.https=8443 -Dgrails.server.port.http=8080 I am getting the following error on starting the app "C:\Program…
kofhearts
  • 3,607
  • 8
  • 46
  • 79
0
votes
1 answer

custom page size in pdfbox?

In pdfbox is there a way to set a custom page size for example 6" x 8". This is the size of runner bib card. The only sizes that seem to be available are the following: ReportPageSize pageSize = ReportPageSize.AVERY_5160; PdfDocInfo doc = new…
kofhearts
  • 3,607
  • 8
  • 46
  • 79
0
votes
1 answer

xml declaration/header missing when generating xml?

I am using the following code to dynamically generate xml def testXML(){ render( contentType:"text/xml" ) { book() { author( name:'author') } } } The xml file is missing the xml header
kofhearts
  • 3,607
  • 8
  • 46
  • 79
0
votes
0 answers

accessing session in gsp throws 'Cannot create a session after the response has been committed' error?

In the base layout, i have the following code to show the cart count.
kofhearts
  • 3,607
  • 8
  • 46
  • 79
0
votes
1 answer

Creating slim Grails war file using common jars in Tomcat

The generated Grails war file with all default jars is around 30 MB. I need to reduce this size for frequent test deployments to remote tomcat container. So I am trying to use the common libs Tomcat technique. The process is not working for some…
kofhearts
  • 3,607
  • 8
  • 46
  • 79
0
votes
2 answers

generated war file is 20mb without any plugins in grails 2.2?

I am creating test apps. I need to upload them to remote server so the generated war size is important. The test apps mostly donot use plugins. Even after removing all default plugins the generated war is 20 mb. Is there a way to reduce the war file…
kofhearts
  • 3,607
  • 8
  • 46
  • 79
0
votes
1 answer

load jquery library in grails 2 is failing?

I was following the manual https://grails.github.io/grails2-doc/2.2.0/guide/single.html#ajax there it says to put the following tag in head section I created a sample application and a test controller called…
kofhearts
  • 3,607
  • 8
  • 46
  • 79
0
votes
1 answer

where are dependencies installed in the production server?

I am using Grails 2.2 and the plugins are really old. For some reason the dependencies are not resolving. I think it used to work because the plugins and files were in my local cache. From the documentation grails stores the dependencies locally in…
kofhearts
  • 3,607
  • 8
  • 46
  • 79
0
votes
1 answer

does the controller action stop immediately when page timeout occurs?

I have a controller action that does heavy computation and takes 10 minutes or more to complete. def timeConsumingOperation(){ } when i request the url /application/timeConsumingOperation after sometime of waiting the browser shows timeout or…
kofhearts
  • 3,607
  • 8
  • 46
  • 79
0
votes
0 answers

how does assertequals work for domain objects?

In this piece of integration test code it is asserting a list of models. How does assertEquals work for models. Does it check if both models have same id? def model = controller.list() assertNull model.selection.endDate assertNull…
kofhearts
  • 3,607
  • 8
  • 46
  • 79
0
votes
4 answers

is there a way to logout a specific user or all users from database?

I am using grails 2.2 with spring security. I am using MYSql for database. I am wondering whether there is a way to logout a user or all users by clearing data in mysql database.
kofhearts
  • 3,607
  • 8
  • 46
  • 79
0
votes
1 answer

efficient way to check database connection?

What is the fastest database connection check in grails? I need to create an endpoint which will be called again and again by a script so this needs to be efficient. The database goes down fom time to time and this script will call this api that…
kofhearts
  • 3,607
  • 8
  • 46
  • 79
0
votes
1 answer

meta replacing same method in two different tests not working?

Test controller is as follows def justTest(){ def res = paymentService.justTest() [status: res.status] } Test service method is as follows def justTest(){ } Now the two test cases are as follows. Payment service method justTest was…
kofhearts
  • 3,607
  • 8
  • 46
  • 79
0
votes
1 answer

No call to expected at this point. Still 1 call(s) to expected error

In the integration test, i am using groovy mock feature to mock a service method like shown below: def mock = new groovy.mock.interceptor.MockFor(PaymentService) mock.demand.processPayment(){ a, b, c-> ['status': true, 'approved': true,…
kofhearts
  • 3,607
  • 8
  • 46
  • 79