simplicityitself / grails-gwt

New Grails GWT Plugin
Other
23 stars 18 forks source link

DefaultGwtServiceInterfaceGenerator.getPackage() incorrectly assumes that all 'expose' are strings #15

Closed cdandoy closed 11 years ago

cdandoy commented 11 years ago

Not all plugins expect the 'expose' to be a String. For example, the grails-cxf pluging: https://github.com/thorstadt/grails-cxf#exposing-classes-via-soap

This makes your plugin incompatible with the cxf plugin:

| Error 2012-11-15 06:41:19,480 [localhost-startStop-1] ERROR plugins.DefaultGrailsPluginManager - Error configuring dynamic methods for plugin [gwt:0.7.1]: groovy.lang.MissingMethodException: No signature of method: or g.grails.cxf.utils.EndpointType.startsWith() is applicable for argument types: (java.lang.String) values: [gwt] Message: groovy.lang.MissingMethodException: No signature of method: >org.grails.cxf.utils.EndpointType.startsWith() is applicable for argument types: (java.lang.String) values: [gwt]

The fix is simple. DefaultGwtServiceInterfaceGenerator.groovy:110 needs to be replaced with: def gwtExposed = exposeList?.find { it instanceof String && it.startsWith('gwt') }

cdandoy commented 11 years ago

This was already fixed by http://jira.grails.org/browse/GPGWT-103. Thanks.