cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
830
Views
0
Helpful
0
Comments
cdnadmin
Level 11
Level 11
This document was generated from CDN thread

Created by: Richard Rhinehart on 18-02-2012 11:26:32 AM
Hello,
 
I am trying to pinpoint an error that is occuring within a custom action element.  I have a try catch around the entire doAction method and I log any exceptions to the activity log.
 
This happens about 2% of the time and happens to two custom elements that both connect to a webservice. In each case the first few lines of the element run, i know this because i have it log the session var params to the activity log. Then it attempts to create the connection to the webservice.
 
BasicHttpBinding_ICredentialActivationServiceStub svc = new BasicHttpBinding_ICredentialActivationServiceStub();
 
I receive no more logging from my element which there should be several more lines, and the element ends without error. It calls the next element which is a decision element and that element errors out.
 
 
10.6.23.22.1327272253300.630.Main,01/22/2012 16:45:11.709,ActIsSSNValid,enter,
10.6.23.22.1327272253300.630.Main,01/22/2012 16:45:11.709,ActIsSSNValid,custom,ActBadgeNumberValidARAMS:SERVICEURL,http://blahblahblah.com/badgenumber
10.6.23.22.1327272253300.630.Main,01/22/2012 16:45:14.552,ActIsSSNValid,exit,done
10.6.23.22.1327272253300.630.Main,01/22/2012 16:45:14.552,IsSSNValid,enter,
10.6.23.22.1327272253300.630.Main,01/22/2012 16:45:14.552,IsSSNValid,exit,Error
 
the activity log shows no error.
 
Any ideas of where else to look or thoughts would be greatly appreciated.
 
Regards,
 
Rick
 
 

Subject: RE: New Message from Richard Rhinehart in Customer Voice Portal (CVP) - CVP
Replied by: GEOFFREY THOMPSON on 19-02-2012 11:50:18 AM
>>>This happens about 2% of the time and happens to two custom elements that both connect to a webservice.

Is your element thread-safe? I assume you are aware of the standard warning in custom elements:

WARNING: only static variables allowed in the class. Multiple invocations can over-write class variables.

Regards,
Geoff

Subject: RE: New Message from Richard Rhinehart in Customer Voice Portal (CVP) - CVP
Replied by: Hemal Mehta on 19-02-2012 05:58:18 PM
There are probably java errors. Go and look at the tomcat logs for more details.
Hemal
________________________________________
From: Cisco Developer Community Forums [cdicuser@developer.cisco.com]
Sent: Saturday, February 18, 2012 10:26 AM
To: cdicuser@developer.cisco.com
Subject: New Message from Richard Rhinehart in Customer Voice Portal (CVP) - CVP - All Versions: CVP Error

Richard Rhinehart has created a new message in the forum "CVP - All Versions":

--------------------------------------------------------------
Hello,

I am trying to pinpoint an error that is occuring within a custom action element.  I have a try catch around the entire doAction method and I log any exceptions to the activity log.

This happens about 2% of the time and happens to two custom elements that both connect to a webservice. In each case the first few lines of the element run, i know this because i have it log the session var params to the activity log. Then it attempts to create the connection to the webservice.

BasicHttpBinding_ICredentialActivationServiceStub svc = new BasicHttpBinding_ICredentialActivationServiceStub();

I receive no more logging from my element which there should be several more lines, and the element ends without error. It calls the next element which is a decision element and that element errors out.


10.6.23.22.1327272253300.630.Main,01/22/2012 16:45:11.709,ActIsSSNValid,enter,
10.6.23.22.1327272253300.630.Main,01/22/2012 16:45:11.709,ActIsSSNValid,custom,ActBadgeNumberValidARAMS:SERVICEURL,http://blahblahblah.com/badgenumber
10.6.23.22.1327272253300.630.Main,01/22/2012 16:45:14.552,ActIsSSNValid,exit,done
10.6.23.22.1327272253300.630.Main,01/22/2012 16:45:14.552,IsSSNValid,enter,
10.6.23.22.1327272253300.630.Main,01/22/2012 16:45:14.552,IsSSNValid,exit,Error

the activity log shows no error.

Any ideas of where else to look or thoughts would be greatly appreciated.

Regards,

Rick


--
To respond to this post, please click the following link:

<http://developer.cisco.com/web/cvp/forums/-/message_boards/view_message/5174322>

or simply reply to this email.

Subject: RE: New Message from Hemal Mehta in Customer Voice Portal (CVP) - CVP - All
Replied by: GEOFFREY THOMPSON on 19-02-2012 07:12:18 PM
Also check the application\XXX\logs\ErrorLog directory. You may see an exception there, if one is thrown that you have not caught.


Regards,
Geoff

Subject: RE: New Message from Richard Rhinehart in Customer Voice Portal (CVP) - CVP
Replied by: Hemal Mehta on 20-02-2012 03:53:18 PM
Why will the catch write to activity log, unless you have explicit code there which adds to the activity log, BY default you will see it in the Tomcat log.
Hemal
________________________________
From: Cisco Developer Community Forums [cdicuser@developer.cisco.com]
Sent: Monday, February 20, 2012 11:07 AM
To: cdicuser@developer.cisco.com
Subject: New Message from Richard Rhinehart in Customer Voice Portal (CVP) - CVP - All Versions: RE: CVP Error

Richard Rhinehart has created a new message in the forum "CVP - All Versions":

--------------------------------------------------------------
Geoff,

There are no multithreaded operations in my script. So my session variables should be fine unless you can think of another reason why it wouldn't be thread safe. I have looked at the ErrorLog for the application but there were no errors for the time period. I'll inspect the Tomcat logs they are not easy for me to gather but I will update when I have them.

I guess a question that I have is why is my catch not executing if this is a java error? The first few lines contained within the try are executed and then nothing else and the element exits seemingly without error. I woulld expect my catch to write the exception to the activity log.

Thanks,

Rick
--
To respond to this post, please click the following link:

<http://developer.cisco.com/web/cvp/forums/-/message_boards/view_message/5180893>

or simply reply to this email.

Subject: RE: New Message from Hemal Mehta in Customer Voice Portal (CVP) - CVP - All
Replied by: GEOFFREY THOMPSON on 20-02-2012 05:14:18 PM
You missed the fact that Rick said he was catching exceptions and writing to the activity log.

Check back:

“I have a try catch around the entire doAction method and I log any exceptions to the activity log.“

Regards,
Geoff

Subject: RE: CVP Error
Replied by: Richard Rhinehart on 20-02-2012 12:07:04 PM
Geoff,

There are no multithreaded operations in my script. So my session variables should be fine unless you can think of another reason why it wouldn't be thread safe. I have looked at the ErrorLog for the application but there were no errors for the time period. I'll inspect the Tomcat logs they are not easy for me to gather but I will update when I have them.

I guess a question that I have is why is my catch not executing if this is a java error? The first few lines contained within the try are executed and then nothing else and the element exits seemingly without error. I woulld expect my catch to write the exception to the activity log.

Thanks,

Rick

Subject: RE: New Message from Richard Rhinehart in Customer Voice Portal (CVP) - CVP
Replied by: GEOFFREY THOMPSON on 20-02-2012 12:49:18 PM
Rick,

If the custom action element works fine in testing but occasionally fails under load, you have to suspect one of two things. (a) you are getting into memory problems in the VXML server or (b) your element is not fully protected during multiple simultaneous executions.

If things go well for a while after a server restart and only then you start to see occasional problems, you might suspect (a).

For (a) you can increase the memory assigned to the stack and the heap of the JVM through the java options in the registry. I try to give this server as much as the physical system, and the other processes running on the box, allow.

If you suspect (b), have a look at the timestamp in the activity log when a problem occurs and check around the activity log to see if your custom action element is being invoked by another call at exactly the same time.

When you write “There are no multithreaded operations in my script.” that was not the point I was trying to make. The whole system is multi-threaded due to calls arriving from the PSTN, and two calls can be accessing the custom action element at exactly the same time. The warning that I quoted (originally in Audium samples) is telling you not to make non-static global variables in the class.

Session variables are on the thread of the call, so are completely safe.

If the doAction() method is one single function, you should never have issues.

But if doAction() calls another method passing parameters to that method, and that method is required to set a number of pieces of data that doAction() wants to access in order to (typically) set some session variables the application uses, take care how you do this.

Regards,
Geoff

Subject: RE: New Message from Richard Rhinehart in Customer Voice Portal (CVP) - CVP
Replied by: Ryan Hilfers on 21-02-2012 11:25:18 AM
Richard,

The fact that your element completes is saying that the applicaiton did not encounter a fatal unhandled exception or even more probable is that it did not throw the appropriate exception to audium services..

You mentioned that your doAction method was surrounded in a try/catch.  This method throws an audium exception when encountering an error. I'm wondering if this may be contributing to the way that element is wrapping itself up. Perhaps you could try bringing that try/catch inside the method and only surrouding the object methods that need to be.

I'm no seasoned expert but this seems plausable.

-Ryan

________________________________
From: Cisco Developer Community Forums [cdicuser@developer.cisco.com]
Sent: Tuesday, February 21, 2012 8:57 AM
To: cdicuser@developer.cisco.com
Subject: New Message from Richard Rhinehart in Customer Voice Portal (CVP) - CVP - All Versions: RE: CVP Error

Richard Rhinehart has created a new message in the forum "CVP - All Versions":

--------------------------------------------------------------
I'm still waiting for the Tomcat Logs but thought I'd add this.

My initial post was a bit misleading towards the end.

"I receive no more logging from my element which there should be several more lines, and the element ends without error. It calls the next element which is a decision element and that element errors out."

I should have stated.

No more logging from the ActIsSSNValid element. There should be whether successful or failure. The next element runs and reaches an error exit state. It calls the next element which is not listed in my log above which follows an error route and calls a custom element that sends and email and logs to the database that there was an error.(the error from the decision node because certain lookup values weren't filled... not a real error) In this case my session "Error" variable is not filled and logs the default value which I set to null. So everything else runs accordingly its as if it just skips 80% of one element and then the studio application runs to completion.
--
To respond to this post, please click the following link:

<http://developer.cisco.com/web/cvp/forums/-/message_boards/view_message/5185622>

or simply reply to this email.

Subject: RE: New Message from Ryan Hilfers in Customer Voice Portal (CVP) - CVP - Al
Replied by: GEOFFREY THOMPSON on 21-02-2012 11:39:18 AM
Another possible strategy would be to try to turn off log buffering and session grouping, and let the logger write immediately across sessions. I am sure you can do this in the xml file for logging, and update the app – should take immediately.

Now this would have some performance implications, and I would only do this during low call volume, but it may help find what’s going on.

Anyone who has used the logging system knows that it has some small issues caused by buffering – for example, if you have an audio element and don’t have the WAV file available, and it throws an error for a bad fetch, this is often a dozen lines down in the log from the real element that is wrong.

Regards,
Geoff

Subject: RE: New Message from Ryan Hilfers in Customer Voice Portal (CVP) - CVP - Al
Replied by: Janine Graves on 21-02-2012 12:05:09 PM
2 things about changing the logging cache:

1. To enable real-time activity log caching, go to Project > Properties > General - select the ActivityLogger and then press Edit, and Edit again.
Find the portion near the bottom where it has

<cache>
<per_call kb_limit="50" allocate="once"/>
</cache>

The documentation says you can just comment out these 3 lines (enclose between <!--  and --> tags )  and then deploy/update and the system will log in 'real time'.

(This could be done directly on the vxml server in the file applications/appname/data/application/ActivityLogConfig.xml  -- then run the update script)

2. But Geoff, the fact that the logs show a missing audio file (error.badfetch.http) a few elements after the Audio element that tried to play it, is not a buffering issue. It's the way the VoiceXML Gateway works.

A Voice Browser never 'blocks' on playing audio (that is, it doesn't wait for it to be retrieved and played). It only 'blocks' on audio playback when it needs to also collect caller input.

An Audio element causes the voice browser (on the gateway) to hand off the http fetch and play request to other processes and then continue with an http request back to the VXML Server indicating it completed the Audio element successfully. This causes the activity log info to display success.

It's not until an element that collects caller input goes to the gateway, that the voice browser must wait for all pending play requests to complete. It's then that error.badfetch.http events finally occur.

This turns out to be a VXML issue, not a Cisco issue. Although, Cisco could (should?) provide a VXML Property to tell the gateway to 'block' on the playing of an audio.

Regards, Janine

Subject: RE: CVP Error
Replied by: Richard Rhinehart on 21-02-2012 10:57:06 AM
I'm still waiting for the Tomcat Logs but thought I'd add this.

My initial post was a bit misleading towards the end.

"I receive no more logging from my element which there should be several more lines, and the element ends without error. It calls the next element which is a decision element and that element errors out."

I should have stated.

No more logging from the ActIsSSNValid element. There should be whether successful or failure. The next element runs and reaches an error exit state. It calls the next element which is not listed in my log above which follows an error route and calls a custom element that sends and email and logs to the database that there was an error.(the error from the decision node because certain lookup values weren't filled... not a real error) In this case my session "Error" variable is not filled and logs the default value which I set to null. So everything else runs accordingly its as if it just skips 80% of one element and then the studio application runs to completion.

Subject: RE: CVP Error
Replied by: Richard Rhinehart on 21-02-2012 12:59:44 PM
Thanks Everyone!

Janine,

I will try that.


Ryan,

Thats what I am doing. When I said surrounding the doAction I actually meant

doAction(blah blah blah)
{
try{ //all executable code is in here}
catch(Exception ex){ //log to activity log ex.GetMessage()}

}//End Do Action

there are no other methods , just the call to the webservice, session var setting and activity logging.

Subject: RE: CVP Error
Replied by: Ryan Hilfers on 21-02-2012 06:26:15 PM
Thanks Everyone!

Janine,

I will try that.


Ryan,

Thats what I am doing. When I said surrounding the doAction I actually meant

doAction(blah blah blah)
{
try{ //all executable code is in here}
catch(Exception ex){ //log to activity log ex.GetMessage()}

}//End Do Action

there are no other methods , just the call to the webservice, session var setting and activity logging.

 
Ok so here's another thought:
ex.GetMessage()    that method right there is why you're not seeing the exception logged in the activity logger.   Try  ex.toString()    that should give you something more useful.
 
For example, when I try ex.GetMessage() in some of my code, it returns nothing, whereas ex.toString() will give me a Java.NullPointerException or something like that
-Ryan

Subject: RE: CVP Error
Replied by: Richard Rhinehart on 15-03-2012 03:46:51 AM
I am still not able to find a solution or the issue that is occurring.

I have put wireshark on the vxml server. It appears to be making the request to the service, the service appears to send the request back from the logs in wireshark. However none of the remaining code in my custom element ever runs.

The element does exit without error. Perplexing and Mind Boggling.

I have added the ApplicationDebugLogger, it gives me no useful information. I have looked at the tomcat logs, the vxml server error logs, the applcation error logs and there is nothing to be found to tie it back.

My question at this point, is there additional logging I can turn on to see what is happening? Any ideas that might help me troubleshoot?


Regards
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links