Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-5299

You cannot start OpenNMS with a configured Selenium-Monitor

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.10.1
    • Fix Version/s: 1.10.2
    • Security Level: Default (Default Security Scheme)
    • Labels:
    • Environment:
    • Tracking Code:
      ORG

      Description

      Selenium monitor configuaration in pollerd-configuration:

      <service name="Selenium-OpenNMS-Login" interval="300000" user-defined="false" status="off">
      <parameter key="retry" value="0"/>
      <parameter key="timeout" value="3000"/>
      <parameter key="base-url" value="http://my-opennms-url"/>
      <parameter key="selenium-test" value="login-test.groovy"/>
      </service>
      <monitor service="Selenium-OpenNMS-Login" class-name="org.opennms.netmgt.poller.monitors.SeleniumMonitor"/>

      I've attached my groovy script which is located in /etc/opennms/selenium

      If I comment-in the poller configuration parts OpenNMS runs fine.

      The error in output.log:
      --------------------------------
      An error occurred while attempting to start the "OpenNMS:Name=Eventd" service (class org.opennms.netmgt.eventd.jmx.Eventd). Shutting down and exiting.
      javax.management.RuntimeMBeanException: org.springframework.beans.factory.access.BootstrapException: Unable to return specified BeanFactory instance: factory key [eventDaemonContext], from group with resource name [classpath*:beanRefContext.xml]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'eventDaemonContext' defined in URL [jar:file:/usr/share/opennms/lib/opennms-services-1.10.1.jar!/beanRefContext.xml]: Cannot resolve reference to bean 'commonContext' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'commonContext' defined in URL [jar:file:/usr/share/opennms/lib/opennms-services-1.10.1.jar!/beanRefContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.context.support.ClassPathXmlApplicationContext]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'init-pollerConfig-factory' defined in class path resource [META-INF/opennms/applicationContext-commonConfigs.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/codehaus/groovy/control/CompilationFailedException
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrow(DefaultMBeanServerInterceptor.java:856)
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrowMaybeMBeanException(DefaultMBeanServerInterceptor.java:869)
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:838)
      at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
      at org.opennms.netmgt.vmmgr.Invoker.invoke(Invoker.java:316)
      at org.opennms.netmgt.vmmgr.Invoker.invokeMethods(Invoker.java:239)
      at org.opennms.netmgt.vmmgr.Starter.start(Starter.java:245)
      at org.opennms.netmgt.vmmgr.Starter.startDaemon(Starter.java:116)
      at org.opennms.netmgt.vmmgr.Controller.start(Controller.java:190)
      at org.opennms.netmgt.vmmgr.Controller.main(Controller.java:162)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.opennms.bootstrap.Bootstrap$3.run(Bootstrap.java:346)
      at java.lang.Thread.run(Thread.java:662)
      Caused by: org.springframework.beans.factory.access.BootstrapException: Unable to return specified BeanFactory instance: factory key [eventDaemonContext], from group with resource name [classpath*:beanRefContext.xml]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'eventDaemonContext' defined in URL [jar:file:/usr/share/opennms/lib/opennms-services-1.10.1.jar!/beanRefContext.xml]: Cannot resolve reference to bean 'commonContext' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'commonContext' defined in URL [jar:file:/usr/share/opennms/lib/opennms-services-1.10.1.jar!/beanRefContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.context.support.ClassPathXmlApplicationContext]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'init-pollerConfig-factory' defined in class path resource [META-INF/opennms/applicationContext-commonConfigs.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/codehaus/groovy/control/CompilationFailedException
      at org.springframework.beans.factory.access.SingletonBeanFactoryLocator.useBeanFactory(SingletonBeanFactoryLocator.java:409)
      at org.opennms.core.utils.BeanUtils.getBeanFactory(BeanUtils.java:51)
      at org.opennms.core.utils.BeanUtils.getFactory(BeanUtils.java:93)
      at org.opennms.netmgt.daemon.AbstractSpringContextJmxServiceDaemon.init(AbstractSpringContextJmxServiceDaemon.java:97)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:93)
      at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:27)
      at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:208)
      at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:120)
      at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:262)
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
      ... 13 more
      Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'eventDaemonContext' defined in URL [jar:file:/usr/share/opennms/lib/opennms-services-1.10.1.jar!/beanRefContext.xml]: Cannot resolve reference to bean 'commonContext' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'commonContext' defined in URL [jar:file:/usr/share/opennms/lib/opennms-services-1.10.1.jar!/beanRefContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.context.support.ClassPathXmlApplicationContext]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'init-pollerConfig-factory' defined in class path resource [META-INF/opennms/applicationContext-commonConfigs.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/codehaus/groovy/control/CompilationFailedException
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
      at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:630)
      at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:148)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1003)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:907)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
      at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1079)
      at org.springframework.beans.factory.access.SingletonBeanFactoryLocator.useBeanFactory(SingletonBeanFactoryLocator.java:397)
      ... 26 more
      Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'commonContext' defined in URL [jar:file:/usr/share/opennms/lib/opennms-services-1.10.1.jar!/beanRefContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.context.support.ClassPathXmlApplicationContext]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'init-pollerConfig-factory' defined in class path resource [META-INF/opennms/applicationContext-commonConfigs.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/codehaus/groovy/control/CompilationFailedException
      at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:288)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1003)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:907)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
      ... 39 more
      Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.context.support.ClassPathXmlApplicationContext]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'init-pollerConfig-factory' defined in class path resource [META-INF/opennms/applicationContext-commonConfigs.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/codehaus/groovy/control/CompilationFailedException
      at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:141)
      at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:108)
      at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:280)
      ... 48 more
      Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'init-pollerConfig-factory' defined in class path resource [META-INF/opennms/applicationContext-commonConfigs.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/codehaus/groovy/control/CompilationFailedException
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:563)
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
      at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
      at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:105)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:126)
      ... 50 more
      Caused by: java.lang.NoClassDefFoundError: org/codehaus/groovy/control/CompilationFailedException
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:169)
      at org.opennms.netmgt.config.PollerConfigManager.findServiceMonitorClass(PollerConfigManager.java:1044)
      at org.opennms.netmgt.config.PollerConfigManager.getServiceMonitorLocators(PollerConfigManager.java:1007)
      at org.opennms.netmgt.config.PollerConfigManager.initializeServiceMonitors(PollerConfigManager.java:964)
      at org.opennms.netmgt.config.PollerConfigManager.setUpInternalData(PollerConfigManager.java:125)
      at org.opennms.netmgt.config.PollerConfigManager.<init>(PollerConfigManager.java:108)
      at org.opennms.netmgt.config.PollerConfigFactory.<init>(PollerConfigFactory.java:90)
      at org.opennms.netmgt.config.PollerConfigFactory.init(PollerConfigFactory.java:126)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:273)
      at org.springframework.beans.factory.config.MethodInvokingFactoryBean.doInvoke(MethodInvokingFactoryBean.java:162)
      at org.springframework.beans.factory.config.MethodInvokingFactoryBean.afterPropertiesSet(MethodInvokingFactoryBean.java:152)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
      ... 66 more
      Caused by: java.lang.ClassNotFoundException: org.codehaus.groovy.control.CompilationFailedException
      at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
      at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:627)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
      ... 84 more

        Attachments

          Activity

            People

            • Assignee:
              agalue Alejandro Galue
              Reporter:
              indigo Ronny Trommer
            • Votes:
              2 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: