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
Watch4Net/M&R - 7.X
In /APG_HOME/Web-Servers/Tomcat/Default/webapps/cas/WEB-INF/deployerConfigContext.xml
IP/FQDN of Master DB in JDBC URL set is incorrect.
To resolve the issue, modify the deployerConfigContext.xml on the Frontend host as mentioned below:
/APG_HOME/Web-Servers/Tomcat/Default/webapps/cas/WEB-INF/deployerConfigContext.xml
<!-- 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={"url":"jdbc:mysql://IP|FQDN:53306/masterautoReconnect=true&connectTimeout=20000&maxReconnects=2&u
seSSL=false","password":"{6230FED930DD59BEB1095D6801AA74E2FC23B2C8B76AFF6447D5C49B84C4001FDF5B6441DF7CD5CB2B19D4A27C63934}","driverClassName":"com.mysql.jdbc.Driver","username":"apg"}" />
</bean>
<bean id="casDatastore" class="com.watch4net.apg.gui.datasource.jdbc.JDBCFactory" factory-method="createDatasource">
<constructor-arg ref="dbConfigJson" />
</bean>
<!-- END EMC W4n Change -->
/APG_HOME/bin/manage-modules.sh service restart tomcat <instance name>