cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
111
Views
0
Helpful
0
Comments
cdnadmin
Community Member
This document was generated from CDN thread

Created by: Asher Schweigart on 13-11-2012 11:00:50 AM
I have a custom element that I can't get to load in call studio. I have found the issue in the element, it is a single line fo code that it must not like, because when I comment it out the element loads fine. 
Is there a place I can look to see what error is causing the element not to load? I checked workspace/.metadata/.log, but I'm not seeing anything in there, and I don't know where else to look.
 
Here is the offending code in case anyone can help on that end:
    URL url = new URL(<http://someXmlFile.xml);
 
    URLConnection conn = url.openConnection();
    conn.setRequestProperty("Authorization", "Basic "+cred);
    conn.connect();
    InputStream sn = conn.getInputStream();
 
    SaxTicketReader ticketReader = new SaxTicketReader();
    SAXParserFactory factory = SAXParserFactory.newInstance();
    try {
        SAXParser parser = factory.newSAXParser();
        parser.parse(new InputSource(sn), ticketReader);  <------- this is the line that is causing the issue.
    } catch....
 
 
This code works fine when I test it outside of call studio.

Subject: RE: New Message from Asher Schweigart in Customer Voice Portal (CVP) - Gene
Replied by: Hemal Mehta on 13-11-2012 11:47:48 AM
Are you adding this as a class file or bundling it a jar and then adding it  ?
Do one thing, call this code from action element within studio and see what if it give you an error.
Hemal

From: Cisco Developer Community Forums [mailto:[email protected]]
Sent: Tuesday, November 13, 2012 11:33 AM
To: [email protected]
Subject: New Message from Asher Schweigart in Customer Voice Portal (CVP) - General Discussion - All Versions: Custom element error logs

Asher Schweigart has created a new message in the forum "General Discussion - All Versions": -------------------------------------------------------------- I have a custom element that I can't get to load in call studio. I have found the issue in the element, it is a single line fo code that it must not like, because when I comment it out the element loads fine.
Is there a place I can look to see what error is causing the element not to load? I checked workspace/.metadata/.log, but I'm not seeing anything in there, and I don't know where else to look.

Here is the offending code in case anyone can help on that end:
    URL url = new URL(<http://someXmlFile.xml);

    URLConnection conn = url.openConnection();
    conn.setRequestProperty("Authorization", "Basic "+cred);
    conn.connect();
    InputStream sn = conn.getInputStream();

    SaxTicketReader ticketReader = new SaxTicketReader();
    SAXParserFactory factory = SAXParserFactory.newInstance();
    try {
        SAXParser parser = factory.newSAXParser();
        parser.parse(new InputSource(sn), ticketReader);  <------- this is the line that is causing the issue.
    } catch....


This code works fine when I test it outside of call studio.
--
To respond to this post, please click the following link: http://developer.cisco.com/web/cvp/forums/-/message_boards/view_message/8529570 or simply reply to this email.

Subject: RE: Custom element error logs
Replied by: Janine Graves on 13-11-2012 12:38:08 PM
Asher, If the element doesn't show up in studio, you should be able to go to Window > Show View > Call Studio Error Log.
 

Subject: RE: Custom element error logs
Replied by: Asher Schweigart on 13-11-2012 01:17:05 PM
Thank you both, both ways showed the info I needed. Error was caused because it could not find my custom classes, which I wrote as subclasses of the element class.
I was using the compiled class file, i switched to using a jar, and that fixed it. Seems I need to work on my ant build file to get this working right!

Subject: RE: New Message from Asher Schweigart in Customer Voice Portal (CVP) - Gene
Replied by: Asher Schweigart on 13-11-2012 01:37:08 PM
Yeah, I looked into it more, and what happended was just a stupid mistake on my part.
I was unfamiliar with how java compiled classes.
I had my ant build file set to auto copy the class file into call studio, and when I started adding subclasses to the main class, I did not realize that the subclasses would be in seperate files.
I figured that since they were part of the main class, they would be in the same class file. Oops.

Subject: RE: New Message from Asher Schweigart in Customer Voice Portal (CVP) - Gene
Replied by: Hemal Mehta on 13-11-2012 01:31:48 PM
I have seen cases where it does not show with class and works with jar.  Good it worked for you.
Hemal

From: Cisco Developer Community Forums [mailto:[email protected]]
Sent: Tuesday, November 13, 2012 1:17 PM
To: [email protected]
Subject: New Message from Asher Schweigart in Customer Voice Portal (CVP) - General Discussion - All Versions: RE: Custom element error logs

Asher Schweigart has created a new message in the forum "General Discussion - All Versions": -------------------------------------------------------------- Thank you both, both ways showed the info I needed. Error was caused because it could not find my custom classes, which I wrote as subclasses of the element class.
I was using the compiled class file, i switched to using a jar, and that fixed it. Seems I need to work on my ant build file to get this working right!
--
To respond to this post, please click the following link: http://developer.cisco.com/web/cvp/forums/-/message_boards/view_message/8533271 or simply reply to this email.
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