Unable to view notifications dashboard
search cancel

Unable to view notifications dashboard

book

Article ID: 332801

calendar_today

Updated On:

Products

VMware Smart Assurance

Issue/Introduction

Symptoms:

Unable to view Smarts Notifications in Watch4Net|M&R. Following error seen in Tomcat cas log:

The Spring ContextLoaderListener we wrap threw on contextInitialized.
But for our having caught this error, the web application context would not have initialized.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ticketRegistry': Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/deployerConfigContext.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: CasPersistence] Unable to build EntityManagerFactory
 

 

Environment

Watch4Net/M&R - 7.X

Cause

In /APG_HOME/Web-Servers/Tomcat/Default/webapps/cas/WEB-INF/deployerConfigContext.xml IP/FQDN of Master DB in JDBC URL set is incorrect.

Resolution

To resolve the issue, modify the deployerConfigContext.xml on the Frontend host as mentioned below:

  • Path to file:
     /APG_HOME/Web-Servers/Tomcat/Default/webapps/cas/WEB-INF/deployerConfigContext.xml
  • Make sure the file doesn't contain localhost for the following section:

     <!-- START EMC W4n Change -->
      <util:properties location =
            "#{'file:///'+systemProperties['catalina.home'].trim()+'/../../../Custom/WebApps-Resources/Default/property/emc-smarts.properties'}"
            id="myProps"/>

        <bean id="objMapper" class="com.fasterxml.jackson.databind.ObjectMapper" />

        <bean id="dbConfigJson" factory-bean="objMapper" factory-method="readTree">
          <constructor-arg value={&quot;url&quot;:&quot;jdbc:mysql://IP|FQDN:53306/masterautoReconnect=true&amp;connectTimeout=20000&amp;maxReconnects=2&amp;u
    seSSL=false&quot;,&quot;password&quot;:&quot{6230FED930DD59BEB1095D6801AA74E2FC23B2C8B76AFF6447D5C49B84C4001FDF5B6441DF7CD5CB2B19D4A27C63934}&quot;,&quot;driverClassName&quot;:&quot;com.mysql.jdbc.Driver&quot;,&quot;username&quot;:&quot;apg&quot;}" />
        </bean>

        <bean id="casDatastore" class="com.watch4net.apg.gui.datasource.jdbc.JDBCFactory" factory-method="createDatasource">
          <constructor-arg ref="dbConfigJson" />
        </bean>

      <!-- END EMC W4n Change -->

  • It should be the IP/FQDN of the primary backend host.
  • After making the change and saving the file, restart tomcat service.
    • /APG_HOME/bin/manage-modules.sh service restart tomcat <instance name>
  • Once the tomcat service comes back up, Refresh the report and you should be able to view the notifications.