Discussion:
[opennms-discuss] OpenNMS Squid monitoring - could not load class
Steven Vacaroaia
2017-06-07 20:48:40 UTC
Permalink
Hi,

I am unable to start OpenNMS after I enable squid data collection
Any help / suggestions will be greatly appreciated

I can snmpwalk squid OID
I used the info/config from the following sites

https://wiki.opennms.org/wiki/Squid_Data_Collection
http://www.hemmler.org/opennms/squid-ueberwachen/


The error message is

Could not load class 'org.opennms.netmgt.dao.support.IndexStorageStrategy'
for resource type 'cacheMedianSvcTable'


see below a bigger excerpt from the output.log


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:/opt/opennms/lib/org.opennms.features.events.daemon-19.1.0.jar!/beanRefContext.xml]:
Cannot resolve reference to bean 'daoContext' while setting constructor
argument; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'daoContext' defined in URL
[jar:file:/opt/opennms/lib/opennms-dao-19.1.0.jar!/beanRefContext.xml]:
Bean instantiation via constructor failed; nested exception is
org.springframework.beans.BeanInstantiationException: Failed to instantiate
[org.springframework.context.support.ClassPathXmlApplicationContext]:
Constructor threw exception; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'resourceDao' defined in class path resource
[META-INF/opennms/applicationContext-dao.xml]: Invocation of init method
failed; nested exception is
org.springframework.orm.ObjectRetrievalFailureException: Could not load
class 'org.opennms.netmgt.dao.support.IndexStorageStrategy' for resource
type 'cacheMedianSvcTable'; nested exception is
java.lang.ClassNotFoundException:
org.opennms.netmgt.dao.support.IndexStorageStrategy
at
org.springframework.beans.factory.access.SingletonBeanFactoryLocator.useBeanFactory(SingletonBeanFactoryLocator.java:404)
at
org.opennms.core.spring.BeanUtils.getBeanFactory(BeanUtils.java:80)
at org.opennms.core.spring.BeanUtils.getFactory(BeanUtils.java:132)
at
org.opennms.netmgt.daemon.AbstractSpringContextJmxServiceDaemon$1.run(AbstractSpringContextJmxServiceDaemon.java:103)
at org.opennms.core.logging.Logging.withPrefix(Logging.java:71)
at
org.opennms.netmgt.daemon.AbstractSpringContextJmxServiceDaemon.init(AbstractSpringContextJmxServiceDaemon.java:96)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275)
at
com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112)
at
com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46)
at
com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237)
at
com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138)
at
com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252)
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
Seibold, Michael
2017-06-08 07:36:42 UTC
Permalink
Hi Steven,

the IndexStorageStrategy has moved from

org.opennms.netmgt.dao.support.IndexStorageStrategy
to
org.opennms.netmgt.collection.support.IndexStorageStrategy

so the wiki seems to be outdated. Just change this in the datacollection config and opennms should start again.

-Michael

Loading...