I'll try one last time before giving up of using Groovy++ with
Grails: Which version of Groovy++ should I use with Grails 1.3.7
(Groovy 1.7.8)?
The following code works using older versions of Grails,
Groovy and Groovy++ and it works without Groovy++:
== IpAddressFilter.groovy ==
import org.springframework.web.filter.GenericFilterBean
@Typed(TypePolicy.MIXED) //groovy++
class IpAddressFilter extends GenericFilterBean {
// (...)
private boolean isAllowed(final HttpServletRequest request) {
// (...)
}
// (...)
}
== resources.groovy ==
ipAddressFilter(IpAddressFilter) {
def conf = SpringSecurityUtils.securityConfig
ipRestrictions = conf.ipRestrictions
rolePrefix = "ROLE_"
springSecurityService = ref("springSecurityService")
}
But, when I try groovypp-all-0.4.248_1.7.10.jar or
groovypp-all-0.4.246_1.7.10.jar (I'm using a newer version to make
everyone happy, including Groovy Eclipse), 'grails run-app' ends with
the exception below. Alex, am I missing something? Thanks!
== beans ==
2011-06-01 15:46:02,919 [main] ERROR spring.GrailsRuntimeConfigurator
- [RuntimeConfiguration] Unable to load beans from resources.groovy
org.codehaus.groovy.runtime.InvokerInvocationException:
java.lang.VerifyError: (class: myapp/IpAddressFilter, method:
isAllowed signature: (Ljavax/servlet/http/HttpServletRequest;)Z)
Register 6 contains wrong type
at grails.spring.BeanBuilder.invokeBeanDefiningClosure(BeanBuilder.java:723)
at grails.spring.BeanBuilder.beans(BeanBuilder.java:573)
at grails.spring.BeanBuilder.invokeBeanDefiningClosure(BeanBuilder.java:723)
at grails.spring.BeanBuilder.beans(BeanBu
And yes, groovypp-all-0.4.248_1.7.10.jar should be perfectly OK.
2011/6/1, Alex Tkachman <alex.t...@gmail.com>:
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
>