Unable to locate EtmMonitor instance in bean definitions

35 views
Skip to first unread message

Mashrur Syed

unread,
Jun 14, 2015, 10:14:09 PM6/14/15
to jetm...@googlegroups.com
Hi There!
I was trying to use JETM in our production code and run into this issue. This application is a web app with JSF 1.2, and spring 3.1.2.RELEASE. I am using these for web.xml:

<servlet>
   
<servlet-name>performanceMonitor</servlet-name>
   
<servlet-class>etm.contrib.integration.spring.web.SpringHttpConsoleServlet</servlet-class>
   
<init-param>
     
<param-name>expanded</param-name>
     
<param-value>true</param-value>
   
</init-param>
   
<!-- <init-param>
 <param-name>etmMonitorName</param-name>
 <param-value>monitorOne</param-value>
 </init-param> -->

   
<load-on-startup>2</load-on-startup>
 
</servlet>
<servlet-mapping>
   
<servlet-name>performanceMonitor</servlet-name>
   
<url-pattern>/performance/*</url-pattern>
 
</servlet-mapping>




<filter>
   
<filter-name>performance-monitor</filter-name>
   
<filter-class>
      etm.contrib.integration.spring.web.SpringHttpRequestPerformanceFilter
   
</filter-class>
   
<!-- <init-param>
 <param-name>etmMonitorName</param-name>
 <param-value>monitorOne</param-value>
 </init-param> -->

 
</filter>


 
<filter-mapping>
   
<filter-name>performance-monitor</filter-name>
   
<url-pattern>*.*</url-pattern>
 
</filter-mapping>

And inside application-context:

<jetm:runtime />


 
<jetm:console expanded="true" />
 
<jetm:monitoring>
 
<jetm:bean-pattern>LoanWorkflowUserTaskService</jetm:bean-pattern>
 
</jetm:monitoring>

Then it shows:
javax.servlet.ServletException: Unable to locate EtmMonitor instance in bean definitions.
at etm.contrib.integration.spring.web.SpringEtmMonitorContextSupport.locateEtmMonitor(SpringEtmMonitorContextSupport.java:76)

Then I tried to add:
 <bean id="monitorOne" class="etm.core.monitor.NestedMonitor"
 
init-method="start" destroy-method="stop" />
 
<bean id="etmHttpConsole" class="etm.contrib.console.HttpConsoleServer"
 
init-method="start" destroy-method="stop" autowire="constructor">
 
<constructor-arg ref="monitorOne"/>
 
</bean>

And got this:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'etm.contrib.console.HttpConsoleServer#0': Unsatisfied dependency expressed through constructor argument with index 0 of type [etm.core.monitor.EtmMonitor]: : No unique bean of type [etm.core.monitor.EtmMonitor] is defined: expected single matching bean but found 2: [monitorOne, etm.core.monitor.NestedMonitor#0]; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [etm.core.monitor.EtmMonitor] is defined: expected single matching bean but found 2: [monitorOne, etm.core.monitor.NestedMonitor#0]

Please, help.
Thanks
Mashrur
Reply all
Reply to author
Forward
0 new messages