Trouble running DHIS2 on localhost

Hello,

I have followed the quick start instructions here to setup dhis2 locally for development and I get this error

WARNING] Failed startup of context o.e.j.m.p.JettyWebAppContext@26f07261{DHIS Common Resources for Web,/,[file:///Users/stylishcoder/workspace/dhis2/dhis2-core/dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/, file:///Users/stylishcoder/workspace/dhis2/dhis2-core/dhis-2/dhis-web/dhis-web-commons-resources/target/jetty_overlays/release-documentation-2_3_2-docbook_zip/, file:///Users/stylishcoder/workspace/dhis2/dhis2-core/dhis-2/dhis-web/dhis-web-commons-resources/target/jetty_overlays/samples-2_3_2_zip/],UNAVAILABLE}{file:///Users/stylishcoder/workspace/dhis2/dhis2-core/dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/}
java.lang.IllegalStateException: No filter named
    at org.eclipse.jetty.servlet.ServletHandler.updateMappings (ServletHandler.java:1316)
    at org.eclipse.jetty.servlet.ServletHandler.doStart (ServletHandler.java:162)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start (AbstractLifeCycle.java:72)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start (ContainerLifeCycle.java:169)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart (ContainerLifeCycle.java:110)
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart (AbstractHandler.java:100)
    at org.eclipse.jetty.security.SecurityHandler.doStart (SecurityHandler.java:405)
    at org.eclipse.jetty.security.ConstraintSecurityHandler.doStart (ConstraintSecurityHandler.java:419)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start (AbstractLifeCycle.java:72)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start (ContainerLifeCycle.java:169)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart (ContainerLifeCycle.java:110)
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart (AbstractHandler.java:100)
    at org.eclipse.jetty.server.handler.ScopedHandler.doStart (ScopedHandler.java:120)
    at org.eclipse.jetty.server.session.SessionHandler.doStart (SessionHandler.java:504)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start (AbstractLifeCycle.java:72)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start (ContainerLifeCycle.java:169)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart (ContainerLifeCycle.java:110)
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart (AbstractHandler.java:100)
    at org.eclipse.jetty.server.handler.ScopedHandler.doStart (ScopedHandler.java:120)
    at org.eclipse.jetty.server.handler.ContextHandler.startContext (ContextHandler.java:880)
    at org.eclipse.jetty.servlet.ServletContextHandler.startContext (ServletContextHandler.java:356)
    at org.eclipse.jetty.webapp.WebAppContext.startWebapp (WebAppContext.java:1445)
    at org.eclipse.jetty.maven.plugin.JettyWebAppContext.startWebapp (JettyWebAppContext.java:328)
    at org.eclipse.jetty.webapp.WebAppContext.startContext (WebAppContext.java:1409)
    at org.eclipse.jetty.server.handler.ContextHandler.doStart (ContextHandler.java:822)
    at org.eclipse.jetty.servlet.ServletContextHandler.doStart (ServletContextHandler.java:275)
    at org.eclipse.jetty.webapp.WebAppContext.doStart (WebAppContext.java:524)
    at org.eclipse.jetty.maven.plugin.JettyWebAppContext.doStart (JettyWebAppContext.java:397)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start (AbstractLifeCycle.java:72)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start (ContainerLifeCycle.java:169)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart (ContainerLifeCycle.java:117)
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart (AbstractHandler.java:100)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start (AbstractLifeCycle.java:72)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start (ContainerLifeCycle.java:169)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart (ContainerLifeCycle.java:117)
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart (AbstractHandler.java:100)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start (AbstractLifeCycle.java:72)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start (ContainerLifeCycle.java:169)
    at org.eclipse.jetty.server.Server.start (Server.java:407)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart (ContainerLifeCycle.java:110)
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart (AbstractHandler.java:100)
    at org.eclipse.jetty.server.Server.doStart (Server.java:371)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start (AbstractLifeCycle.java:72)
    at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.startJetty (AbstractJettyMojo.java:450)
    at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.execute (AbstractJettyMojo.java:311)
    at org.eclipse.jetty.maven.plugin.JettyRunMojo.execute (JettyRunMojo.java:152)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[INFO] Started ServerConnector@60317de8{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
[INFO] Started @68402ms
[INFO] Started Jetty Server

The steps I followed exactly where

  1. git clone git@github.com:ivange94/dhis2-core.git
  2. cd dhis2-core/dhis-2
  3. mvn install
  4. cd dhis-web
  5. mvn install -U
  6. mvn jetty:run

Maven commands in line 3 and 5 were successful. I get the above error after executing line 6. Trying to access the application on http://localhost:8080, I get a server error.

1 Like

Hi @stylishcoder!

Welcome to the DHIS2 Community! Tagging @julhas to advise on this.

1 Like