02-27-2020 12:01 PM
I am working on a new install of CVP Call Studio and trying to setup the environment correctly.
Need to know what files should be updated in order for the Database element to connect to external database. What files should the JNDI name be inserted?
I have in the Catalina_Home /context.xml, in the Server.xml, and the web.xml but not connecting. Error: cannot find JNDI datasource
Solved! Go to Solution.
02-28-2020 09:42 AM
02-28-2020 09:52 AM
Please post your current context.xml and server.xml (again) - it can't resolve the name attribute.
Into which folder did you place the context.xml?
02-28-2020 08:57 AM
02-28-2020 09:20 AM
It's kind of crazy, but you must remove the event handler from the Events tab of the DB element in order to get the error log to display information. The easy way to do this is to do this, is to change the EventList to something like dummy.* - so it doesn't go through your event handler.
02-28-2020 09:59 AM
By the way, Tomcat is case-sensitive. I noticed at least 3 typo's in your context.xml with case issues:
1. type="javax.sql.Datasource" should be type="javax.sql.DataSource"
2. minidle="30" should be minIdle="30"
3. driverClassname= should be driverClassName=
<Resource
name="TELECOM_CC"
auth="Container"
type="javax.sql.Datasource"
maxActive="50"
minidle="30"
driverClassname="com.miscrosoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://TeleSTmgr_LSNR.mdco.health-partners.org:1433;databaseName=TELECOM_CC;user=;password;multiSubnetFailover=true"
02-28-2020 11:03 AM
thanks Janine.
I made the changes to the context.xml files. I made these changes to 2 files:
cisco/callstudio/eclipse/plugins/com.audiumcorp.studio.debug.runtime/CATALINA_HOME/Tomcat/conf/context.xml
cisco/callstudio/eclipse/plugins/com.audiumcorp.studio.debug.runtime/CATALINA_HOME/conf/context.xml
I have attached both files.
after making changes to the files, and running the debugger again, it gives same errors. attaching error logs.
02-28-2020 11:08 AM
02-28-2020 11:12 AM
sorry Janine,
having a problem uploading the .xml files even when I change them to .txt.
I will just post:
this is the Catalina home conf/context.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!--Licensed to the Apache Software Foundation (ASF) under one or morecontributor license agreements. See the NOTICE file distributed withthis work for additional information regarding copyright ownership.The ASF licenses this file to You under the Apache License, Version 2.0(the "License"); you may not use this file except in compliance withthe License. You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License. -->
<!-- The contents of this file will be loaded for each web application -->
-<Context>
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<WatchedResource>WEB-INF/tomcat-web.xml</WatchedResource>
<WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
<Manager pathname=""/>
<Resource url="jdbc:sqlserver://TeleSTmgr_LSNR.mdco.health-partners.org:1433;databaseName=TELECOM_CC;user=;passwordvK~JeCD;multiSubnetFailover=true" driverClassName="com.miscrosoft.sqlserver.jdbc.SQLServerDriver" minIdle="30" maxActive="50" type="javax.sql.DataSource" auth="Container" name="jdbc/TELECOM_CC"/>
</Context>
this is the Tomcat/conf/context.xml
<Context><WatchedResource>WEB-INF/web.xml</WatchedResource><WatchedResource>WEB-INF/tomcat-web.xml</WatchedResource><WatchedResource>${catalina.base}/conf/web.xml</WatchedResource><Manager pathname=""/><Resource url="jdbc:sqlserver://TeleSTmgr_LSNR.mdco.health-partners.org:1433;databaseName=TELECOM_CC;user=;password;multiSubnetFailover=true" driverClassName="com.miscrosoft.sqlserver.jdbc.SQLServerDriver" minIdle="30" maxActive="50" type="javax.sql....</Context>
02-28-2020 11:15 AM
Janine,
the error changed! here is the error:
Caused by: com.audium.server.AudiumException: Cannot load JDBC driver class 'com.miscrosoft.sqlserver.jdbc.SQLServerDriver'
where do I get the correct driver class?
02-28-2020 11:25 AM
1. I use sqljdbc41.jar - but I have CVP11.6
2. The driver class name is inside the jar file.
One way to find out what yours is called, is to copy the jdbc jar file to a temp directory and change the extension to .zip
Then use Windows File Explorer to double-click and expand the .zip and keep expanding the subfolders until you see the filename with the .class extension
the full directory structure with the filename - but without the .class extension is what you use as the driverClassName (but change the slashes to dots).
3. For example, on mine, I see:
sqljdbc41.zip\com\microsoft\sqlserver\jdbc\SqlServerDriver.class
So my driver class name is: com.microsoft.sqlserver.jdbc.SqlServerDriver (omit the class extension)
02-28-2020 11:50 AM
02-28-2020 11:56 AM
02-28-2020 11:37 AM
Janine,
I found a typo in the driver class name..corrected and now see that it can't find the stored procedure:
Caused by: com.audium.server.AudiumException: Could not find stored procedure 'GetCCEStatus'.
at com.audium.server.action.database.DatabaseAction.doAction(DatabaseAction.java:367)
at com.audium.server.voiceElement.ActionElementBase.service(ActionElementBase.java:390)
... 27 more
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Could not find stored procedure 'GetCCEStatus'.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:262)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1632)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:600)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:522)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7225)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:3053)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:247)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:222)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(SQLServerPreparedStatement.java:444)
at org.apache.tomcat.dbcp.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:82)
at org.apache.tomcat.dbcp.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:82)
at com.audium.server.action.database.DatabaseAction.doAction(DatabaseAction.java:322)
02-28-2020 11:57 AM
does this mean I have connected to the database but not to the stored procedure in that database?
10.101.88.31.1582918420077.0.SP_ECC,02/28/2020 14:33:47.894,Database_Lookup,enter,
10.101.88.31.1582918420077.0.SP_ECC,02/28/2020 14:33:48.630,Database_Lookup,custom,num_rows_processed,0
10.101.88.31.1582918420077.0.SP_ECC,02/28/2020 --what does this mean? this is the IP of the machine but not where the stored procedure is located. should this be the iP of the machine where the database is located?
02-28-2020 12:02 PM
here is the activity log. Thanks so much for your help Janine. I don't have any help here on how to connect to external database or the stored procedure within the database. Your help has been invaluable!!!!! attaching the activity log. we have made so much progress today. Thank you.
Not sure how to connect to the stored procedure. Should there be another configuration item i'm missing? Should I add a Run configuration /java and add the connection to the stored procedure there and have it run before to establish connection?
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide