Errors in openmrs-core clone

developers-forum
developers
Tags: #<Tag:0x00007fdb14a71f88> #<Tag:0x00007fdb14a71e48>

(Tarun yadav) #1

I cloned openmrs-core and then imported into eclipse as mavan project. But I am getting these errors.

Error in override-web.xml

cvc-complex-type.2.4.a: Invalid content was found starting with element ‘init-param’. One of ‘{“http://java.sun.com/xml/ns/j2ee”:servlet-class, “http://java.sun.com/xml/ns/j2ee”:jsp-file}’ is expected.

Error in src/

How can I correct this ? Am I going somewhere wrong ?


(Daniel Kayiwa) #2

If mvn clean install works, just ignore the eclipse errors. :smile:


(Tarun yadav) #3
> [ERROR] No plugin found for prefix 'jetty' in the current project and in the plugin groups [org.openmrs.maven.plugins, org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/home/mafia/.m2/repository), openmrs-repo (http://mavenrepo.openmrs.org/nexus/content/repositories/public), central (https://repo.maven.apache.org/maven2)] -> [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/NoPluginFoundForPrefixException

I am getting this error while building


(Daniel Kayiwa) #4

How are you building?


(Tarun yadav) #5

hey sorry, Actually I was doing mavel build with jetty:run on openmrs-web, After doing maven build with target as jetty:run on openmrs-webapp it worked fine. thanks @dkayiwa


(Tarun yadav) #6

@dkayiwa I am getting error while doing mvn clean install on legacyui module. Could you help me with this ?

[main] ERROR org.apache.maven.cli.MavenCli - Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project legacyui-omod: Compilation failure: Compilation failure:
[main] ERROR org.apache.maven.cli.MavenCli - /home/mafia/Desktop/openmrs-module-legacyui/omod/src/main/java/org/openmrs/web/attribute/handler/ProviderFieldGenDatatypeHandler.java:[15,42] error: cannot find symbol
[main] ERROR org.apache.maven.cli.MavenCli - symbol:   class ProviderDatatype
[main] ERROR org.apache.maven.cli.MavenCli - location: package org.openmrs.customdatatype.datatype
[main] ERROR org.apache.maven.cli.MavenCli - /home/mafia/Desktop/openmrs-module-legacyui/omod/src/main/java/org/openmrs/web/attribute/handler/ProviderFieldGenDatatypeHandler.java:[22,89] error: cannot find symbol
[main] ERROR org.apache.maven.cli.MavenCli - symbol: class ProviderDatatype
[main] ERROR org.apache.maven.cli.MavenCli - /home/mafia/Desktop/openmrs-module-legacyui/omod/src/main/java/org/openmrs/web/attribute/handler/LocationFieldGenDatatypeHandler.java:[15,42] error: cannot find symbol
[main] ERROR org.apache.maven.cli.MavenCli - symbol:   class LocationDatatype
[main] ERROR org.apache.maven.cli.MavenCli - location: package org.openmrs.customdatatype.datatype
[main] ERROR org.apache.maven.cli.MavenCli - /home/mafia/Desktop/openmrs-module-legacyui/omod/src/main/java/org/openmrs/web/attribute/handler/LocationFieldGenDatatypeHandler.java:[22,89] error: cannot find symbol
[main] ERROR org.apache.maven.cli.MavenCli - symbol: class LocationDatatype
[main] ERROR org.apache.maven.cli.MavenCli - /home/mafia/Desktop/openmrs-module-legacyui/omod/src/main/java/org/openmrs/web/attribute/handler/ConceptFieldGenDatatypeHandler.java:[16,42] error: cannot find symbol
[main] ERROR org.apache.maven.cli.MavenCli - symbol:   class ConceptDatatype
[main] ERROR org.apache.maven.cli.MavenCli - location: package org.openmrs.customdatatype.datatype
[main] ERROR org.apache.maven.cli.MavenCli - /home/mafia/Desktop/openmrs-module-legacyui/omod/src/main/java/org/openmrs/web/attribute/handler/ConceptFieldGenDatatypeHandler.java:[23,87] error: cannot find symbol
[main] ERROR org.apache.maven.cli.MavenCli - -> [Help 1]
[main] ERROR org.apache.maven.cli.MavenCli - 
[main] ERROR org.apache.maven.cli.MavenCli - To see the full stack trace of the errors, re-run Maven with the -e switch.
[main] ERROR org.apache.maven.cli.MavenCli - Re-run Maven using the -X switch to enable full debug logging.
[main] ERROR org.apache.maven.cli.MavenCli - 
[main] ERROR org.apache.maven.cli.MavenCli - For more information about the errors and possible solutions, please read the following articles:
[main] ERROR org.apache.maven.cli.MavenCli - [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[main] ERROR org.apache.maven.cli.MavenCli - 
[main] ERROR org.apache.maven.cli.MavenCli - After correcting the problems, you can resume the build with the command
[main] ERROR org.apache.maven.cli.MavenCli -   mvn <goals> -rf :legacyui-omod

(Daniel Kayiwa) #7

Do you have any local changes in the module? If not, run the following:

git reset --hard git clean -df mvn clean install


(Tarun yadav) #8

I didn’t have any chages in my local repo . On running git reset --hard , I am getting this HEAD is now at e6335ac Create a custom data type and its associated handler for concepts - TRUNK-3621


(Daniel Kayiwa) #9

@tarun14110 i have just updated the module, tried compiling it, and ended up with the exact same errors as you do have. I think this is caused by the recent commits in the module https://github.com/openmrs/openmrs-module-legacyui/commits/master

@wyclif does the legacyui module compile for you successfully?


(Wyclif Luyima) #10

@tarun14110 make sure you have pulled the latest changes for the 2.0.x branch in core and build it locally after updating and then build the legacyui module


(Wyclif Luyima) #11

You will need to checkout and build the 2.0.x branch for core, we need to create a CI plan for the 2.0.x branch in bamboo so that they 2.0.0 snapshots are available in nexus and you won’t have to do this


(Daniel Kayiwa) #12

@wyclif i did so but still ended up with a failing test.


(Wyclif Luyima) #13

This was just to get the build to pass and not really the unit tests, there is a flaky test i have been seeing in the legacyui module, is it the ConceptFormControllerTest? If yes, that has nothing to do with the datatype changes since it was randomly failing even before those changes


(Daniel Kayiwa) #14

ConceptFormControllerTest does not fail locally. It only randomly fails on CI. :smile: The locally failing test is: ProviderFormControllerTest


(Tarun yadav) #15

@wyclif I tried , but didn’t worked for me.


(Dominic Surrao) #16

I ran into the same issue during mvn clean install that Tarun did but got it to work as follows:

  • build 2.0.x branch in core

  • skipped tests by running mvn clean install -Dmaven.test.skip=true


(Dominic Surrao) #17

Getting runtime errors when launching the web app http://localhost:8080/openmrs

`HTTP ERROR 500

Problem accessing /openmrs/. Reason:

Server Error

Caused by:

org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP

PWC6199: Generated servlet error: source value 1.5 is obsolete and will be removed in a future release

PWC6199: Generated servlet error: target value 1.5 is obsolete and will be removed in a future release

PWC6199: Generated servlet error: To suppress warnings about obsolete options, use -Xlint:-options.

PWC6197: An error occurred at line: 17 in the jsp file: /WEB-INF/tags/module/legacyui/url.tag PWC6199: Generated servlet error: package org.openmrs.web.taglib does not exist

PWC6197: An error occurred at line: 17 in the jsp file: /WEB-INF/tags/module/legacyui/url.tag PWC6199: Generated servlet error: package org.openmrs.web.taglib does not exist

PWC6197: An error occurred at line: 17 in the jsp file: /WEB-INF/tags/module/legacyui/url.tag PWC6199: Generated servlet error: package org.openmrs.web.taglib does not exist

at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:129)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:299)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:392)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:453)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:625)
at org.apache.jasper.servlet.JspServletWrapper.loadTagFile(JspServletWrapper.java:280)
at org.apache.jasper.compiler.TagFileProcessor.loadTagFile(TagFileProcessor.java:660)
at org.apache.jasper.compiler.TagFileProcessor.access$000(TagFileProcessor.java:91)
at org.apache.jasper.compiler.TagFileProcessor$TagFileLoaderVisitor.visit(TagFileProcessor.java:719)
at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1502)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2297)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2347)
at org.apache.jasper.compiler.TagFileProcessor$TagFileLoaderVisitor.visit(TagFileProcessor.java:723)
at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1502)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2297)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2347)
at org.apache.jasper.compiler.TagFileProcessor$TagFileLoaderVisitor.visit(TagFileProcessor.java:723)
at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1502)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2297)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2347)
at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2353)
at org.apache.jasper.compiler.Node$Root.accept(Node.java:499)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2297)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2347)
at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2371)
at org.apache.jasper.compiler.Node$IncludeDirective.accept(Node.java:648)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2297)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2347)
at org.apache.jasper.compiler.TagFileProcessor$TagFileLoaderVisitor.visit(TagFileProcessor.java:723)
at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1502)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2297)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2347)
at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2353)
at org.apache.jasper.compiler.Node$Root.accept(Node.java:499)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2297)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2347)
at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2371)
at org.apache.jasper.compiler.Node$IncludeDirective.accept(Node.java:648)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2297)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2347)
at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2353)
at org.apache.jasper.compiler.Node$Root.accept(Node.java:499)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2297)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2347)
at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2371)
at org.apache.jasper.compiler.Node$IncludeDirective.accept(Node.java:648)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2297)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2347)
at org.apache.jasper.compiler.TagFileProcessor$TagFileLoaderVisitor.visit(TagFileProcessor.java:723)
at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1502)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2297)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2347)
at org.apache.jasper.compiler.TagFileProcessor$TagFileLoaderVisitor.visit(TagFileProcessor.java:723)
at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1502)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2297)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2347)
at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2353)
at org.apache.jasper.compiler.Node$Root.accept(Node.java:499)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2297)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2347)
at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2371)
at org.apache.jasper.compiler.Node$IncludeDirective.accept(Node.java:648)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2297)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2347)
at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2353)
at org.apache.jasper.compiler.Node$Root.accept(Node.java:499)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2297)
at org.apache.jasper.compiler.TagFileProcessor.loadTagFiles(TagFileProcessor.java:737)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:235)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:625)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:492)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:378)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:698)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1506)
at org.openmrs.web.filter.JspClassLoaderFilter.doFilter(JspClassLoaderFilter.java:47)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:503)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:138)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:582)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:213)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1094)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:432)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:175)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1028)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:136)
at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:261)
at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:101)
at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:168)
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:303)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1228)
at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1011)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:955)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:857)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:698)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1506)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:503)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:138)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:582)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:213)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1094)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:432)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:175)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1028)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:136)
at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:261)
at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:101)
at org.eclipse.jetty.servlet.DefaultServlet.doGet(DefaultServlet.java:546)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:698)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1506)
at org.openmrs.module.web.filter.ForcePasswordChangeFilter.doFilter(ForcePasswordChangeFilter.java:60)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
at org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:72)
at org.openmrs.module.web.filter.ModuleFilter.doFilter(ModuleFilter.java:54)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
at org.openmrs.web.filter.OpenmrsFilter.doFilterInternal(OpenmrsFilter.java:108)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:150)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
at org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:105)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
at org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:105)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
at org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:105)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1486)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:503)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:138)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:564)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:213)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1094)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:432)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:175)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1028)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:136)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:258)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:109)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:445)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:267)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:224)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.run(AbstractConnection.java:358)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:601)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:532)
at java.lang.Thread.run(Thread.java:745)

Powered by Jetty:// `


(Tarun yadav) #18

I don’t know where I am going wrong , Could you tell me sequence of commands I need to do .


(Daniel Kayiwa) #19

Alternatively you can just put an @Ignore attribute on the failing test, until when it gets fixed.