Advertisement
Guest User

Untitled

a guest
Apr 29th, 2020
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.07 KB | None | 0 0
  1. java.lang.IllegalStateException: Failed to load ApplicationContext
  2. at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:308)
  3. at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:109)
  4. at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:75)
  5. at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:321)
  6. at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:220)
  7. at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:301)
  8. at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
  9. at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:303)
  10. at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240)
  11. at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
  12. at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
  13. at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
  14. at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
  15. at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
  16. at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
  17. at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
  18. at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
  19. at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
  20. at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
  21. at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180)
  22. at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:89)
  23. at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41)
  24. at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:541)
  25. at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:763)
  26. at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:463)
  27. at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:209)
  28. Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serviceContext' defined in class path resource [applicationContext-service.xml]: Initialization of bean failed; nested exception is org.openmrs.api.APIException: A user context must first be passed to setUserContext()...use Context.openSession() (and closeSession() to prevent memory leaks!) before using the API
  29. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
  30. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
  31. at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
  32. at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
  33. at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
  34. at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
  35. at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
  36. at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
  37. at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
  38. at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:84)
  39. at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:1)
  40. at org.springframework.test.context.TestContext.loadApplicationContext(TestContext.java:280)
  41. at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:304)
  42. ... 25 more
  43. Caused by: org.openmrs.api.APIException: A user context must first be passed to setUserContext()...use Context.openSession() (and closeSession() to prevent memory leaks!) before using the API
  44. at org.openmrs.api.context.Context.getUserContext(Context.java:239)
  45. at org.openmrs.api.context.Context.getAuthenticatedUser(Context.java:619)
  46. at org.openmrs.aop.AuthorizationAdvice.before(AuthorizationAdvice.java:49)
  47. at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:49)
  48. at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
  49. at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
  50. at com.sun.proxy.$Proxy47.toString(Unknown Source)
  51. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  52. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  53. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  54. at java.lang.reflect.Method.invoke(Method.java:498)
  55. at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
  56. at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:196)
  57. at com.sun.proxy.$Proxy47.toString(Unknown Source)
  58. at java.lang.String.valueOf(String.java:2994)
  59. at org.springframework.core.style.DefaultValueStyler.style(DefaultValueStyler.java:78)
  60. at org.springframework.core.style.StylerUtils.style(StylerUtils.java:47)
  61. at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:159)
  62. at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:141)
  63. at org.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:447)
  64. at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:499)
  65. at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:493)
  66. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1371)
  67. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1330)
  68. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086)
  69. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
  70. ... 37 more
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement