Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@mks-d
mks-d / gist:ab050137a9034adfb157d8b2aa9ff097
Created September 17, 2016 08:24
NoSuchBeanDefinitionException when using @OpenmrsProfile
ERROR - Listener.contextInitialized(188) |2016-09-16 11:24:29,701| Got exception while starting up:
org.openmrs.module.ModuleException: Unable to start OpenMRS. Error thrown was: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping#0' defined in URL [jar:file:/private/var/folders/k_/k3v3c7hd15b71kjv55zq6j5w0000gn/T/1474017743262.openmrs-lib-cache/atlas/atlas.jar!/moduleApplicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'visitDocumentsController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: protected org.openmrs.module.visitdocumentsui.VisitDocumentsContext org.openmrs.module.visitdocumentsui.web.controller.VisitDocumentsController.context; nested exception is org.springframework.beans.
@mks-d
mks-d / gist:12cbc79b1fafa24ee0c15b43ab50affe
Created September 18, 2016 13:36
java.lang.ClassCastException: AdminList cannot be cast to org.openmrs.module.Extension
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Volumes/Data/Users/dimitri/.m2/repository/org/slf4j/slf4j-simple/1.6.2/slf4j-simple-1.6.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Volumes/Data/Users/dimitri/openmrs/dev_2_3/tmp/openmrs/WEB-INF/lib/slf4j-log4j12-1.6.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/private/var/folders/k_/k3v3c7hd15b71kjv55zq6j5w0000gn/T/1474199303972.openmrs-lib-cache/visitdocumentsui/lib/slf4j-log4j12-1.6.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
log4j:ERROR A "org.apache.log4j.xml.DOMConfigurator" object is not assignable to a "org.apache.log4j.spi.Configurator" variable.
log4j:ERROR The class "org.apache.log4j.spi.Configurator" was loaded by
log4j:ERROR [{ModuleClassLoader: uid=342916734; visitdocumentsui}] whereas object of type
log4j:ERROR "org.apache.log4j.xml.DOMConfigurator
@mks-d
mks-d / gist:9f7531928e8bec2caaef6c8d8cad25e4
Last active September 18, 2016 20:01
NoSuchBeanDefinitionException: No bean named 'visitdocumentsui.ComplexDataHelper' is defined
INFO - ServiceContext.startRefreshingContext(902) |2016-09-18 21:52:43,161| Refreshing Context
INFO - AbstractSessionFactoryBean.destroy(223) |2016-09-18 21:52:43,275| Closing Hibernate SessionFactory
WARN - DisposableBeanAdapter.destroy(247) |2016-09-18 21:52:43,276| Invocation of destroy method failed on bean with name 'sessionFactory': org.hibernate.cache.CacheException: java.lang.IllegalStateException: The CacheManager has been shut down. It can no longer be used.
INFO - LocalSessionFactoryBean.buildSessionFactory(780) |2016-09-18 21:53:01,553| Building new Hibernate SessionFactory
^[[AINFO - AbstractSessionFactoryBean.destroy(223) |2016-09-18 21:53:27,054| Closing Hibernate SessionFactory
INFO - ServiceContext.doneRefreshingContext(913) |2016-09-18 21:53:27,086| Done refreshing Context
WARN - WebModuleUtil.startModule(331) |2016-09-18 21:53:27,087| Unable to refresh the WebApplicationContext for module: visitdocumentsui
org.springframework.beans.factory.BeanCreationException: Error creating bean with nam
@mks-d
mks-d / gist:b8daaeb8d92ac37346e14e256873a70c
Created September 19, 2016 13:28
NoSuchBeanDefinitionException: No qualifying bean of type [org.openmrs.module.visitdocumentsui.obs.ComplexDataHelper]
WARN - AbstractApplicationContext.refresh(487) |2016-09-19 15:25:10,453| Exception encountered during context initialization - cancelling refresh attempt
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'obsServiceTarget$child#0' defined in URL [jar:file:/openmrs/distro-2-5/.openmrs-lib-cache/visitdocumentsui/lib/visitdocumentsui-api-1.1-SNAPSHOT.jar!/moduleApplicationContext.xml]: Cannot create inner bean 'org.openmrs.module.visitdocumentsui.obs.DefaultDocumentHandler#9574c9f' of type [org.openmrs.module.visitdocumentsui.obs.DefaultDocumentHandler] while setting bean property 'handlers' with key [TypedStringValue: value [DefaultDocumentHandler], target type [null]]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.openmrs.module.visitdocumentsui.obs.DefaultDocumentHandler#9574c9f': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could no
@mks-d
mks-d / openmrs-distro.properties
Last active September 21, 2016 18:54
Modified distro 2.1 to test VDUI 1.10.x compatibility
omod.webservices.rest=2.12
omod.emrapi=1.12
omod.serialization.xstream.type=omod
omod.serialization.xstream=0.2.8
omod.appui=1.3
omod.uicommons=1.3
omod.uiframework=3.4
omod.reporting=0.9.6
omod.coreapps=1.7
omod.htmlformentry19ext=1.4
@mks-d
mks-d / gist:81caf75da160a7319f8d2b16d80dbc9e
Created October 7, 2016 18:03
org.openmrs.api.APIException: Editing some fields on Obs is not allowed
INFO - LoggingAdvice.invoke(115) |2016-10-07 19:58:05,941| In method ObsService.saveObs. Arguments: Obs=Obs #1, String=REST web service,
INFO - LoggingAdvice.invoke(155) |2016-10-07 19:58:46,734| Exiting method saveObs
ERROR - BaseRestController.handleException(115) |2016-10-07 19:58:46,756| Editing some fields on Obs is not allowed
org.openmrs.api.APIException: Editing some fields on Obs is not allowed
at org.openmrs.api.db.hibernate.ImmutableEntityInterceptor.onFlushDirty(ImmutableEntityInterceptor.java:111)
at org.openmrs.api.db.hibernate.ChainingInterceptor.onFlushDirty(ChainingInterceptor.java:75)
at org.hibernate.event.internal.DefaultFlushEntityEventListener.invokeInterceptor(DefaultFlushEntityEventListener.java:365)
at org.hibernate.event.internal.DefaultFlushEntityEventListener.handleInterception(DefaultFlushEntityEventListener.java:342)
at org.hibernate.event.internal.DefaultFlushEntityEventListener.scheduleUpdate(DefaultFlushEntityEventListener.java:293)
at org.hibernate.event.internal.Defau
@mks-d
mks-d / gist:705870ebb9886af4880eaf2911bbb644
Last active October 17, 2016 12:20
ObsResource1_9 cannot be cast to ComplexObsResource1_10
drmac:openmrs-module-visitdocumentsui dimitri$ mvn clean install
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.openmrs.module:visitdocumentsui-omod:jar:1.1-SNAPSHOT
[WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.apache.maven.plugins:maven-dependency-plugin @ org.openmrs.module:visitdocumentsui-omod:[unknown-version], /Volumes/Data/Users/dimitri/MEGA/repos/openmrs-module-visitdocumentsui/omod/pom.xml, line 314, column 12
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
@mks-d
mks-d / gist:41fba2b68f59551c8d6329772a41690a
Created October 20, 2016 13:37
java.lang.TypeNotPresentException: Type org.openmrs.activelist.Problem not present
Running org.openmrs.module.visitdocumentsui.rest.ComplexObsResource2_0Test
Tests run: 4, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 28.371 sec <<< FAILURE!
postComplexObs_shouldCommentBeSaved(org.openmrs.module.visitdocumentsui.rest.ComplexObsResource2_0Test) Time elapsed: 3.02 sec <<< ERROR!
java.lang.TypeNotPresentException: Type org.openmrs.activelist.Problem not present
at sun.reflect.annotation.TypeNotPresentExceptionProxy.generateException(TypeNotPresentExceptionProxy.java:46)
at sun.reflect.annotation.AnnotationInvocationHandler.invoke(AnnotationInvocationHandler.java:83)
at com.sun.proxy.$Proxy186.supportedClass(Unknown Source)
at org.openmrs.module.webservices.rest.web.api.impl.RestServiceImpl.initializeResources(RestServiceImpl.java:272)
at org.openmrs.module.webservices.rest.web.api.impl.RestServiceImpl.getResourceBySupportedClass(RestServiceImpl.java:417)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
@mks-d
mks-d / gist:e882c563399dc6cedc1a98a55d89aed9
Created October 20, 2016 13:57
org.openmrs.api.APIException: Editing some fields on Obs is not allowed (in unit test)
org.openmrs.api.APIException: Editing some fields on Obs is not allowed
at org.openmrs.api.db.hibernate.ImmutableEntityInterceptor.onFlushDirty(ImmutableEntityInterceptor.java:111)
at org.openmrs.api.db.hibernate.ChainingInterceptor.onFlushDirty(ChainingInterceptor.java:75)
at org.hibernate.event.internal.DefaultFlushEntityEventListener.invokeInterceptor(DefaultFlushEntityEventListener.java:365)
at org.hibernate.event.internal.DefaultFlushEntityEventListener.handleInterception(DefaultFlushEntityEventListener.java:342)
at org.hibernate.event.internal.DefaultFlushEntityEventListener.scheduleUpdate(DefaultFlushEntityEventListener.java:293)
at org.hibernate.event.internal.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:160)
at org.hibernate.event.internal.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:231)
at org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:102)
at o
@mks-d
mks-d / gist:94f2f50e78121d22fd53f5e4288aeac7
Created November 7, 2016 18:53
No qualifying bean of type [org.openmrs.module.visitdocumentsui.obs.ComplexDataHelper]
WARN - AbstractApplicationContext.refresh(487) |2016-11-07 19:37:16,319| Exception encountered during context initialization - cancelling refresh attempt
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'obsServiceTarget$child#0' defined in URL [jar:file:/Volumes/Data/Users/dimitri/openmrs/distro-2-5/.openmrs-lib-cache/visitdocumentsui/lib/visitdocumentsui-api-1.1-SNAPSHOT.jar!/moduleApplicationContext.xml]: Cannot create inner bean 'org.openmrs.module.visitdocumentsui.obs.DefaultDocumentHandler#1e901fcb' of type [org.openmrs.module.visitdocumentsui.obs.DefaultDocumentHandler] while setting bean property 'handlers' with key [TypedStringValue: value [DefaultDocumentHandler], target type [null]]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.openmrs.module.visitdocumentsui.obs.DefaultDocumentHandler#1e901fcb': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.Be