« Back to General Discussion - All Versions

classpath jar problem with Spring Framework on CVP application

Combination View Flat View Tree View
Threads [ Previous | Next ]
Hi,

We are trying to use spring framework on our CVP application. For spring and other custom elements, we have a java project which works perfectly on our local machine. Then we export this project as a jar to application/lib folder of our cvp project. However, our decision elements (which contains methods from spring framework) can not be visible under elements view until we put all the spring related jars to application/lib folder. Our xml files for spring are also under application/classes folder(By the way, we are reading the xml configurations by giving fullpath, not from classpath which as a problem also). But here is the problem begins. If we deploy the project with this configuration, in the deployment stage, VXML Server tries to figure out all the dependencies of the jars located in application/lib folder which is almost impossible to achive. So we produce a new method to solve the problem. Firstly we stop the VXML Server. Then deploy the CVP application from CVP Call Studio. Then we delete all the jars under the application/lib folder on vxml server (So we avoid dependency_chek/Class not found errors). After that, we put the spring related jars and the jar we created by exporting our java project, under the CVP\VXMLServer\Tomcat\webapps\CVP\WEB-INF\lib folder. After all we start the VXML server and only in this situation our project works.

It doesn't make sense to do such things just to use spring framework in our cvp applications. So what we are doing wrong? Or where should we put our spring related jars to avoid from hard-dependecy-check which always throws NoClassDefFoundError. I mean we don't use ant task but since it is included in a class in one of the spring related jars, we can not even deploy our project.

Any help would be greatly appreciated.

Thanks.

Usually with Studio and Vxml Server you should do one of the following
two choices, not mix them. One allows your code to be globally used by
all apps, the other only allows it to be used locally by one app - I'll
include details below.

BUT, you can find important info in Chapter 2 of the Cisco reference
manual named 'VoiceXML Programming Guide for Cisco Unified Customer
Voice Portal' and I highly recommend you look at chapter 2, since it's
possible that due to the order of loading at startup, you may need your
spring files in a different directory from the one I list below.

1. To make your code available globally to ALL applications in Studio
and Vxml Server. store your jar files into -

Studio: put jar files into the
VoiceXMLStudio/eclipse/plugins/com.audiumcorp.studio.library.common_6.y.x./lib/
(version number may vary) Then Quit Studio and Restart Studio. The
elements should appear in the Elements pane.

VXML Server: put the jar files into the directory:
VoiceXMLServer/common/lib/ and then restart Tomcat.

2. To use the code JUST for one specific application (this is good
during development, since it's easy):

Studio: put jar files into the Studio application's folder
<appname>/deploy/java/application/lib/ Then just close the application
from the central Workspace and double-click the app.callflow. The
elements will appear under Elements/Local Elements/ in the Elements pane.

When you deploy the application from Studio, then the jar files will be
deployed to Vxml Server AUTOMATICALLY into the appropriate location,
namely into VoiceXMLServer/application/<appname>/java/lib directory.
And when you run the updateApp.bat script, the java will also be updated
AUTOMATICALLY.

Hope this helps,
Janine
www.TrainingTheExperts.com

At first, thank you for your reply. But there is a misunderstanding. I know local and global lib issues and I talked about them in my question also.
Here, We don't want to use any global jars. We are trying make all applications like standalone.

Let me explain the problem again:

We have a Java application using spring framework. It works perfectly on our local machines. So here the "perfectly" means that we haven't got any build path problem (We are not getting NoClassDefFoundError or something like it). We export this Java project as a jar and put it under CVP_PROJECT/deploy/java/application/lib. We also put all the other jar's in JAVA_PROJECT's build path (e.g. spring.jar etc) to CVP_PROJECT/deploy/java/application/lib. As you see we want it local.

But we CAN NOT deploy this CVP_PROJECT because it is throwing NoClassDefFoundErrors on even deployment stage. Let's say there is a reference to an unrelated class in spring.jar (like ant). On deployment stage, we get NoClassDefFoundError for that class even we don't use/need it. It is only included in the jars we added to application/lib folder. I have to remind that this jars are enough to run the same code in our local machines in a main method.

I have to clarify another issue here. YES, we read the Chapter 2 on Programming Guide like thosand times. Yes, we want the elements to be local to our one application. To solve the problem we tried to use the util folder which I couldn't fully understand why we need such a folder. In Chapter 2, it says that: "This is used for Java libraries that provide the application with utilities unaffiliated with Unified CVP (such as math libraries, XML parsing libraries, etc.).". Our element use Spring methods so if we put all the spring related jars under the util/lib folder, the element becomes invisible on elements pane under local elements. I guess Call Studio trying to find all the depenedent codes under application/lib folder. So I put some of the jars under application/lib folder from util/lib folder. Now we can see our element on Elements Pane but the jars I put to application/lib folder also needs/uses some jars from util/lib folder and according to the chapter 2 they must be included in application/lib also! The meaning I figured out from Chapter 2 about this issue is if my application needs/uses/dependent to a jar, it must be included in appliaction/lib folder. The other ones go to util/lib folder. But, I really don't understand why I am putting the jar even to my project if I don't nedd/use/dependent to that jar!

Is there anyone, using Spring framework on CVP? If there is, how should be the jar placement? Or do I my make myself clear on the problem we are facing? We spent days/hours to solve that classpath problem, maybe we tried millions of different combination and on each configuration, we restarted to TOMCAT either.

Any help would be greatly appreciated.

Deniz,
regarding your post 'classpath jar problem with Spring Framework on CVP
application' - try checking out this post on the Cisco Forum from Feb.
2007, named 'Audium, Spring, JPA deployment Issue'

http://developer.cisco.com/web/cdc/forums?src=/forums/thread.jspa%3FthreadID%3D28436%26tstart%3D150

Guten Tag,

vielen Dank für Ihre Nachricht. Ich bin bis einschließlich 16.11. auf Geschäftsreise und habe nur eingeschränkten Zugriff auf meine E-Mails. In dringenden Fällen wenden Sie sich bitte an support@bucher-suter.de oder +49 6252 67 44 44.

Mit freundlichen Grüßen,

BUCHER + SUTER AG
Matthias Neubacher

Hi,
thanks for your e-mail. I'm out of the office till 16 Jan and have limited access to my e-mail account. In urgent cases please contact support@bucher-suter.de or +49 6252 67 44 44

Best regards,

BUCHER + SUTER AG
Matthias Neubacher

Matthias,

we are in a review to use Spring utility project for our integration layer and I have the same concerns about the class path issues as yours with CVP 8.0 version. How did you resolve the classpath issues?  where did you kept the spring jars? Also, do you recommend using Spring for the CVP project? We are planning to use Spring AOP, JDBC Templates and Webservice Consumption for this Spring Utility project. Please advise. I appreciate your help

Hi,

I am not sure about Springs but the java when you are doing in Studio Eclipse8.0 . You need to add the "framework.jar" and servlet2.3.jar" filles as add extenrnal jar files.

Thanks,
Phani.

I need to read the voiceXML output coming from http url response by using TTS engine.

What are the methods i need to follow , What are the steps to follw.

I appreciate your help.

Theres nothing special to do in the studio app. On the gateway, you just
configure the tts url. Look at the cvp config and admin guide for the couple
of lines to add to the gateway config.
Also, i assume you have purchased tts from a supported vendor (nuance,
loquendo, etc)
Janine


Sent from my Verizon Wireless Phone

-----Original message-----
From: Cisco Developer Community Forums <cdicuser@developer.cisco.com>
To: "cdicuser@developer.cisco.com" <cdicuser@developer.cisco.com>
Sent: Fri, Mar 9, 2012 15:26:11 GMT+00:00
Subject: New Message from Phani Venigalla in Customer Voice Portal (CVP) -
General Discussion - All Versions: RE: classpath jar problem with Spring
Framework on CVP application

We are gettiing nuance vocalizer TTS servers in place.

My concern is the voiceXML output will come from URL so this output i need to read and make it availible for accepting user input and submit to back to URL.

So which element we use for embedding in CallStudio. Will Action Elemet work for receiving xml response.

appreciate your help.

Thanks,
Phani.

All you need to do is get the output and put it in the session and then you can use that element in the audio/TTS to play it. As it is in the session you can use it anywhere in your app. This is very commonly used.
Hemal

From: Cisco Developer Community Forums [mailto:cdicuser@developer.cisco.com]
Sent: Friday, March 09, 2012 10:00 AM
To: cdicuser@developer.cisco.com
Subject: New Message from Phani Venigalla in Customer Voice Portal (CVP) - General Discussion - All Versions: RE: classpath jar problem with Spring Framework on CVP application

Phani Venigalla has created a new message in the forum "General Discussion - All Versions":

--------------------------------------------------------------
We are gettiing nuance vocalizer TTS servers in place.

My concern is the voiceXML output will come from URL so this output i need to read and make it availible for accepting user input and submit to back to URL.

So which element we use for embedding in CallStudio. Will Action Elemet work for receiving xml response.

appreciate your help.

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

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

or simply reply to this email.

Is there any Tag need add in the VoiceXML file to support Studio for reading.

Let us say i have a output contains 10 questions that will read by TTS,But Each question i need to store in session variable and need to take the input given by caller store in session variable and do validate and submit back all 10 variables to URL.

appreciate your help.

Thanks

The audio will do it, you may have it split into different audio elements for each of the 10 questions. These audio can be part of menu/form.

From: Cisco Developer Community Forums [mailto:cdicuser@developer.cisco.com]
Sent: Friday, March 09, 2012 10:32 AM
To: cdicuser@developer.cisco.com
Subject: New Message from Phani Venigalla in Customer Voice Portal (CVP) - General Discussion - All Versions: RE: classpath jar problem with Spring Framework on CVP application

Phani Venigalla has created a new message in the forum "General Discussion - All Versions":

--------------------------------------------------------------
Is there any Tag need add in the VoiceXML file to support Studio for reading.

Let us say i have a output contains 10 questions that will read by TTS,But Each question i need to store in session variable and need to take the input given by caller store in session variable and do validate and submit back all 10 variables to URL.

appreciate your help.

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

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

or simply reply to this email.

The text that you want to speak will be retrieved from vxml server, either
in a web services element, or a custom action element that you create. Then
you store this text into element or session data variabele. The use an
audio, or menu, or digits, or form element to prompt the caller for input.
In the audio tab of whichever element collects the input, just specify the
variable that has your text-based prompt in the TTS box.


Sent from my Verizon Wireless Phone

-----Original message-----
From: Cisco Developer Community Forums <cdicuser@developer.cisco.com>
To: "cdicuser@developer.cisco.com" <cdicuser@developer.cisco.com>
Sent: Fri, Mar 9, 2012 16:00:24 GMT+00:00
Subject: New Message from Phani Venigalla in Customer Voice Portal (CVP) -
General Discussion - All Versions: RE: classpath jar problem with Spring
Framework on CVP application

The text i need to read from TTS engine would be in voiceXML format. Shall i store this voicexml format file in Session data variable by using action element.?

Lets say the output would be

Question 1 What is your Home phone number

Questions 2 What is your street Number

question 3 What is your Mobile number

The TTS will read Question 1 then wait for Input and validations
Then Question 2 then wait for Input and validations and so on...

How do i srote each answer in session data or element data to submit all once at a time when all questions have proper input and have submitted.

Appreciate our Help.

Why would you use TTS to announce a fixed message that you can simply record? That’s not what TTS is designed for. TTS is going to do a good job of reading out a street address etc.

Regards,
Geoff

I appreciate your reply i

But my concern is how would i store each answer in varaible and process back.

Regards,
Phani.

You say that your questions are already in Voicexml format. Does that mean
you already have <field> tags containing the text to speak and the allowable
caller entries? If so, then the easiest thing may be to use the
subdialog_invoke element to invoke your vxml as a subdialog and let the vxml
it creates go directly to the gateway.

Otherwise, you will have to write some code to grab the tts-text for the
prompt from the vxml returned by your url, store it into session data var
and then use that.

As geoff mentions, if the prompts can be pre-recorded, you can have the url
return the prompt name into a session var and use that in the audio URI
field.

In any case, you have 3 things to do.
A) write an element (action or decision is easiest) to exec the url and grab
the tts or file name and store it into a variable.
emoticonuse that. Variable in the audio tab of some element that collects input
from the caller (i would use a form element for flexibility), either in the
audio file or tts box.
C)decide what the allowable entries from the caller are and indicate that
either in the settings tab, or after youve collected the input.

Janine



Sent from my Verizon Wireless Phone

-----Original message-----
From: Cisco Developer Community Forums <cdicuser@developer.cisco.com>
To: "cdicuser@developer.cisco.com" <cdicuser@developer.cisco.com>
Sent: Fri, Mar 9, 2012 17:37:52 GMT+00:00
Subject: New Message from Phani Venigalla in Customer Voice Portal (CVP) -
General Discussion - All Versions: RE: classpath jar problem with Spring
Framework on CVP application