TweetThis was my first time attending SpringOne, and I must say, I was truly impressed. Springsource did an amazing job getting a wide breadth of technologies to make this a valuable conference. Some of the main sections I found personally valuable, and thus will be exploring and sharing with the team, are New Spring 3.1 [...]
READ MORE »Posts in category Grails-Groovy
Be cautious about property names in external configuration
TweetI have an External configuration file (${appName}-config.groovy) that I wanted to have a global URL declaration such as: Then what I wanted was to use these globally in this one configuration file such as: Then to display them in my index.gsp like: [DAS_SERVICE_URL]…[http://24.40.70.14:8090/DAS010WSWAR] But found they where null in the gsp. [DAS_SERVICE_URL]…[] So I had [...]
READ MORE »ConfigSlurper with dynamic property name from ConfigurationHolder config Object
TweetI spent the better part of my day trying to solve an issue where I construct a named configuration property, then I wanted to get that property from the config object. Seemed simple enough… NOT FOR ME. Maybe it was just a Friday or something but…. Here is what I found Link to this post!
READ MORE »Groovy Spring DSL Constructor Argument
TweetI have been trying to create an inner class instance of a Spring constructor argument and have been looking at the Grails documentation that states Constructor arguments can be defined using parameters to each method that reside between the class of the bean and the last closure: (from http://www.grails.org/Spring+Bean+Builder) Link to this post!
READ MORE »Using WebServiceTemplate and HTTPClient to enable Webservice read timeout
TweetI was tasked to implement read timeouts in my Spring webservices. I need to be able to implement this on dozens of webservices fairly easy and be maintainable. I also wanted to use Groovy Spring DSL for my bean declarations, and have my timeout configurable, and Integration testable. Link to this post!
READ MORE »NoClassDefFoundError org.apache.commons.lang.ArrayUtils in Grails 1.2.2 upgrade
TweetOriginally when I tried to upgrade to grails 1.2.2, I kept running into an error that I did not face in grails 1.2.1 which was an java.lang.NoClassDefFoundError: org.apache.commons.lang.ArrayUtils Link to this post!
READ MORE »Obscure Groovy error when class not found in resources.groovy
TweetI have been trying to change my webservice implementation from org.springframework.remoting.jaxws.JaxWsPortProxyFactoryBean to use org.springframework.ws.client.core.WebServiceTemplate instead. But during this effort, I did not import spring-ws-2.0.0-M1-all.jar that would provide those Classes. I assumed that I would get a descriptive error when I encountered a ClassNotFound issue but I have not. Link to this post!
READ MORE »Using resources.groovy for Spring DSL with Environment switch
TweetI was having issues trying to get my Spring DSL to operate in ./grails-app/spring/resources.groovy. I have been able to use XML formatting in resources.xml, but I wanted to leverage groovy as well as be able to replace certain beans based on environment such as using Mock objects during test. Link to this post!
READ MORE »Getting Grails external configuration working in the real world.
TweetI have gone through several books and countless Blogs to try to get a valid working WAR that would access my external configuration files, both .properties and .groovy files. Link to this post!
READ MORE »Testing POST methods with WebTest to simulation error condition.
TweetI started a new Grails project recently, and I found Canoo’s WebTest extremely easy to get working. I was even able to get Cobertura code coverage integrated to my WebTests. I found there where several error conditions that I did not test in my code. So I really wanted to simulate error POST method invocations [...]
READ MORE »
