Obscure Groovy error when class not found in resources.groovy

I 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.


I assumed because I had been using org.springframework.remoting.jaxws.JaxWsPortProxyFactoryBean, that org.springframework.ws.client.core.WebServiceTemplate would also be available, or I would at least get a message that would help me resolve the issue. Not the case.
I keep getting Caused by: groovy.lang.MissingPropertyException: No such property: org for class: resources

Here is my declaration for resources.groovy

import org.codehaus.groovy.grails.commons.ConfigurationHolder

beans = {

routingLookupService(org.springframework.remoting.jaxws.JaxWsPortProxyFactoryBean) {
serviceInterface = "com.comcast.ivr.das.services.RoutingLookupServicePortType"
wsdlDocumentUrl = ConfigurationHolder.config.routingLookupService.wsdlDocumentUrl
namespaceUri = "http://services.das.ivr.comcast.com"
serviceName = "RoutingLookupService"
endpointAddress = ConfigurationHolder.config.routingLookupService.endpointAddress
maintainSession = "false"
}

messageFactory(org.springframework.ws.soap.saaj.SaajSoapMessageFactory)

} // End beans.

The following error trace is cause by my messageFactory() declaration

13:21:44,152 ERROR [org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator.loadExternalSpringConfig: 354][] [RuntimeConfiguration] Unable to l
oad beans from resources.groovy
org.codehaus.groovy.runtime.InvokerInvocationException: groovy.lang.MissingPropertyException: No such property: org for class: resources
at grails.spring.BeanBuilder.invokeBeanDefiningClosure(BeanBuilder.java:720)
at grails.spring.BeanBuilder.beans(BeanBuilder.java:570)
at grails.spring.BeanBuilder.invokeBeanDefiningClosure(BeanBuilder.java:720)
at grails.spring.BeanBuilder.beans(BeanBuilder.java:570)
at grails.spring.BeanBuilder.invokeMethod(BeanBuilder.java:516)
at org.grails.tomcat.TomcatServer.start(TomcatServer.groovy:135)
at grails.web.container.EmbeddableServer$start.call(Unknown Source)
at _GrailsRun_groovy$_run_closure5_closure12.doCall(_GrailsRun_groovy:158)
at _GrailsRun_groovy$_run_closure5_closure12.doCall(_GrailsRun_groovy)
at _GrailsSettings_groovy$_run_closure10.doCall(_GrailsSettings_groovy:287)
at _GrailsSettings_groovy$_run_closure10.call(_GrailsSettings_groovy)
at _GrailsRun_groovy$_run_closure5.doCall(_GrailsRun_groovy:149)
at _GrailsRun_groovy$_run_closure5.call(_GrailsRun_groovy)
at _GrailsRun_groovy.runInline(_GrailsRun_groovy:115)
at _GrailsRun_groovy.this$4$runInline(_GrailsRun_groovy)
at _GrailsRun_groovy$_run_closure1.doCall(_GrailsRun_groovy:59)
at RunApp$_run_closure1.doCall(RunApp.groovy:33)
at gant.Gant$_dispatch_closure4.doCall(Gant.groovy:324)
at gant.Gant$_dispatch_closure6.doCall(Gant.groovy:334)
at gant.Gant$_dispatch_closure6.doCall(Gant.groovy)
at gant.Gant.withBuildListeners(Gant.groovy:344)
at gant.Gant.this$2$withBuildListeners(Gant.groovy)
at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
at gant.Gant.dispatch(Gant.groovy:334)
at gant.Gant.this$2$dispatch(Gant.groovy)
at gant.Gant.invokeMethod(Gant.groovy)
at gant.Gant.processTargets(Gant.groovy:495)
at gant.Gant.processTargets(Gant.groovy:480)
Caused by: groovy.lang.MissingPropertyException: No such property: org for class: resources
at resources$_run_closure1.doCall(resources.groovy:63)
at resources$_run_closure1.doCall(resources.groovy)
... 28 more

I finally tracked the issue down, and it seems that this error is actually ClassNotFound error. Once I added spring-ws-2.0.0-M1-all.jar the issue was fixed.

Conclusion

Be careful in your Groovy syntax, as the nature of certain errors are not obvious all the time.
VN:F [1.9.1_1087]
Rating: 9.0/10 (1 vote cast)
VN:F [1.9.1_1087]
Rating: 0 (from 0 votes)
Obscure Groovy error when class not found in resources.groovy, 9.0 out of 10 based on 1 rating
  • Share/Bookmark

This entry was posted on Monday, April 5th, 2010 at 9:30 am and is filed under Grails-Groovy, Java-JavaEE-J2EE. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

One Response to “Obscure Groovy error when class not found in resources.groovy”

  1. Tweets that mention Obscure Groovy error when class not found in resources.groovy | BASE Logic, Inc. -- Topsy.com Says:

    [...] This post was mentioned on Twitter by Mick Knutson. Mick Knutson said: Obscure Groovy error when class not found in resources.groovy: I have been trying to change my webservice implemen… http://bit.ly/aAYAJo [...]

Leave a Reply

You must be logged in to post a comment.