gpc / jms

JMS integration for Grails.
http://grails.org/plugin/jms
16 stars 28 forks source link

JMS Plugin 2.0.0M1 incompatible with Grails 3.2.10+ #33

Closed dseltzer closed 7 years ago

dseltzer commented 7 years ago

When attempting to run a Grails 3.2.10 app with the JMS plugin version 2.0.0M1, a NoClassDefFoundException is thrown on org.codehaus.groovy.grails.commons.GrailsClassUtils.

It appears that in Grails 3.2.10 or earlier that GrailsClassUtils class has been moved from org.codehaus.groovy.grails.commons to grails.util. Additionally it looks like the GrailsClassUtils class was refactored and methods such as GrailsClassUtils.getPropertyName( Class<?> clazz ) have been moved to other classes (in that method's case grails.util.GrailsNameUtils.groovy). The GrailsClassUtils class and the getPropertyName( Class<clazz> ) method are used in version 2.0.0M1 of the JMS plugin in the grails.plugins.jms.listener.ServiceInspector.groovy class.

I was able to work around this issue by creating a class in the <grails-project>/src/ org/codehaus/groovy/grails/commons directory called GrailsClassUtils that extends the grails.utils.GrailsClassUtils and implements a getPropertyName( Class<?> clazz ) method that calls the grails.utils.GetNameUtils.getPropertyNames( Class<?> clazz ) method. This workaround allowed me to run the project and send and receive messages from a message broker topic.

dseltzer commented 7 years ago

It appears this issue may have been addressed in: https://github.com/gpc/jms/commit/5e9b80aecf6ea79a47b5441e54e577811af74554.

I will try RC2.