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

Created by: Richard Rhinehart on 16-12-2008 04:34:20 PM
Hello,

I have what seems like a very basic question. I have written an action element and in the doAction method I connect to sql server using jtds. However I get a class not found exception on the line
Class.forName("net.sourceforge.jtds.jdbc.Driver");
just before I getConnection. I have jtds installed on my dev box and have the path referenced correctly in my java project. (everything works in my java project) I add my java project jar to the CVP app and deploy. When I call in, my call flow breaks on the previously mentioned line. I have tried putting the jtds-1.2.2.jar in these locations:
VXMLServer:
1. I created the exact same file path as on my dev env.
2. The Java\util\lib
3. Tomcat\Common\lib
4. Tomcat\server\lib
5. Tomcat\webapps\cvp\web-inf\lib

Any Ideas would be great!

Subject: Re: Jar placement
Replied by: Janine Graves on 16-12-2008 06:39:36 PM
After you moved jar files onto the vxml server did you restart tomcat? otherwise it won't know about the new classes.

You could also try putting the jar under vxmlserver slash common slash lib. And then run the admin script named updateCommonClasses.bat.

Subject: Re: Jar placement
Replied by: Richard Rhinehart on 16-12-2008 08:27:49 PM
Thanks for your response. I tried what you suggested and I still receive a class not found exception.

Subject: Re: Jar placement
Replied by: Richard Rhinehart on 16-12-2008 10:15:17 PM
Okay So I figured it out what the problem was and here is the answer. On my development box I copied the jtds-1.2.2.jar into
Call Studio/eclipse/plugins/com.audiumcorp.studio.library.common_5.1.0 folder for my java project, that contains my custom action element, to reference. Re-exported my java project jar. Then on the VXMLServer i placed it in VXMLServer/Common/lib and presto! voilla! yippie kai yay!

Hope this helps someone if they run into the same issue.

Subject: Re: Jar placement
Replied by: GEOFFREY THOMPSON on 17-12-2008 06:03:00 AM
Actually, Janine did give you the correct answer when she said: "putting the jar under vxmlserver slash common slash lib". Common classes go in server\common\classes and JARs go in server\common\lib (or VXMLserver for 4.x and newer).

If I ever put a new JAR in place, I always restart Tomcat. I am not certain that updateCommonClasses.bat would do the right thing, but it certainly may. Let's face it, JARs are not often changed - but common classes are.

The behaviour of Call Services and the class loader is quite well documented. There are some important statements in the manual that you may have glossed over. Now that you have it working, I suggest re-reading the manual - other good stuff will now be better understood.

Regards,
Geoff

Subject: Re: Jar placement
Replied by: Richard Rhinehart on 17-12-2008 04:30:22 PM
Geoff,

I agree Janine solved half my problem. But it wasn't until I added the external jar to the Call Studio/eclipse/plugins/com.audiumcorp.studio.library.common_5.1.0 folder in my development environment and referenced that path in my java project, then re-exported my custom element code to my call flow project and then redeployed it to the VXML server that I could get everything working. I had put the jar into the VXML/Common/lib folder prior to that and it would not work. It wasn't until I had both.

Subject: Re: Jar placement
Replied by: GEOFFREY THOMPSON on 18-12-2008 04:10:31 PM
You should check again how this works. What you put in Studio\common\classes is not relevant to Call Services on the Tomcat server.

I'm not sure what you mean by "I referenced that path in my java project".

There are probably a couple of ways to skin that cat. I'm glad you have it working, but I'm not sure I understand how.

Regards,
Geoff
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