Purpose (problem description)

This page describes how to troubleshoot, when you get the message "Unexpected Error" after trying to connect to HD.

Observed in CAST AIP
Release
Yes/No
8.3.x(tick)
8.2.x(tick) 
8.1.x(tick) 
8.0.x(tick) 
7.3.x(tick) 
Observed on RDBMS
RDBMS
Yes/No
Oracle Server(tick) 
Microsoft SQL Server(tick) 
CSS3(tick)
CSS2(tick) 

Step by Step scenario

  1. Deploy HD WAR file
  2. Try to connect to the HD

Action Plan

  1. The issue can be on tomcat side, in this case the resources loaded by the HD while trying to connect to the measure schema will be missed, so the first action to do before troubleshooting this issue is to restart tomcat, then try to connect to the HD

  2. If you are using Cast AIP 7.3.x , Apache Tomcat 8 is NOT officially supported by Cast AIP 7.3.x. The following page describes the configuration changes you need to make if you would like to use the CAST Application Analytics Dashboard with Apache Tomcat 8  Using the CAST Application Analytics Dashboard with Tomcat 8, Ensure that you have the same configuration described in this page.
  3. Check if you are creating a resource for tomcat 7 and you are on tomcat 8 or 8.5, if yes then follow the Instructions for Tomcat 8 and 8.5
  4. Check if you are creating a resource for tomcat 8 and you are on tomcat 7, if yes then follow the Instructions for Tomcat 7
  5. Check if  the postgresql jar "postgresql-9.2-1004.jdbc3.jar" is not missing in the lib directory of tomcat, it's located in the following directory: <tomcat_install_dir>\Tomcat X.X\webapps\WEB-INF\lib, if this is the case then reinstall your tomcat. for that refer to Tomcat website
  6. If you have encrypted the login and password that are defined when configuring access to the RDBMS/CSS database server where your Measurement is located (refer to Encrypting access to RDBMS/CSS database servers), then open stdout Tomcat log file located at <tomcat_install_dir>\Tomcat X.X\logs, and search for the following warning: 

    WARNING [localhost-startStop-1] org.apache.catalina.core.NamingContextListener.addResource Failed to register in JMX: [javax.naming.NamingException: Could not load resource factory class [Root exception is java.lang.ClassNotFoundException: com.castsoftware.adg.webservice.security.BasicDataSourceFactory2]]

    If you find the warning, then the file BasicDataSourceFactory2.class is missing from the deployment folder, we can enumerate 2 root causes:

    1. If your are using a CAST AIP version between 8.3.1 an 8.3.3, then the file was missing by default from the deployment folder, this was fixed starting from 8.3.4. As a workaround perform the following:

      1. Add the file BasicDataSourceFactory2.class to the following location: <tomcat_install_dir>\Tomcat X.X\webapps\<WAR folder>WEB-INF\classes\com\castsoftware\adg\webservice\security

      2. Restart the application in Tomcat

      3. Try to connect to the HD

    2. Else, if you are not using a CAST AIP version between 8.3.1 an 8.3.3 then ether the file was removed manually or the WAR folder was not deployed correctly due to a server complication, for example connection failed. In this case perform the following:

      1. Archive the current WAR folder from the location <tomcat_install_dir>\Tomcat X.X\webapps.

      2. Deploy and configure a fresh WAR folder

      3. Restart the application in Tomcat

      4. Try to connect to the HD

  7. If the above information does not solve your problem, then contact CAST Technical Support and provide the Relevant input
Notes/comments

Ticket # 7837 #12097

Related Pages