CVP VXML Script - Oracle Database Issue

Unanswered Question

Hi all,

I am integrating a VXML script with a backend system (oracle9 database) through database element using JNDI.

I have remarked that there is no data returned from the query. There is no error in the error log but this warning in the activity log : 'A substitution representing Element data from element "dbQuery" and variable named "etat" referred to non-existent information. An empty string was substituted instead.'

The query works very well using other a web page and jdbc.

What may be the reason?

Thanks for help.

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
irisrios Fri, 07/04/2008 - 06:23

CVP VoiceXML Server itself does not remove or overwrite old log files.

Since log files are not purged by the system, it is the responsibility of the administrator to maintain necessary log file management. This becomes necessary for high volume systems since log files can take a significant amount of disk space depending on the details stored in them.

Is Oracle supported?

It was my understanding that the Database Element using JDNI only worked with two drivers. The standard MySQL Java driver (free) to a MySQL database, and the iNET Java driver to a Microsoft SQL Server.

This is consistent with the error. When the Database Element works correctly it will create data elements hanging off it with the names of the columns in the table you query. Obviously, to do this it needs to execute metadata queries and not all drivers support the methods it needs to call.

I could be wrong about this, but it was certainly true with CVP 3.x

You could surely write a custom Java class to query Oracle using Oracle's Java driver.



Chad Stachowicz Sat, 07/05/2008 - 11:16


I have a question. I have made a JNDI connection with MSSQL wia the inet driver and then place a query in my script with the Database Element. My question is, how do I use the data that this query retrieved in my other elements in call studio. I am unclear about where the data is retrieved to. Basically my query is going to retrieve "2323" and I want to do is to say it smart. What variable will hold this "2323" from the database?




I have not done this, but have a colleague in the UK who has. Let's say your Database Element is called Database_Read and your SQL query is something like "SELECT Foo FROM MyTable WHERE PrimaryKey = '1234'.

Then the system will create an element like


where the result "2323" lives.



Chad Stachowicz Sat, 07/05/2008 - 14:54


I figured I would see this automagically populate this variable as existing in Call Studio. Am I just supposed to know this element exists?

Cheers, and thanks as always!


Chad Stachowicz Sat, 07/05/2008 - 19:08

Totally works man! Finally! However see my other post about I can only pack back the information this is recovering in the Caller_Input field. My FromExtVXML Array seems to not be working however...




i fixed it, but the solution is strange.

my query was: select language from cu_db where clid=data.session.clid

I changed it to

select LANGUAGE from cu_db where clid=data.session.clid

and made sure that the logging enabled for the Database node is also in CAPS like LANGUAGE Data.Element.get_from_db.LANGUAGE

and it worked, and I stopped seeing the warning in the activity log and started seeing the data returned itself.

But I still see the Warning when the Query does NOT return a single row.


I'm using Oracle 9i.

First, I tried a standard 'select * from Tablename' then I tried to execute 'select count(*) numrecs from tablename'.

The VXML Server should create element data named 'numrecs' with the number of records that are in that table. I get NO element data back.

VXML Server/Tomcat is communicating correctly with the DB since :

- I get no error messages about Tomcat unable to connect to the DB

- when I try to access a non-existent DB table, I get an error message in the VXML Server logs.

Do I have to try to use the tablename in CAPS? It's really strange but I'm going to try it.

Finally, the issue was resolved..

In fact, when we make a query:

'select count(*) numrecs from mytable', normally, the result is returned in variable named 'numrecs' but actually, the result is returned in a variable named 'NUMRECS'.

So when VXML tries to retrieve data from {Data.Element.dbQuery.numrces}, it will return nothing since this variable is empty.

So here, we must retrieve data from {Data.Element.dbQuery.NUMRECS}.

Hope this will help.


This Discussion