Ambiguous Constructor Error while trying to create an Event object | Community
Skip to main content
ZeDor
Level 2
October 16, 2015
Solved

Ambiguous Constructor Error while trying to create an Event object

  • October 16, 2015
  • 2 replies
  • 842 views

Hello Everyone,

While sending an event using EventAdmin I am getting the following Error:

The constructor Event(String, Map<String,?>) is ambiguous

The code I have written is:

  1. String eventData = request.getParameter("eData");
  2. Hashtable props = new Hashtable();
  3. props.put("eventData",eventData);
  4. Event evt = new Event("/com/adobe/sample/test", props);
  5. evtAdmin.sendEvent(evt);

 

Adobe CQ Version: 5.6

How can I resolve this issue of creating an Event Object to send an event.

------------

I have another question regarding Jobs. According to sling API here the EventAdmin way of processing a job is deprecated. However I am not able to use the JobManager API suggested there. So my question is how do I know what is the sling version I am using and can I update my felix/sling bundles to run on the newer version with the other CQ5/JCR API?

Appreciate any inputs I can get.


Thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Scott_Brodersen

regarding how to find out the bundle version:

Open the web console and go to the bundles page (http://localhost:4502/system/console/bundles), then expand the Apache Sling Event Support bundle.

https://dev.day.com/docs/en/cq/current/deploying/web-console.html 

scott

2 replies

Scott_Brodersen
Scott_BrodersenAccepted solution
Level 8
October 16, 2015

regarding how to find out the bundle version:

Open the web console and go to the bundles page (http://localhost:4502/system/console/bundles), then expand the Apache Sling Event Support bundle.

https://dev.day.com/docs/en/cq/current/deploying/web-console.html 

scott

Sham_HC
Level 10
October 16, 2015

Why you are not able to use jobmanager? Any error