cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1638
Views
5
Helpful
5
Replies

CVP Common Classes

Akib Dargawale
Level 1
Level 1

Hello,

I'm new to call studio, And I'm trying to use CVP common class.

I have put one java class 'DesisionElement.class' in the VXMLServer/common/classes.

And this class is used in a decision element with just a name like 'DesicionElement'.

But When I deploy the application I'm getting an error.

I have attached the respective Screenshots.

 

Thanks in advance...

 

1 Accepted Solution

Accepted Solutions

In the Studio app, in the decision element where it says "Source" - that
also must be the fully qualified name of the java, which means you must
enter com.DecisionElement

View solution in original post

5 Replies 5

janinegraves
Spotlight
Spotlight

Without seeing the actual error log file (VxmlServer/logs/GlobalErrorLogs) or the java code, it's hard to determine exactly what the error is. Please post both the java source code and the error log. 

 

Most likely, it's either that you didn't restart VXMLServer after adding the class files into the VXMLServer/common.

Or the DecisionElement.class isn't written as a valid decision class.

Or that it's folder structure isn't valid (perhaps its missing the package directory structure).

Or doesn't match that used in the app.

1. The programming guide for CVP says that a Standard Decision must look like this. Then in Call Studio, you'd enter the class name: com.mypackage.MyClassName.  And the folder com/mypackage/MyClassName.class  would be copied either into VXMLServer/common/classes or into the Studio app into appname/deploy/java/application/classes

package com.mypackage;

public class MyClassName extends DecisionElementBase

{

            @Override

             public String doDecision(String arg0, DecisionElementData decisionApi) throws Exception {

                           // decisionApi is used to interface to VXMLServer

                           return "exitStateName"; //Note: return the name of an exit state as String

             }

}

 

And then in Call Studio decision element, you'd enter the class: com.mypackage.MyClassName

And add all the exit state strings (case sensitive).

 

The actual java class file must maintain its directory structure (com/mypackage/MyClassName.class) and either be copied into VXMLServer/common/classes - and then restart VXMLServer.  I suspect you didn't actually restart VXML Server so you didn't load those VXMLServer/common classes into memory.

 

Alternatively, remove your class file from VXMLServer/common and use my preferred method of copying the class file into the Studio Navigator pane, into the app, under AppName/deploy/java/application/classes so you end up with: AppName/deploy/java/application/classes/com/mypackage/MyClassName.class. Then when you Deploy from Studio and run the deployApp.bat or updateApp.bat - VXMLServer loads those classes into memory.

 

HTH

 

 

Hello Mam,

Thanks for your reply.

After adding the class file to the common folder I have restarted the services of the VXMLServer.

I have Attached the Zip, Please see.

The log shows this:

The error was: There was a problem loading classes from
CVP_HOME\VXMLServer/common. The root cause was:
java.lang.NoClassDefFoundError: DecisionElement (wrong name:
com/DecisionElement)

Which means that your java source code has defined a package as "package
com" therefore the java class is not valid unless it resides in a folder
named "com" .

So remove the invalid class file VXMLServer/common/classes/DecisionElement.
And create a subfolder named "com" and put your class file into that
folder: VXMLServer/common/classes/com/DecisionElement.class
Then restart VXMLServer.


Thanks, For your reply mam.

Now application was successfully deployed and updated.

But when I throw a call to the application I got this type of error-

"The error was: 'DecisionElement' is not a valid decision element class."

In the Studio app, in the decision element where it says "Source" - that
also must be the fully qualified name of the java, which means you must
enter com.DecisionElement
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: