Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8379607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:14:08+00:00 2026-06-09T16:14:08+00:00

I have a Grails webapp running a Spring Integration inbound-channel-adapter that is configured to

  • 0

I have a Grails webapp running a Spring Integration inbound-channel-adapter that is configured to receive emails and there is a service activator that processes the message. This service activator pulls out pieces and parts of the email based on business rules and then needs to update Grails domain objects and save those changes to the database.

Spring Integration service activator code snippet:

HashMap<String, Serializable> params = new HashMap<String, Serializable>();
params.put("notification", notification );
params.put("notificationType", notificationType );
params.put("sender", notificationSender );
InvokerHelper.invokeMethod(NotificationCreationService.class, "createNotification", params);

Grails NotificationCreationService action snippet:

def static createNotification() {
    if (params.notification != null && params.notificationType != null && params.sender != null) {
        String notification = params.get("notification") as String
        NotificationType notificationType = params.get("notificationType") as NotificationType
        String sender = params.get("sender") as String

        def NotificationMessage notificationMessage = null
        notificationMessage = new NotificationMessage()
        notificationMessage.notification = notification
        notificationMessage.save(flush: true)
        ...
    }
}

NotificationMessage is a standard Grails domain class

Error generated:

org.springframework.integration.MessageHandlingException: 
    groovy.lang.MissingMethodException: No signature of method: mycompany.pyproject.mypackage.NotificationMessage.save() is applicable for argument types: () values: []
    Possible solutions: save(), save(boolean), save(java.util.Map), wait(), any(), wait(long)

If I change createNotification() to not be static then I get the following:

org.springframework.integration.MessageHandlingException: 
    groovy.lang.MissingMethodException: No signature of method: static mycompany.pyproject.mypackage.NotificationCreationService.createNotification() is applicable for argument types: (java.util.HashMap) values: [...]       
    Possible solutions: createNotification(java.util.HashMap), createNotification(java.lang.String, napa.changedetection.alert.NotificationType, java.lang.String)

I’ve tried other combinations of InvokeHelper.invokeMethod() and the definitions of the Grails actions with similar results. InvokeHelper has several other methods for invoking methods as well as setting different properties, but I haven’t found the magic combination to make this work and any internet searched have turned up very little as far as example code for InvokeHelper.

Ideally, the Grails action would not be static and it would use the standard params mechanism. This would allow me to call the same action directly from the Grails code as well as from the Spring Integration service activator via the InvokeMethod functionality.

Does anyone have any thought on how to tie this together?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T16:14:09+00:00Added an answer on June 9, 2026 at 4:14 pm

    You should not use InvokeHelper now, Grails 2 injects signature at compile time for java purposes (except dynamic finders, but you can guess why).

    In your Java bean I would inject notificationCreationService using :

    • resources.groovy/xml + setter

      OR

    • Constructor + applicationContext (implement ApplicationContextAware)

    Using the service reference should work, if not there is a bug to analyse there.

    Where did you declare your service activator ?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a grails site (grails 2.0 with spring security 1.2.6) login that's supposed
I have a Grails service that is a wrapper around a rather complicated singleton
I have a Grails web application running on a german localized machine. How does
I have a Grails project with pom.xml that is treated as Maven project by
I have a Grails app that loads its data from xml files and delivers
I have one grails application.In that I have one model class named Book. From
I have a Grails command object that contains an emailAddresses field, e.g. public class
I'm integrating Gigya with a web app running Acegi. I have it working that
I have a Grails 2.0.0 project that was created using grails create-app . In
I have a Grails 2.0 webapp and when I try to go to an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.