Guys,
CVP Version :- CISCO Customer Voice Portal (CVP), Version 8.5
I am trying to implement "On Error Notification" but getting below error in C:\Cisco\CVP\VXMLServer\logs\GlobalErrorLogger
Configured same in Global_Config.xml under C:\Cisco\CVP\VXMLServer\conf
<error_class>org.jimy.error.OnErrorNotification</error_class>
Am i doing something wrong here ??????
------*********ERROR******---------
07/31/2015 03:48:01.826, SERVER ERROR: An error occurred with the global error class org.jimy.error.OnErrorNotification
java.lang.ClassCastException: org.jimy.error.OnErrorNotification cannot be cast to com.audium.server.proxy.GlobalErrorInterface
------***************---------
below is my class file
package org.jimy.error;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import com.audium.server.AudiumException;
import com.audium.server.proxy.*;
import com.audium.server.session.ActionElementData;
import com.audium.server.voiceElement.ActionElementBase;
public class OnErrorNotification extends ActionElementBase implements GlobalErrorInterface
{
// implementing the only abstract method doError with default arguments
public void doError(String audiumSessionID, String appName, String ani,
String dnis, String iidigits, String uui, ArrayList entityHistory,
ArrayList exitStateHistory, HashMap sessionData)
{
Logger logger3 = Logger.getSingletonObject();
logger3.logger.trace("On Error Notification Tested Succesfuly");
logger3.logger.debug("test debug");
logger3.logger.log(null, "test");
logger3.logger.log(null, audiumSessionID);
}
public void doAction(String name, ActionElementData data)
throws AudiumException {
HashMap hm = data.getAllSessionData();
Iterator it = hm.keySet().iterator();
String varName;
while (it.hasNext()) {
varName = (String) it.next();
data.addToLog(varName, data.getSessionData(varName).toString());
}
}
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Did this code really compile?
You must remove the entire doAction method above. That's only to be used inside Standard or Configurable Action elements.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
FYI, the global error can't write to the ActivityLog - so if you're testing, you'll have to use something like System.out.println() or log4j to write to a file.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Thanks Janine, i removed doAction method, and was trying to compile but it was throwing error.
i was Extending ActionElementBase un-necessarily . i deleted doAction method and removed extension to ActionElementBase and its working fine.
public class OnErrorNotification extends ActionElementBase implements GlobalErrorInterface
public class OnErrorNotification implements GlobalErrorInterface
Thanks for your Reply.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Comments
0 comments
Please sign in to leave a comment.