mathifonseca / grails-slack

Grails Slack Plugin
Apache License 2.0
11 stars 4 forks source link

Validation failing on Grails 3.3.2 #12

Open bolek opened 6 years ago

bolek commented 6 years ago

Running: Grails - 3.3.2 org.grails.plugins:slack - 3.2.0

trying to send a message:

slackService.send {
  text "test"
}

results in the following error:

org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'org.grails.datastore.gorm.validation.constraints.eval.DefaultConstraintEvaluator@7289c1f2' with class 'org.grails.datastore.gorm.validation.constraints.eval.DefaultConstraintEvaluator' to class 'grails.validation.ConstraintsEvaluator'
grails.validation.Validateable$Trait$Helper.validate(Validateable.groovy:159)
grails.validation.Validateable$Trait$Helper.validate(Validateable.groovy:93)
grails.plugin.slack.builder.SlackMessageBuilder.getMessage(SlackMessageBuilder.groovy:15)
grails.plugin.slack.SlackService.buildMessage(SlackService.groovy:61)
grails.plugin.slack.SlackService.send(SlackService.groovy:15)
mathifonseca commented 6 years ago

Hi @bolek, sorry for the delay! Are you still having this issue?

akusuma2026 commented 6 years ago

Running Grails 3.3.2 org.grails.plugins:slack:3.0.0

slackService.send { text 'text' username 'username' iconUrl 'https://s3.amazonaws.com/uifaces/faces/twitter/BillSKenney/128.jpg' iconEmoji ':hamburger:' channel '#channel' markdown false linkNames 0 parse 'none' unfurlLinks false unfurlMedia false } //slackService.send - END

Error message Caused by: java.lang.AbstractMethodError: grails.plugin.slack.SlackMessage.validate(Ljava/util/List;Ljava/util/Map;[Lgroovy/lang/Closure;)Z at grails.validation.Validateable$Trait$Helper.validate(Validateable.groovy:93) at grails.plugin.slack.builder.SlackMessageBuilder.getMessage(SlackMessageBuilder.groovy:15) at grails.plugin.slack.SlackService.buildMessage(SlackService.groovy:53) at grails.plugin.slack.SlackService.send(SlackService.groovy:15) at com.redrock.supercar.SlackController.triggerSlackNotification(SlackController.groovy:17) at com.redrock.supercar.SlackController.slacknotify(SlackController.groovy:8) ... 14 common frames omitted

mathifonseca commented 6 years ago

Hi @akusuma2026, it's been a long time since I don't spend time on this plugin, maybe the error is caused by some changes on the newer Grails versions. Have you had any luck solving it?

bolek commented 6 years ago

@mathifonseca - we removed the plugin for the time being. Unfortunately, I didn't have the time to dig into this deeper. Definitely will once we have a stronger case to use the plugin.