groovy « Development « Spring Q&A





1. Grails getSomething(int i) method doesn't compile    stackoverflow.com

Can someone tell me why this Grails domain class will not compile (at runtime)?

class Person {
    String name

    String getSomething(int i) {
    ...

2. Reading InBox With Grails/Groovy?    stackoverflow.com

DO I need to inject the JavaMail Objects into the application context and access my inbox the old fashion way or is there some "magic" in grails to handle it for ...

3. Inheritance and subflows with Spring WebFlow in grails    stackoverflow.com

Spring WebFlow supports some advanced reuse features like flow inheritance and subflows. Using this features in SWF xml definitions is pretty easy, for example:

<flow parent="parent">
<subflow-state id="addGuest" subflow="createGuest">
Can I use these features ...

4. Groovy/Grails validations and hasFieldErrors issue    stackoverflow.com

I have created a custom tag that looks like this:

def textField = { attrs ->
    def field = attrs.name.split('\\.')[-1]
    log.error("--------- Field is ${field}")
   ...

5. Grails domain class initialization    stackoverflow.com

My Grails app has the following Spring bean defined in spring/resources.groovy

calendarService(CalendarService) { bean ->
    bean.initMethod = "init"     
}
This method looks something like:
class CalendarService {
 ...

6. Groovy Meta Class Enhancements    stackoverflow.com

I am currently working in a spring application and using groovy for few tasks I have written few groovy meta class enhancements that i want to use application wide, dont have ...

7. Unit Testing Groovy Class Spring and Visibility    stackoverflow.com

I am attempting to test a Groovy class in Spring. I basically have a Java interface. And wrote a Groovy class to implement that interface. I put the Groovy class in the ...

8. Wiring portlets with a grails application context, or deploying multiple portlets through grails?    stackoverflow.com

I currently have a grails application that gets deployed through liferay. Now, I need to build some portlets, but I'm unsure what the best way is to expose the grails domain ...

9. Building a grails application as a dependency referenced from another project?    stackoverflow.com

What's the best way to use a grails application as a dependency? With the grails maven publisher plugin, I can push wars, but I can't seem to access the ...





10. grails remoting plugin - always 404?    stackoverflow.com

I'm trying to expose a remote interface to a spring web application, and I'm having issues, always getting 404. What's wrong with my setup below? Grails:
services - package mypackage

class RemoteUserService implements RemoteUserServiceInterface ...

11. Dependency Injection with Grails Spring DSL    stackoverflow.com

When I use the Spring DSL provided by Grails is it possible to do constructor injection. If so, an example would be much appreciated. If constructor injection is not possible, is there ...

12. Environment-specific web.xml in grails?    stackoverflow.com

What's the best way to build environment-specific web.xml entries in grails? I need to make certain modifications for production only, as they break running locally. Any thoughts?

13. How to handle externally stored default values in Domain Class    stackoverflow.com

I want to be able to set default values for some fields in my domain classes. Till now I had a class which stored a Map of settings for my whole project, ...

14. Import Grails application context of inplace plugin    stackoverflow.com

I have a project setup that consists of a regular Grails application and an inplace Grails plugin. My Grails application uses the inplace plugin. Inside my inplace plugin I autowire a ...

15. Can we write Spring in Grails?    stackoverflow.com

I want to know whether we can write code for Spring and make use of that Spring framework, if i work in Grails?

16. Grails Web Flow first state    stackoverflow.com

A few questions about the first state of a Grails web flow:

  1. Is it possible to have multiple start states?
  2. Is it possible for the first state to be an action state?
  3. Assuming the ...





17. Grails create link to webflow    stackoverflow.com

Is it possible to use the Grails tag createLink to create a link to (the first state of) a Grails webflow?

Update

I'm asking how to create a link to the ...

18. dependency inject Grails Webflow    stackoverflow.com

Is it possible to inject a Spring bean into a Grails webflow? I tried the following

class CheckoutController {

    ShoppingService shoppingService

    def checkoutFlow = {
  ...

19. How do you read multiple lines using readLine in Groovy through SpringSource Eclipse?    stackoverflow.com

I am trying to read multiple inputs from the console in Groovy 1.7.10 in Spring Source Suite 2.7.1 (multiple in.readLine()), but the console only seems to allow me to input the ...

20. Calling Spring component from groovy    stackoverflow.com

I have a spring-based java application with some useful components. As a part of the system I have a groovy script, to process some reports. I would like to call a ...

21. Using GMock with Spring how to I setup up a spring context only once for several tests?    stackoverflow.com

I find that when running multiple gmock tests using and in memory database I get errors about table already being there. It seems to run the spring context creation ...

22. How to get LocaleResolver in src/groovy file    stackoverflow.com

In my groovy file if I do , RequestContextUtils.getLocaleResolver(RequestContextHolder.currentRequestAttributes().getCurrentRequest()) But its giving me NPE.. Trying for some more time.. However ,

RequestContextUtils.getLocale(RequestContextHolder.currentRequestAttributes().getCurrentRequest())
gives me correct locale.. Don't know why ??

23. getOutputStream() has already been called for this response on second servlet request    stackoverflow.com

hello i have a problem that I cannot put my finger on.....

servletResp.setHeader("Expires","0")
servletResp.setHeader("Cache-Control","must-revalidate, post-check=0, pre-check=0")
servletResp.setHeader("Pragma","public")
servletResp.setHeader("Content-Disposition","inline; filename=invoice.pdf")

servletResp.setContentType("application/pdf")
servletResp.setContentLength( outStream.size())
servletResponseStream.write(outStream.toByteArray())
outStream.close()
servletResponseStream.flush()
servletResponseStream.close()
In the above code assume that outStream has a read in pdf file. The code ...

24. Problem adding Grails/Groovy support.    forum.springsource.org

Hi, could you please make sure that your proxy - if required - is correctly configured. The update site should be accessible as I just tested this. You can try this ...

25. Disapeared Spring support after added Groovy support.    forum.springsource.org

Hi I've just added Groovy support to STS 2.3.2 through dashboard window, and after restarting STS it seems that STS lost support for Spring and tc Server. Dashboard, Spring Perspective, Spring ...

26. Can't install groovy or grails plug ins    forum.springsource.org

I'm trying to install the groovy and grails extensions to STS 2.5.2. I get the following error message: Problems occurred while performing installation: Communication with repository at http://dist.springsource.com/release...vy-grails/e3.6 failed. Communication with ...

27. 2.5.1/2.5.2: Groovy bug when compiling.    forum.springsource.org

2.5.1/2.5.2: Groovy bug when compiling. Got this one about 10 times today eclipse.buildId=2.5.1.201011111000-RELEASE java.version=1.6.0_02 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_AU Framework arguments: -product com.springsource.sts.ide Command-line arguments: -os win32 ...

28. Installing Groovy/Grails plugins without network    forum.springsource.org

Installing Groovy/Grails plugins without network Hi, I have been using STS for Grails development for some time now. It is an excellent tool and much superior to Netbeans 6.9.1 imho. Because ...

29. Building Groovy projects?    forum.springsource.org

Building Groovy projects? I'm trying to build a simple groovy project in STS 2.5.2 with the groovy extension installed. I can run the project in the IDE, but I doesn't seem ...

30. groovy:script with customizer bug?    forum.springsource.org

Hello, Mark & Oleg, I've tried to use the new implementation of GroovyScriptExecuting when my script was inline and i've added to him the customizer. In my case the script is ...

31. Problem with Spring + Groovy    forum.springsource.org

Mar 1st, 2011, 04:51 PM #1 gwofu View Profile View Forum Posts Private Message Junior Member Join Date Mar 2011 Posts 4 Problem with Spring + Groovy Hi, I am using ...

32. Updated groovy-eclipse plugin, can't start editor    forum.springsource.org

Mar 1st, 2011, 05:31 PM #1 dr_j View Profile View Forum Posts Private Message Junior Member Join Date Jun 2010 Location Dallas Area Posts 15 Updated groovy-eclipse plugin, can't start editor ...

33. spEL using groovy?    forum.springsource.org

spEL using groovy? Hi to all, in reading the ref manual in section... 6.5.10.1 The #this and #root variables The variable #this is always defined and refers to the current evaluation ...

34. Groovy-Eclipse Automatic Update Fails    forum.springsource.org

The STS update notification informs me of a new version of Groovy-Eclipse available, but then it complains: Code: Cannot complete the install because one or more required items could not be ...

35. Header Enricher & Groovy    forum.springsource.org

Header Enricher & Groovy Hello, Mark, Oleg & Dave You all are authors of integration with Groovy. So, here's my wish to improve that solution. Why not implement an evalutaion of ...

36. How to install Groovy-Eclipse on closed network?    forum.springsource.org

I've been looking unsuccessfully for an archive file download so that I can install Groovy support on a closed network. Can anyone point me in the right direction? Also, is there ...

37. "Unreachable catch block" when java code calls groovy code    forum.springsource.org

"Unreachable catch block" when java code calls groovy code I have this annoying situation in my IDE (STS 2.6.0.RELEASE); we have a java class that invokes methods on a groovy class. ...

38. Newbie Question: Using Groovy on file sample    forum.springsource.org

May 4th, 2011, 05:42 PM #1 jshingler View Profile View Forum Posts Private Message Junior Member Join Date May 2011 Posts 10 Newbie Question: Using Groovy on file sample I am ...

39. Groovy plugin can't resolve Grab'd dependencies    forum.springsource.org

I pasted the HTTPBuilder example from http://groovy.codehaus.org/HTTP+Builder and the editor highlights the "import static groovyx.net.http.ContentType.*" with "Groovy:unable to resolve class groovyx.net.http.ContentType" and the "new HTTPBuilder" with a similar error. I can ...

40. How to let Groovy dynamic    forum.springsource.org

this is my code: Code: applicationContext.xml: 1 classpath:org/test/GroovyAction.groovy error ...

41. Getting senseless errors on groovy editor such "Groovy:unable to resolve class E"    forum.springsource.org

Hi, we occasionally obtain unreasonable errors for groovy source: Groovy:unable to resolve class E The type Object is not generic; it cannot be parameterized with arguments They mostly occur in ...

42. Groovy+Grails+Spring    forum.springsource.org

Hi Ccoomer, I have a question, do you know any book, which guide me to learn bsics of groovy as well grils? If anybody has the answer of the question, please ...

43. Help with groovy console    forum.springsource.org

I am trying to add test data via Groovy Console in STS. I have created a domain class Quote and defined the variables. when trying too add the data via the ...

44. Transformer + Groovy    forum.springsource.org

Transformer + Groovy Hi! I would like to implement custom Transformer component. In my use case I have some kind of message with a type. Depending of the message's type I ...

45. Groovy compiler error, Jochen confirmed groovy bug, anyway to mute it?    forum.springsource.org

Groovy compiler error, Jochen confirmed groovy bug, anyway to mute it? Andy et al, hi. Jochen confirmed this bug over on Groovy user and has no solution until 1.8.3 ;-( http://groovy.329449.n5.nabble.com/B...td4856092.html ...

46. Groovy support in sandbox    forum.springsource.org

Groovy support in sandbox Hi, I checked out the Groovy scripting support from sandbox a couple of day ago and tried to build it. Since the main code seems to be ...

47. Groovy Config for Spring 2.0    forum.springsource.org

Groovy Config for Spring 2.0 I got the following to work: Code: package blog.solomon.crazybob; import blog.solomon.spring.config.ProgrammableConfigurer; class MyConfigrurer extends ProgrammableConfigurer { void configure() { // "tee" definition... notice that TeeImpl is ...

48. cross reference of groovy objects fails    forum.springsource.org

cross reference of groovy objects fails Hi, I am trying to incorporate groovy into my java application, via the spring framework. The problem I am experiencing is that classes loaded this ...

49. Using Groovy classes in ApplicationContext    forum.springsource.org

Using Groovy classes in ApplicationContext Hello everybody, I'm working with spring for a few weeks now but at the moment I am stuck. I use groovy as the primary language and ...

50. Practices on Using Groovy, Beanshell and JRuby in Spring 2.0    forum.springsource.org

Practices on Using Groovy, Beanshell and JRuby in Spring 2.0 I am using Spring 2.0 dynamic language support in my current project, including both Beanshell, Groovy, JRuby and Java. Dicussion on ...

51. Basic Rules on Using Groovy, Beanshell and JRuby in Spring 2.0    forum.springsource.org

Basic Rules on Using Groovy, Beanshell and JRuby in Spring 2.0 I am using Spring 2.0 dynamic language support in my current project, including both Beanshell, Groovy, JRuby and Java. Dicussion ...

52. Autowiring does not work with Groovy    forum.springsource.org

Autowiring does not work with Groovy Hi I have a regular Java bean and a Groovy bean: Code:

53. Groovy Support Broken with 1.1-beta-2    forum.springsource.org

Groovy Support Broken with 1.1-beta-2 I am attempting to upgrade to Groovy 1.1 beta into an application that has been using Spring and Groovy 1.0. (I want to be able to ...

54. Groovy + DWR    forum.springsource.org

55. Groovy Plugin & Spring Plugin in Eclipse 3.4    forum.springsource.org

Hello, does someone has an simple example how use groove with in the Spring IDE. I try to create on myself, but it won't run. I get this error message: java.io.FileNotFoundException: ...

56. importing Groovy classes without Interface and compiling    forum.springsource.org

Hi, it is possible to import Groovy classes which don't implement an interace and which where not compiled ? the groovy class is just compiled for comiling the class that should ...

57. Adding Groovy as CEL to spring modules validatio    forum.springsource.org

Hey all, As a work I did for our application, I added support for groovy expression (as addition to the Valang and Ognl built in ones). Some notes: 1. The expressions ...

58. Spring IDE install fails with no repo for org.codehaus.groovy/osgi.bundle/1.5.7.20081    forum.springsource.org

Spring IDE install fails with no repo for org.codehaus.groovy/osgi.bundle/1.5.7.20081 I was just trying to install the Spring IDE onto my existing Eclipse 3.4.2 installation, but it failed with the following error: ...

59. Spring 3.0M3 and making Groovy Script as expression language    forum.springsource.org

I was looking into Spring 3.0M3 documentation http://static.springsource.org/sprin...html/ch07.html Its mentioned there "SpEL is based on an technology agnostic API allowing other expression language implementations to be integreated should the need arise." ...

60. problems installing the groovy plugin    forum.springsource.org

problems installing the groovy plugin Hi All, I am trying to install the groovy plugin from :"http://dist.codehaus.org/groovy/distributions/update/ " on my spring STS (version 1.0.0), from the regular path of help->software updates->find ...

61. Groovy or Grails real project references    forum.springsource.org

Groovy or Grails real project references Hi. I am learning Groovy and Grails and it's one of the most incredible steps in knowledge and useful "day by day tools" I've ever ...

62. Any modeling tools support Groovy/Grails?    forum.springsource.org

Does anyone know of a free/affordable graphical modeling tool that generates Groovy/Grails domain classes from a model? I looked at Enterprise Architect from Sparx (http://www.sparxsystems.com.au/) but it doesn't seem to support ...

63. Spring Framework in Groovy Project    forum.springsource.org

Spring Framework in Groovy Project I'm fairly new to using spring framework so hang with me. I'm trying to inherit some properties from a parent class using spring. For example, I ...

64. Parameterizing refresh-check-delay attribute for groovy    forum.springsource.org

Hi, I have a bean definition as given below Code: I would like to pass the value for "refresh-check-delay" as based on some ...

65. Parameterizing refresh-check-delay attribute for groovy    forum.springsource.org

Hi, I have a bean definition as given below Code: I would like to pass the value for "refresh-check-delay" as based on some ...

66. Parameterizing refresh-check-delay attribute for groovy    forum.springsource.org

Hi, I have a bean definition as given below Code: I would like to pass the value for "refresh-check-delay" as based on some ...

67. groovy/grails support installation does not start    forum.springsource.org

hi, since today i'm working on ubuntu 9.10 and if i want to install grails and groovy, nothing happened after clicking on the install button. no error, no update. can you ...

68. Groovy plugin colors do not work in maven project    forum.springsource.org

Groovy plugin colors do not work in maven project when creating a maven project and changing the "nature" of the project to groovy, the *.groovy files do not respond to any ...

69. groovy unable to resolve class    forum.springsource.org

sts 2.2.1 grails-1.1.1 Editing UserController file, sts editor (red x's) a line with tooltip "groovy unable to resolve class user" domain User exists! then I do a run-app and the app ...

70. groovy generated setters    forum.springsource.org

groovy generated setters I have a groovy class with setters and getters (auto generated) that I am trying to set through Spring. The Spring builder fails in Eclipse since it says ...

71. Groovy catch statement error    forum.springsource.org

72. Resources.groovy    forum.springsource.org

I am noticing that the STS compiles and copies the resources.groovy file to the target/classes dierctory even if it has not been changed at all (or nothing has changed in the ...

73. groovy enum problem    forum.springsource.org

groovy enum problem Hi - I am brand new to the STS, using it for grails development. I have a groovy enum which gets the following error from STS: Groovy:The class ...

74. Greclipse runs into "Groovy bug" in simplest Projects    forum.springsource.org

Jan 31st, 2010, 02:15 PM #1 tempestrider View Profile View Forum Posts Private Message Junior Member Join Date Jan 2010 Posts 3 Greclipse runs into "Groovy bug" in simplest Projects Hi, ...

75. Unable to install Groovy and Grails Extensions    forum.springsource.org

Unable to install Groovy and Grails Extensions Hi there, When I try to install Groovy and Grails extensions, I get the following error Error Thu Mar 11 14:04:29 EST 2010 Unable ...

76. extends in groovy script    forum.springsource.org

extends in groovy script Code: public class LeadAnlystReturnedAssignmentEmail implements EmailNotificationService { String text="Reason for Return: {reason_for_return}
"+ "Audit Nunber: {audit_number}
"+ "Program: {program}
"+ "EIN: {ein}
"+ "Grantee Name: {grantee_name}
"; @Override public MailDTO getMailDTO(WFEntity wfEntity, ...

77. Cannot add Groovy/Grails support    forum.springsource.org

Cannot add Groovy/Grails support Hi, I installed STS2.3.2, I then installed extensions Groovy Eclipse and Grails support. After restarting STS (as suggested), I can see the Grails support extension is marked ...

78. Overkill? Weblogic + Spring + Webflow + Groovy/Grails    forum.springsource.org

I'm new to J2EE and have been fooling around with various app servers. I'm currently investigating Weblogic. Some of their documentation talks about using Spring on top of the server. I'm ...

79. Groovy:unable to resolve class although same package (again)    forum.springsource.org

Groovy:unable to resolve class although same package (again) After updating to STS 2.3.3.M1 and grails 1.3.1, I first thought that my problem described in thread http://forum.springsource.org/showthread.php?t=89927 was gone, but it re-appeared. ...

80. How to add groovy source to classpath    forum.springsource.org

It's a newbie question regarding integration groovy to Java app. I have STS 2.3.0 with Groovy plugin and try to add groovy scripts to my Java Spring Integration project. For testing, ...

81. How to add groovy source to classpath    forum.springsource.org

I post the same question on Spring Development Tool (STS) forum but has no responses so far. Appreciate if this forum can give me some ideas: It's a newbie question regarding ...

82. script Groovy, unable to refresh it    forum.springsource.org

Sep 20th, 2010, 04:28 AM #1 sylvek View Profile View Forum Posts Private Message Junior Member Join Date Sep 2010 Posts 7 script Groovy, unable to refresh it Hello everybody, I ...

83. How to use Groovy Incremental Compiler in my application?    forum.springsource.org

I want to use use "org.eclipse.jdt.groovy.core" to compile my groovy/java files and load the result with "acceptResults" runtime. It is not with gmaven or gant. Which jar balls should be included? ...

84. Is there a way to re-run the last ran Groovy script?    forum.springsource.org

At the moment the closest option (in OS X) is Command+Shift+F11 which pops up the "Run As" dialog. An option is necessary to re-run the last ran configuration: if It was ...

85. Using Spring + groovy -> @Autowired used in Groovy not working?    forum.springsource.org

Using Spring + groovy -> @Autowired used in Groovy not working? Hi there, I'm currently facing some issues using Spring 3.0 and Groovy 1.7.3, espacially the @Autowire annotation. Let me explain ...

86. Groovy & Unused Imports    forum.springsource.org

Groovy & Unused Imports I couldn't find any existing issue or forum posts for this, so ... I'm in the process of cleaning up some issues on the project I've been ...