Legacy UI Build Error

Hi, when I tried to build legacy UI i’m getting errors. Full Error trace is included. Thanks for any reply in advance

[INFO] Legacy UI Module .................................. SUCCESS [0.328s]
[INFO] Legacy UI Module API .............................. SUCCESS [2.399s]
[INFO] Legacy UI Module OMOD ............................. FAILURE [4.182s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.344s
[INFO] Finished at: Tue May 31 13:18:19 IST 2016
[INFO] Final Memory: 41M/373M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project legacyui-omod: Compilation failure: Compilation failure:
[ERROR] /home/kishore/openmrsworkspace/openmrs-module-legacyui-master/omod/src/main/java/org/openmrs/web/controller/ConceptFormController.java:[36,18] error: cannot find symbol
[ERROR] 
[ERROR] could not parse error message:   symbol:   class ConceptAttribute
[ERROR] location: package org.openmrs
[ERROR] /home/kishore/openmrsworkspace/openmrs-module-legacyui-master/omod/src/main/java/org/openmrs/web/controller/ConceptFormController.java:460: error: cannot find symbol
[ERROR] public Collection<ConceptAttribute> activeAttributes;
[ERROR] ^
[ERROR] 
[ERROR] could not parse error message:   symbol:   class ConceptAttribute
[ERROR] location: class ConceptFormController.ConceptFormBackingObject
[ERROR] /home/kishore/openmrsworkspace/openmrs-module-legacyui-master/omod/src/main/java/org/openmrs/web/controller/ConceptFormController.java:1125: error: cannot find symbol
[ERROR] public Collection<ConceptAttribute> getActiveAttributes() {
[ERROR] ^
[ERROR] 
[ERROR] could not parse error message:   symbol:   class ConceptAttribute
[ERROR] location: class ConceptFormController.ConceptFormBackingObject
[ERROR] /home/kishore/openmrsworkspace/openmrs-module-legacyui-master/omod/src/main/java/org/openmrs/web/controller/ConceptFormController.java:1129: error: cannot find symbol
[ERROR] public void setActiveAttributes(Collection<ConceptAttribute> activeAttributes) {
[ERROR] ^
[ERROR] 
[ERROR] could not parse error message:   symbol:   class ConceptAttribute
[ERROR] location: class ConceptFormController.ConceptFormBackingObject
[ERROR] /home/kishore/openmrsworkspace/openmrs-module-legacyui-master/omod/src/main/java/org/openmrs/web/controller/concept/ConceptAttributeTypeFormController.java:12: error: cannot find symbol
[ERROR] import org.openmrs.ConceptAttributeType;
[ERROR] ^
[ERROR] 
[ERROR] could not parse error message:   symbol:   class ConceptAttributeType
[ERROR] location: package org.openmrs
[ERROR] /home/kishore/openmrsworkspace/openmrs-module-legacyui-master/omod/src/main/java/org/openmrs/web/controller/concept/ConceptAttributeTypeFormController.java:16: error: cannot find symbol
[ERROR] import org.openmrs.validator.ConceptAttributeTypeValidator;
[ERROR] ^
[ERROR] 
[ERROR] could not parse error message:   symbol:   class ConceptAttributeTypeValidator
[ERROR] location: package org.openmrs.validator
[ERROR] /home/kishore/openmrsworkspace/openmrs-module-legacyui-master/omod/src/main/java/org/openmrs/web/controller/concept/ConceptAttributeTypeFormController.java:40: error: cannot find symbol
[ERROR] public Boolean getDatatypeReadOnly( @RequestParam(value = "id", required = false) ConceptAttributeType attrType) {
[ERROR] ^
[ERROR] 
[ERROR] could not parse error message:   symbol:   class ConceptAttributeType
[ERROR] location: class ConceptAttributeTypeFormController
[ERROR] /home/kishore/openmrsworkspace/openmrs-module-legacyui-master/omod/src/main/java/org/openmrs/web/controller/concept/ConceptAttributeTypeFormController.java:54: error: cannot find symbol
[ERROR] @RequestParam(value = "id", required = false) ConceptAttributeType attrType) {
[ERROR] ^
[ERROR] 
[ERROR] could not parse error message:   symbol:   class ConceptAttributeType
[ERROR] location: class ConceptAttributeTypeFormController
[ERROR] /home/kishore/openmrsworkspace/openmrs-module-legacyui-master/omod/src/main/java/org/openmrs/web/controller/concept/ConceptAttributeTypeFormController.java:53: error: cannot find symbol
[ERROR] public ConceptAttributeType formBackingObject(
[ERROR] ^
[ERROR] 
[ERROR] could not parse error message:   symbol:   class ConceptAttributeType
[ERROR] location: class ConceptAttributeTypeFormController
[ERROR] /home/kishore/openmrsworkspace/openmrs-module-legacyui-master/omod/src/main/java/org/openmrs/web/controller/concept/ConceptAttributeTypeFormController.java:69: error: cannot find symbol
[ERROR] public String handleSubmit(WebRequest request, @ModelAttribute("attributeType") ConceptAttributeType conceptAttributeType,
[ERROR] ^
[ERROR] 
[ERROR] could not parse error message:   symbol:   class ConceptAttributeType
[ERROR] location: class ConceptAttributeTypeFormController
[ERROR] /home/kishore/openmrsworkspace/openmrs-module-legacyui-master/omod/src/main/java/org/openmrs/web/controller/concept/ConceptAttributeTypeFormController.java:92: error: cannot find symbol
[ERROR] private String unretireConceptAttributeType(WebRequest request, @ModelAttribute("attributeType") ConceptAttributeType conceptAttributeType) {
[ERROR] ^
[ERROR] 
[ERROR] could not parse error message:   symbol:   class ConceptAttributeType
[ERROR] location: class ConceptAttributeTypeFormController
[ERROR] /home/kishore/openmrsworkspace/openmrs-module-legacyui-master/omod/src/main/java/org/openmrs/web/controller/concept/ConceptAttributeTypeFormController.java:99: error: cannot find symbol
[ERROR] private String retireConceptAttributeType(WebRequest request, ConceptAttributeType conceptAttributeType, BindingResult errors) {
[ERROR] ^
[ERROR] 
[ERROR] could not parse error message:   symbol:   class ConceptAttributeType
[ERROR] location: class ConceptAttributeTypeFormController
[ERROR] /home/kishore/openmrsworkspace/openmrs-module-legacyui-master/omod/src/main/java/org/openmrs/web/controller/concept/ConceptAttributeTypeFormController.java:111: error: cannot find symbol
[ERROR] private String purgeConceptAttributeType(WebRequest request, ConceptAttributeType conceptAttributeType, ConceptService conceptService) {
[ERROR] ^
[ERROR] 
[ERROR] could not parse error message:   symbol:   class ConceptAttributeType
[ERROR] location: class ConceptAttributeTypeFormController
[ERROR] /home/kishore/openmrsworkspace/openmrs-module-legacyui-master/omod/src/main/java/org/openmrs/web/controller/concept/ConceptAttributeTypeFormController.java:123: error: cannot find symbol
[ERROR] private String saveConceptAttributeType(WebRequest request, ConceptAttributeType conceptAttributeType, ConceptService conceptService) {
[ERROR] ^
[ERROR] 
[ERROR] could not parse error message:   symbol:   class ConceptAttributeType
[ERROR] location: class ConceptAttributeTypeFormController
[ERROR] /home/kishore/openmrsworkspace/openmrs-module-legacyui-master/omod/src/main/java/org/openmrs/web/controller/ConceptFormController.java:265: error: cannot find symbol
[ERROR] WebAttributeUtil.handleSubmittedAttributesForType(conceptBackingObject.getConcept(), errors, ConceptAttribute.class, request,
[ERROR] ^
[ERROR] 
[ERROR] could not parse error message:   symbol:   class ConceptAttribute
[ERROR] location: class ConceptFormController
[ERROR] /home/kishore/openmrsworkspace/openmrs-module-legacyui-master/omod/src/main/java/org/openmrs/web/controller/ConceptFormController.java:266: error: cannot find symbol
[ERROR] cs.getAllConceptAttributeTypes());
[ERROR] ^
[ERROR] 
[ERROR] could not parse error message:   symbol:   method getAllConceptAttributeTypes()
[ERROR] location: variable cs of type ConceptService
[ERROR] /home/kishore/openmrsworkspace/openmrs-module-legacyui-master/omod/src/main/java/org/openmrs/web/controller/ConceptFormController.java:408: error: cannot find symbol
[ERROR] map.put("attributeTypes", cs.getAllConceptAttributeTypes());
[ERROR] ^
[ERROR] 
[ERROR] could not parse error message:   symbol:   method getAllConceptAttributeTypes()
[ERROR] location: variable cs of type ConceptService
[ERROR] /home/kishore/openmrsworkspace/openmrs-module-legacyui-master/omod/src/main/java/org/openmrs/web/controller/ConceptFormController.java:529: error: cannot find symbol
[ERROR] this.activeAttributes = concept.getActiveAttributes();
[ERROR] ^
[ERROR] 
[ERROR] could not parse error message:   symbol:   method getActiveAttributes()
[ERROR] location: variable concept of type Concept
[ERROR] /home/kishore/openmrsworkspace/openmrs-module-legacyui-master/omod/src/main/java/org/openmrs/web/controller/concept/ConceptAttributeTypeListController.java:30: error: cannot find symbol
[ERROR] model.addAttribute("attributeTypes", Context.getConceptService().getAllConceptAttributeTypes());
[ERROR] ^
[ERROR] 
[ERROR] could not parse error message:   symbol:   method getAllConceptAttributeTypes()
[ERROR] location: interface ConceptService
[ERROR] /home/kishore/openmrsworkspace/openmrs-module-legacyui-master/omod/src/main/java/org/openmrs/web/controller/concept/ConceptAttributeTypeFormController.java:56: error: cannot find symbol
[ERROR] attrType = new ConceptAttributeType();
[ERROR] ^
[ERROR] 
[ERROR] could not parse error message:   symbol:   class ConceptAttributeType
[ERROR] location: class ConceptAttributeTypeFormController
[ERROR] /home/kishore/openmrsworkspace/openmrs-module-legacyui-master/omod/src/main/java/org/openmrs/web/controller/concept/ConceptAttributeTypeFormController.java:76: error: cannot find symbol
[ERROR] new ConceptAttributeTypeValidator().validate(conceptAttributeType, errors);
[ERROR] ^
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :legacyui-omod

If you have the 2.x branch of the platform checked out, pull its latest changes and compile it again. The you will recompile the legacyui module.

1 Like

@dkayiwa thank you :slight_smile:

Please help me out with this issue too. when run in local using apache getting a class not found exception. multiple time I install maven for generating the war the class is missing. > ServiceContext.doneRefreshingContext(827) |2016-05-31 17:32:09,484| Done refreshing Context > Exception in thread “Thread-9” java.lang.NoClassDefFoundError: org/openmrs/ConceptAttributeType > at java.lang.Class.getDeclaredMethods0(Native Method) > at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) > at java.lang.Class.getDeclaredMethods(Class.java:1975) > at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:571) > at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:490) > at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:474) > at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:241) > at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:1057) > at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1030) > at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504) > at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) > at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303) > at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) > at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299) > at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) > at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:762) > at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757) > at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480) > at org.openmrs.module.ModuleUtil.refreshApplicationContext(ModuleUtil.java:842) > at org.openmrs.module.web.WebModuleUtil.refreshWAC(WebModuleUtil.java:866) > at org.openmrs.web.Listener.performWebStartOfModules(Listener.java:643) > at org.openmrs.web.Listener.performWebStartOfModules(Listener.java:622) > at org.openmrs.web.Listener.startOpenmrs(Listener.java:260) > at org.openmrs.web.WebDaemon$1.run(WebDaemon.java:42) > Caused by: java.lang.ClassNotFoundException: org.openmrs.ConceptAttributeType > at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1722) > at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1573) > at org.openmrs.module.ModuleClassLoader.loadClass(ModuleClassLoader.java:563) > at java.lang.ClassLoader.loadClass(ClassLoader.java:357) > … 24 more >

java.lang.NoClassDefFoundError: org/openmrs/ConceptAttributeType
	java.lang.Class.getDeclaredMethods0(Native Method)
	java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
	java.lang.Class.getDeclaredMethods(Class.java:1975)
	org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:571)
	org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:490)
	org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping.determineUrlsForHandlerMethods(DefaultAnnotationHandlerMapping.java:178)
	org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping.determineUrlsForHandler(DefaultAnnotationHandlerMapping.java:153)
	org.springframework.web.servlet.handler.AbstractDetectingUrlHandlerMapping.detectHandlers(AbstractDetectingUrlHandlerMapping.java:79)
	org.springframework.web.servlet.handler.AbstractDetectingUrlHandlerMapping.initApplicationContext(AbstractDetectingUrlHandlerMapping.java:58)
	org.springframework.context.support.ApplicationObjectSupport.initApplicationContext(ApplicationObjectSupport.java:120)
	org.springframework.web.context.support.WebApplicationObjectSupport.initApplicationContext(WebApplicationObjectSupport.java:76)
	org.springframework.context.support.ApplicationObjectSupport.setApplicationContext(ApplicationObjectSupport.java:74)
	org.springframework.context.support.ApplicationContextAwareProcessor.invokeAwareInterfaces(ApplicationContextAwareProcessor.java:119)
	org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:94)
	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:408)
	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1558)
	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
	org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
	org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
	org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
	org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
	org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:523)
	org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1060)
	org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:277)
	org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:281)
	org.springframework.web.servlet.DispatcherServlet.initHandlerMappings(DispatcherServlet.java:552)
	org.springframework.web.servlet.DispatcherServlet.initStrategies(DispatcherServlet.java:466)
	org.springframework.web.servlet.DispatcherServlet.onRefresh(DispatcherServlet.java:455)
	org.springframework.web.servlet.FrameworkServlet.onApplicationEvent(FrameworkServlet.java:801)
	org.springframework.web.servlet.FrameworkServlet$ContextRefreshListener.onApplicationEvent(FrameworkServlet.java:1117)
	org.springframework.web.servlet.FrameworkServlet$ContextRefreshListener.onApplicationEvent(FrameworkServlet.java:1113)
	org.springframework.context.event.GenericApplicationListenerAdapter.onApplicationEvent(GenericApplicationListenerAdapter.java:52)
	org.springframework.context.event.SourceFilteringListener.onApplicationEventInternal(SourceFilteringListener.java:100)
	org.springframework.context.event.SourceFilteringListener.onApplicationEvent(SourceFilteringListener.java:69)
	org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:151)
	org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:128)
	org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:331)
	org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:773)
	org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:483)
	org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:663)
	org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:629)
	org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:677)
	org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:548)
	org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:489)
	org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
	javax.servlet.GenericServlet.init(GenericServlet.java:158)
	org.openmrs.web.DispatcherServlet.init(DispatcherServlet.java:84)
	org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
	org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
	org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
	org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
	org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
	java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	java.lang.Thread.run(Thread.java:745)

Which version of OpenMRS are you running? Can i see the entire log at pastebin.com?

@dkayiwa http://pastebin.com/k6YrprQA

Can you do a paste which is public?

yeah, its done.

The version you are running does not have the concept attributes changes. Can pull the changes and run the correct version?