OTRS Integration


#1

Hi All,

I have a fresh instalation with OTRS plugin:

# rpm -qa|grep opennms
opennms-repo-stable-1.0-109.noarch
opennms-core-23.0.3-1.noarch
opennms-23.0.3-1.noarch
opennms-plugin-ticketer-otrs-23.0.3-1.noarch
opennms-webapp-jetty-23.0.3-1.noarch

I’m enabling OTRS integration with the follow configuration (opennms.properties):

#opennms.ticketer.plugin=org.opennms.netmgt.ticketd.NullTicketerPlugin
opennms.ticketer.plugin=org.opennms.netmgt.ticketer.otrs31.Otrs31TicketerPlugin
opennms.alarmTroubleTicketLinkTemplate = http://otrs.test.int/otrs/index.pl?Action=AgentTicketZoom&TicketNumber=${id}
opennms.alarmTroubleTicketEnabled = true

And I’ve customized the otrs.properties file.

Now, I’ve got the follow error message:

An error occurred while attempting to start the “OpenNMS:Name=Ticketer” service (class org.opennms.netmgt.ticketd.jmx.TroubleTicketer). Shutting down and exiting.
javax.management.RuntimeMBeanException: org.springframework.beans.factory.access.BootstrapException: Unable to return specified BeanFactory instance: factory key [troubleTicketerContext], from group with resource name [classpath*:beanRefContext.xml]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘troubleTicketerContext’ defined in URL [jar:file:/opt/opennms/lib/org.opennms.features.ticketing.daemon-23.0.3.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 ‘ticketerServiceLayer’ defined in class path resource [META-INF/opennms/applicationContext-troubleTicketer.xml]: Cannot resolve reference to bean ‘ticketerPlugin’ while setting bean property ‘ticketerPlugin’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘ticketerPlugin’: FactoryBean threw exception on object creation; nested exception is java.lang.NullPointerException
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrow(DefaultMBeanServerInterceptor.java:839)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrowMaybeMBeanException(DefaultMBeanServerInterceptor.java:852)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:821)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at org.opennms.netmgt.vmmgr.Invoker.invoke(Invoker.java:277)
at org.opennms.netmgt.vmmgr.Invoker.invokeMethods(Invoker.java:206)
at org.opennms.netmgt.vmmgr.Starter.start(Starter.java:154)
at org.opennms.netmgt.vmmgr.Starter.startDaemon(Starter.java:94)
at org.opennms.netmgt.vmmgr.Controller.start(Controller.java:173)
at org.opennms.netmgt.vmmgr.Controller.main(Controller.java:150)
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:498)
at org.opennms.bootstrap.Bootstrap$4.run(Bootstrap.java:525)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.springframework.beans.factory.access.BootstrapException: Unable to return specified BeanFactory instance: factory key [troubleTicketerContext], from group with resource name [classpath*:beanRefContext.xml]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘troubleTicketerContext’ defined in URL [jar:file:/opt/opennms/lib/org.opennms.features.ticketing.daemon-23.0.3.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 ‘ticketerServiceLayer’ defined in class path resource [META-INF/opennms/applicationContext-troubleTicketer.xml]: Cannot resolve reference to bean ‘ticketerPlugin’ while setting bean property ‘ticketerPlugin’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘ticketerPlugin’: FactoryBean threw exception on object creation; nested exception is java.lang.NullPointerException
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:498)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
at sun.reflect.GeneratedMethodAccessor37.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
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)
… 13 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘troubleTicketerContext’ defined in URL [jar:file:/opt/opennms/lib/org.opennms.features.ticketing.daemon-23.0.3.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 ‘ticketerServiceLayer’ defined in class path resource [META-INF/opennms/applicationContext-troubleTicketer.xml]: Cannot resolve reference to bean ‘ticketerPlugin’ while setting bean property ‘ticketerPlugin’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘ticketerPlugin’: FactoryBean threw exception on object creation; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:275)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1148)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1050)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:512)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1064)
at org.springframework.beans.factory.access.SingletonBeanFactoryLocator.useBeanFactory(SingletonBeanFactoryLocator.java:396)
… 33 more
Caused by: 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 ‘ticketerServiceLayer’ defined in class path resource [META-INF/opennms/applicationContext-troubleTicketer.xml]: Cannot resolve reference to bean ‘ticketerPlugin’ while setting bean property ‘ticketerPlugin’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘ticketerPlugin’: FactoryBean threw exception on object creation; nested exception is java.lang.NullPointerException
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:122)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:267)
… 43 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘ticketerServiceLayer’ defined in class path resource [META-INF/opennms/applicationContext-troubleTicketer.xml]: Cannot resolve reference to bean ‘ticketerPlugin’ while setting bean property ‘ticketerPlugin’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘ticketerPlugin’: FactoryBean threw exception on object creation; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1486)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1231)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:778)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:843)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541)
at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139)
at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:105)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147)
… 45 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘ticketerPlugin’: FactoryBean threw exception on object creation; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:175)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103)
at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1601)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:254)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)
… 64 more
Caused by: java.lang.NullPointerException
at java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1011)
at java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:1006)
at org.apache.cxf.jaxws.context.WrappedMessageContext.put(WrappedMessageContext.java:470)
at org.apache.cxf.jaxws.context.WrappedMessageContext.put(WrappedMessageContext.java:421)
at org.apache.cxf.jaxws.context.WrappedMessageContext.put(WrappedMessageContext.java:47)
at org.opennms.netmgt.ticketer.otrs31.Otrs31TicketerPlugin.(Otrs31TicketerPlugin.java:74)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at org.opennms.netmgt.ticketd.TicketerPluginFactory.getObject(TicketerPluginFactory.java:72)
at org.opennms.netmgt.ticketd.TicketerPluginFactory.getObject(TicketerPluginFactory.java:43)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:168)
… 69 more
2019-03-01 15:51:38,660 ActiveMQ ShutdownHook WARN Unable to register Log4j shutdown hook because JVM is shutting down. Using SimpleLogger

However, if I enable Remedy there is not error.

How can I fix it? Your help is valuable!