# AlarmManager acknowledge() NoSuchMethodError

**URL:** <https://forum.inductiveautomation.com/t/alarmmanager-acknowledge-nosuchmethoderror/18461>\
**Category:** Module Development\
**Created:** [June 13, 2018, 9:08pm UTC](https://forum.inductiveautomation.com/t/alarmmanager-acknowledge-nosuchmethoderror/18461 "2018-06-13T21:08:10Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![dpitzer](https://avatars.discourse-cdn.com/v4/letter/d/b5a626/32.png) [@dpitzer](https://forum.inductiveautomation.com/u/dpitzer)\
**Post date:** [June 13, 2018, 9:08pm UTC](https://forum.inductiveautomation.com/t/alarmmanager-acknowledge-nosuchmethoderror/18461/1 "2018-06-13T21:08:10Z")

</div>

I am working with the com.inductiveautomation.ignition.gateway.alarming.AlarmManager class. When I call the acknowledge method, I get the following error in the logs:

java.lang.NoSuchMethodError: com.inductiveautomation.ignition.gateway.alarming.AlarmManager.acknowledge(Ljava/util/Collection;Lcom/inductiveautomation/ignition/common/alarming/EventData;)V

I’ve doublechecked my object scopes and types and everything seems to be working properly - even other methods within the alarmManager object such as getEvents(). Any ideas what else to check? I’m using SDK version 7.8.4.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 13, 2018, 9:36pm UTC](https://forum.inductiveautomation.com/t/alarmmanager-acknowledge-nosuchmethoderror/18461/2 "2018-06-13T21:36:14Z")

</div>

You’ll have to show your code – especially how you are constructing the arguments to acknowledge(). Jython-to-java argument conversions only work for the most common data types.

---

<div class="post-metadata">

**Author:** ![dpitzer](https://avatars.discourse-cdn.com/v4/letter/d/b5a626/32.png) [@dpitzer](https://forum.inductiveautomation.com/u/dpitzer)\
**Post date:** [June 14, 2018, 7:48pm UTC](https://forum.inductiveautomation.com/t/alarmmanager-acknowledge-nosuchmethoderror/18461/3 "2018-06-14T19:48:37Z")

</div>

Here is the source for my method. It takes the alarm code (6-digit “reply to acknowledge” number), the phone number that sent the alarm code (to check it came from the user to which it was sent), and a timestamp.

```java
private void acknowledgeAlarm(final String alarmCode, final String incomingNumber, final Date ackTime) {

    synchronized (alarmCodes) {
    	
        if (!alarmCodes.containsKey(alarmCode)) {
            log.warn("Received an incoming SMS for an alarm code that is not registered: '" + alarmCode + "'.");
            return;
        }
        
        AwaitingAcknowledgement ack = alarmCodes.get(alarmCode);

        User user = ack.user;

        if (incomingNumberBelongsToUser(incomingNumber, user)) {
            alarmCodes.remove(alarmCode);

            PropertySet associatedData = new PropertySetBuilder()
                    .set(CommonAlarmProperties.AckUser, user.getPath())
                    .set(CommonAlarmProperties.AckTime, ackTime)
                    .build();

            List<AlarmEvent> alarmEvents = ack.alarmEvents;

            alarmManager.acknowledge(
                    Collections2.transform(
                        Collections2.filter(alarmEvents, new Predicate<AlarmEvent>() {
                            @Override
                            public boolean apply(AlarmEvent alarmEvent) {
                                return !alarmEvent.isAcked();
                            }
                        }),

                new Function<AlarmEvent, UUID>() {
                    @Override
                    public UUID apply(AlarmEvent alarmEvent) {
                        return alarmEvent.getId();
                    }
                }),
        		new EventData(associatedData));
            
            return;
        } else {
        	log.debug("The number " + incomingNumber + " does NOT belong to the alarm code " + alarmCode);
        }
    }
}

```

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 14, 2018, 8:49pm UTC](https://forum.inductiveautomation.com/t/alarmmanager-acknowledge-nosuchmethoderror/18461/4 "2018-06-14T20:49:55Z")

</div>

That sure looks like it should work. I’m stumped.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 14, 2018, 8:54pm UTC](https://forum.inductiveautomation.com/t/alarmmanager-acknowledge-nosuchmethoderror/18461/5 "2018-06-14T20:54:11Z")

</div>

Your error message says that it is failing to find a match for L…Collection, L…EventData. There shouldn’t be an ‘L’ for EventData. Double check all of your error paths, and double check that you haven’t inadvertently gotten an old version of your module stuck in the gateway. A reboot might be in order.

---

<div class="post-metadata">

**Author:** ![dpitzer](https://avatars.discourse-cdn.com/v4/letter/d/b5a626/32.png) [@dpitzer](https://forum.inductiveautomation.com/u/dpitzer)\
**Post date:** [June 15, 2018, 12:02am UTC](https://forum.inductiveautomation.com/t/alarmmanager-acknowledge-nosuchmethoderror/18461/6 "2018-06-15T00:02:33Z")

</div>

My current installed version of Java is 1.8.0  
I am developing in eclipse where I was using Ant Builds for a long time.  
This current project is one I am modifying and was started by someone else and uses Maven. Any possibility I have a version issue between my SDK libraries (I may still have SDK 7.7 on my local machine, though I have Ignition Gateway 7.9.3 installed on the same machine.) or Java versions? I thought that the Maven build would grab the libraries I needed for the project.  
I’m new to Maven so I’m not sure where to look in my pom files to make sure everything checks out.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 15, 2018, 12:13am UTC](https://forum.inductiveautomation.com/t/alarmmanager-acknowledge-nosuchmethoderror/18461/7 "2018-06-15T00:13:34Z")

</div>

I meant that the running gateway service that produced your error message may not have unloaded an earlier version of your code. (That’s another problem to look into – making sure module shutdown removes all listeners of old code.) Which would require a service restart to get just the latest version to run properly.

As for Maven, I’m not a fan. At all. It breaks all of the techniques I use to have single module files loadable in multiple versions of Ignition. I run custom Ant builds for all of my modules.

---

<div class="post-metadata">

**Author:** ![iwan.tolboom](https://avatars.discourse-cdn.com/v4/letter/i/439d5e/32.png) [@iwan.tolboom](https://forum.inductiveautomation.com/u/iwan.tolboom)\
**Post date:** [January 23, 2019, 9:27am UTC](https://forum.inductiveautomation.com/t/alarmmanager-acknowledge-nosuchmethoderror/18461/8 "2019-01-23T09:27:55Z")

</div>

I had the same problem in Eclipse. I created a workspace with a new Maven Project and used groupid: com.inductiveautomation.ignitionsdk and artifact id: client-designer-gateway-archetype. In de pom.xml file, in the top project folder, this section is generated:  
\< properties\>  
\< ignition-sdk-version\>7.7.5\< /ignition-sdk-version\>  
\< /properties\>  
This causes the error described by you. Apparently that version of the AlarmManager does not yet have the function void acknowledge(Collection, EventData).  
After changing this to below acknowledging worked.  
\< properties\>  
\< ignition-sdk-version\>7.9.3\< /ignition-sdk-version\>  
\< /properties\>  
Note that I added spaces to the xml to be able to post it here!

The funny thing I noticed is that code completion in Eclipse does suggest the acknowledge function.

In the pom file of the “build” subproject there is the \< requiredIgnitionVersion\>7.7.0\< /requiredIgnitionVersion\> tag but changing this does not generate an error during the build with maven, which I expected to occur.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 23, 2019, 12:31pm UTC](https://forum.inductiveautomation.com/t/alarmmanager-acknowledge-nosuchmethoderror/18461/9 "2019-01-23T12:31:10Z")

</div>

> [@iwan.tolboom](#):
>
> After changing this to below acknowledging worked.

Yes, the method signature changed between 7.7 and 7.9.

> [@iwan.tolboom](#):
>
> Note that I added spaces to the xml to be able to post it here!

Use a code formatting block next time (3 back ticks):

```auto
<properties>
    <ignition-sdk-version>7.9.3</ignition-sdk-version>
</properties>

```

> [@iwan.tolboom](#):
>
> In the pom file of the “build” subproject there is the \< requiredIgnitionVersion\>7.7.0\< /requiredIgnitionVersion\> tag but changing this does not generate an error during the build with maven, which I expected to occur.

This just makes an entry in the XML file embedded with your module and is used when the gateway loads your module. It's not a compile time property in any way.
