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

Created by: Graham Whitelam on 17-05-2013 10:53:32 AM
Hello, I have some custom Java elements which I have developed for CVP 8.5. When the call flow is developed, I copy my element jar files to the java/application/lib folder and the dependencies to the java/util/lib folder of the CVP application.
I deploy the application to the VXML server and the jar file are copied across into the application java folder as described above.
When I place a call into the application one of my elements is executed but it throws a ClassCastException. I also see a further problem with another of my elements which throws a ClassNotFoundException even though the class is in one of the jar files deployed with the application as described above.
I can resolve both of the above issues by copying the jar files from the java/application/lib and java/util/lib folder to the Tomcat/webapps/CVP/WEB-INF/lib folder but this seems an unsatisfactory solution. The whole idea of having the jar files specific to the application was to avoid having them globally accessible to all other applications. Am I missing something here? Any help on clalrifying the purpose of the java/application/lib and java/util/lib folders would be greatly appreciated. Many Thanks. Graham.

Subject: Re: New Message from Graham Whitelam in Customer Voice Portal (CVP) - Gener
Replied by: Janine Graves on 17-05-2013 12:49:51 PM
Are your jar files using any external libs (other than things you wrote from scratch)  - like AXIS, Jaxb, etc? Some of these things need to be loaded by Tomcat in a certain order.

Subject: RE: CVP 8.5 Class Loader
Replied by: Hemal Mehta on 19-05-2013 08:27:18 PM
Graham Whitelam:
Hello, I have some custom Java elements which I have developed for CVP 8.5. When the call flow is developed, I copy my element jar files to the java/application/lib folder and the dependencies to the java/util/lib folder of the CVP application.
I deploy the application to the VXML server and the jar file are copied across into the application java folder as described above.
When I place a call into the application one of my elements is executed but it throws a ClassCastException. I also see a further problem with another of my elements which throws a ClassNotFoundException even though the class is in one of the jar files deployed with the application as described above.
I can resolve both of the above issues by copying the jar files from the java/application/lib and java/util/lib folder to the Tomcat/webapps/CVP/WEB-INF/lib folder but this seems an unsatisfactory solution. The whole idea of having the jar files specific to the application was to avoid having them globally accessible to all other applications. Am I missing something here? Any help on clalrifying the purpose of the java/application/lib and java/util/lib folders would be greatly appreciated. Many Thanks. Graham.

 
 If you a class application specific then it need to go to the java/application/lib folder.  In this uril folder typically you will put libraries related to urilities such such as Math, parsing etcj. Remember that the classes you deploy to util folder will not be updated when you run the update App script.  I generally place third party libraries in  TOMCAT_HOME/common/lib dir. I you have a class that needs to be shared across all applications you need to deploy it in the vxml server common folder.
Hemal
 
 
 
 

Subject: RE: New Message from Janine Graves in Customer Voice Portal (CVP) - General
Replied by: Graham Whitelam on 20-05-2013 03:09:27 AM
Hi Janine,

Thank you for the swift response. Here’s a bit more detail: -


·         I have a StartCall class which uses the Hibernate API to read data from a database. It then stores some Java beans as session data. I then have a decision element which retrieves the data from the CVP session. When the decision element executes I get the ClassNotFoundException even though the bean class is in the java/util/lib folder for the application. Also the StartCall element can find the class when it executes which is strange.

·         I have a decision element which contacts a server using a bespoke XML API over TCP and fetches some data. The data is then stored in a CVP session variable. A SayItSmart element that I developed then tries to access that data but I get the ClassCastException (even though the Object passed to the SayItSmart is of the correct class). I believe that this is a class-loader issue as the two objects cannot be cast as they were loaded with different class loaders.

I guess I’m looking for what is best practice to avoid the issues above. Although I resolved the issue, copying the jar files to an area which makes them accessible to all applications seems a little inelegant. The contents of the two application lib folders are shown below. I have removed the element jar file name as it contained the customer name: -

Java/application/lib
17/05/2013  14:19            57,809 <CVP Element Jar File>.jar

Java/util/lib
15/05/2013  12:08           443,432 antlr-2.7.6.jar
15/05/2013  12:08           559,366 commons-collections-3.1.jar
15/05/2013  12:08            60,686 commons-logging-1.1.1.jar
15/05/2013  12:08           313,898 dom4j-1.6.1.jar
15/05/2013  12:08            71,283 hibernate-commons-annotations-3.2.0.Final.jar
15/05/2013  12:08         3,123,360 hibernate-core-3.6.10.Final.jar
15/05/2013  12:08           102,661 hibernate-jpa-2.0-api-1.0.1.Final.jar
15/05/2013  12:08           644,148 javassist-3.12.1.GA.jar
15/05/2013  12:08            15,071 jta-1.1.jar
15/05/2013  12:08           489,884 log4j-1.2.17.jar
15/05/2013  12:08         2,714,189 ojdbc6-11.2.0.3.0.jar
15/05/2013  12:08            25,496 slf4j-api-1.6.1.jar
15/05/2013  12:08            10,336 slf4j-simple-1.6.6.jar
15/05/2013  12:30             7,188 xmlpull-1.1.3.1.jar
15/05/2013  12:30            24,956 xpp3_min-1.1.4c.jar

Graham

From: Cisco Developer Community Forums [mailto:cdicuser@developer.cisco.com]
Sent: 17 May 2013 18:50
To: cdicuser@developer.cisco.com
Subject: New Message from Janine Graves in Customer Voice Portal (CVP) - General Discussion - All Versions: Re: New Message from Graham Whitelam in Customer Voice Portal (CVP) - Gener

Janine Graves has created a new message in the forum "General Discussion - All Versions": -------------------------------------------------------------- Are your jar files using any external libs (other than things you wrote from scratch) - like AXIS, Jaxb, etc? Some of these things need to be loaded by Tomcat in a certain order.
--
To respond to this post, please click the following link: http://developer.cisco.com/web/cvp/forums/-/message_boards/view_message/15376360 or simply reply to this email.
______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________




This email has been scanned for all viruses.

Please consider the environment before printing this email.

The content of this email and any attachment is private and may be privileged. If you are not the intended recipient, any use, disclosure, copying or forwarding of this email and/or its attachments is unauthorised. If you have received this email in error please notify the sender by email and delete this message and any attachments immediately. Nothing in this email shall bind the Company or any of its subsidiaries or businesses in any contract or obligation, unless we have specifically agreed to be bound.

KCOM Group PLC is a public limited company incorporated in England and Wales, company number 02150618 and whose registered office is at 37 Carr Lane, Hull, HU1 3RE.

118288 - KCOM Group UK Directory Enquiries. Calls will cost no more than 99p connection + 49p per minute including VAT from a KC or BT landline. Call charges from mobiles and other networks may vary. If you are calling from a mobile you will now receive your requested number via text message. You will not be charged for the text message.


______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________

Subject: Re: New Message from Graham Whitelam in Customer Voice Portal (CVP) - Gener
Replied by: Janine Graves on 20-05-2013 06:58:27 AM
Did you try putting both jar files into the application's deploy/java/application/lib folder? Or did you restart VxmlServer when you had the files in the java/util directory (it's only reloaded on a restart of VxmlServer). If you want to try these options, you must remember to take the jar files out of the VxmlServer/common directory because VxmlServer/common takes precedence.  And restart VxmlServer.
Comments
surya1
Community Member

admin

   Hi Graham,

      I am having a similar situation where i am using Hibernate to connect to database. But for some reason when I deploy the Hibernate jars the application doesn't load. I have tried placing jars in all tomcat common lib, CVP common lib, application lib, util lib. Can you suggest any other way to get this working. Any help is appreciated.

hemal.mehta
Level 5
Level 5

I have my hibernate files  placed under C:\Cisco\CVP\VXMLServer\Tomcat\common\lib only and it works just fine.

What is the error you get ?

Hemal

surya1
Community Member

I got this resolved. I had to place the jar filesin UTIL lib.

surya1
Community Member

Hi Hemal,

      Just wanted to get some feedback on the hibernate in your CVP application. Do you see any performance related issues.  I am having few issues when I continuously deploy the application. I am getting a premgen space error. Do you have any traces as such in the environment you are using?

     As well are you calling hibernate directly in your CVP or do you have any middle layer that you connect to?

Appreciate your feedback.

hemal.mehta
Level 5
Level 5

Yes, I have seen issues happening with hibernate and CVP. I use hibernate in my PCS app and do not have an issue. What is your JVM setting on vxml server ?

Also are you getting the error in the logs when the application is running or just when you deploy ?

Are you saying that get the error when you deploy multiple times ?

Hemal

surya1
Community Member

This happens when we deploy and update the application few times. The premgen space is going up. The server crashes then as it is overflown. Can you share your JVM setting if you have any to optimize.

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