This has also been posted to the wiki.
I have found that there is a gap in the CVP documentation in describing how to connect to a backend MySQL database with the Studio Database element. Links such as the following are outdated:
Outdated because the Tomcat admin utility has been removed from the release, it is now necessary to manually edit tomcat config files.
Here is how I got it to work.
On MySQL1) Create a database (YOUR-DBNAME) and user name (YOUR-USER) of your with a password for the user.
2) Grant permission to the user.
mysql> grant select,insert,update,execute,delete,create,drop on YOUR-DBNAME.* to YOUR-USER identified by 'YOUR-USERS-PASSWORD';
On VXML server1) Download the com.mysql.jdbc.Driver class which is contained in jar file mysql-connector-java-3.1-x.bin.jar.
You can download it from the dev.mysql.com site
http://dev.mysql.com/downloads/connector/j/3.1.html.
We recommend using version 3.1.11 (or higher), as version 3.1.10 has compatability problems.
Place the jar file in C:\Cisco\CVP\VXMLServer\Tomcat\common\lib.
2) Edit C:\Cisco\CVP\VXMLServer\Tomcat\conf\context.xml
Add the following ResourceLink line under Context:
<Context>
<ResourceLink global="jdbc/YOUR-LABEL-HERE" name="jdbc/YOUR-LABEL-HERE" type="javax.sql.DataSource"/>
3) Edit C:\Cisco\CVP\VXMLServer\Tomcat\conf\server.xml
Add the following Resource line under GlobalNamingResources:
<GlobalNamingResources>
<Resource name="jdbc/YOUR-LABEL-HERE"
auth="Container"
type="javax.sql.DataSource"
factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://IP-of-MySQL:3306/YOUR-DBNAME?autoReconnect=true"
username="YOUR-USER"
password="YOUR-USERS-PASSWORD"
maxActive="20"
maxIdle="10"
poolPreparedStatements="true" />
4) Restart Tomcat (CVP VXML Server)
In your VXML Studio application
1) In the Database element, use YOUR-LABEL-HERE as the JNDI Name.
If things don't work, here are some debugging tips:
1) On VXML server, look in C:\Cisco\CVP\VXMLServer\applications\YOUR-APPLICATION\logs\ErrorLog
The following error indicated to me that I had totally missed the mark on configuring the tomcat config files.
192.168.150.173.1216410441104.0. 07/18/2008 15:47:21.323,A built-in element encountered an exception
of type com.audium.server.AudiumException. The error was: Cannot create JDBC driver of class '' for connect URL 'null'
The root cause was: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL
'null'
The following error indicated to me that I had not yet created a user in MySQL and given them access.
-
- BEGIN NESTED EXCEPTION **
java.sql.SQLException
MESSAGE: null message from server: "Host '192.168.150.173' is not allowed to connect to this MySQL server"
2) If your MySQL server is on a separate machine from theVXML Server, run a sniffer trace on either machine and
see if any MySQL traffic is passing back and forth. The contents of the messages should give a clue as to what
is happening.
Edited by: Janet Byron on Jul 19, 2008 8:25 PM
Edited by: Janet Byron on Jul 20, 2008 7:44 AM