Load Direct message pollers not working, unable to load application context

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Load Direct message pollers not working, unable to load application context

Greg Gurr
This post was updated on .
I am trying to configure Direct for CONNECT via the README.md contained in the DirectCore project. When I uncomment out the "manageTaskScheduler" contained in the "direct.appcontext.xml" file, Wildfly will not load. I get a "NullPointerException" when it is trying to create the bean "manageTaskScheduler".
Part of the stack trace is shown below:

Error creating bean with name 'initServlet': Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'manageTaskScheduler' defined in URL [file:////usr/local/wildflyapps/wildfly-8.2.1.Final/modules/system/layers/base/org/connectopensource/configuration/main/direct.appcontext.xml]: Invocation of init method failed; nested exception is java.lang.NullPointerException' ***
: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'initServlet': Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'manageTaskScheduler' defined in URL [file:////usr/local/wildflyapps/wildfly-8.2.1.Final/modules/system/layers/base/org/connectopensource/configuration/main/direct.appcontext.xml]: Invocation of init method failed; nested exception is java.lang.NullPointerException

I traced this down to the HibernateUtilFactory class.  It is unable to load the application context, not sure why.
Does anyone know why uncommenting out the "manageTaskScheduler" bean would cause the application context to not load?  Am I missing something in the Direct configuration?


Here is more of the stack trace about the null pointer error.

Caused by: java.lang.NullPointerException
        at gov.hhs.fha.nhinc.persistence.HibernateUtilFactory.getEventHibernateUtil(HibernateUtilFactory.java:105) [CONNECTCoreLib-5.2.0-IM.jar:]
        at gov.hhs.fha.nhinc.mail.ManageTaskScheduler.init(ManageTaskScheduler.java:65) [DirectCore-5.2.0-IM.jar:]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_55]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_55]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_55]
        at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_55]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1700) [spring-beans-4.1.9.RELEASE.jar:4.1.9.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1639) [spring-beans-4.1.9.RELEASE.jar:4.1.9.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1568) [spring-beans-4.1.9.RELEASE.jar:4.1.9.RELEASE]


This line in the class "HibernateUtilFactory.java" is returning NULL:

     ClassPathXmlApplicationContext context = ClassPathSingleton.CONTEXT;

Does anyone know why this line above would NOT be able to load the Spring application context?
Any insight on this error would be greatly appreciated.


Reply | Threaded
Open this post in threaded view
|

Re: Load Direct message pollers not working, unable to load application context

Greg Gurr
For those that might be experiencing this error, I got around it by modifying the "direct.appcontext.xml" file and deleting the bean attribute "init-method=init" for the bean "manageTaskScheduler".