Expand my Community achievements bar.

SOLVED

Ambiguous Constructor Error while trying to create an Event object

Avatar

Level 2

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

1 Accepted Solution

Avatar

Correct answer by
Level 8

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

View solution in original post

2 Replies

Avatar

Correct answer by
Level 8

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

Avatar

Level 10

Why you are not able to use jobmanager? Any error