Frequently Asked Questions

Q: How do I get started with setting up a database and building the code?

A: This guide explains it all.

 

Q: I am getting Out of disk quota when working from my IFI account, how do I work around that?

A: Build only the service modules (/pom.xml) and the web modules dhis-web-commons, dhis-web-commons-resources and your relevant web module. This will reduce disk usage a lot.

 

Q: How do I get an overview of the overwhelming DHIS 2 source code?

A: Remember that DHIS 2 is modular, and you will basically have to comprehend the modules you will be working on. Otherwise check out the technical documentation and the slides.

 

Q: How do I resolve complaints from Eclipse saying that AspectJ related classes like JoinPoint cannot be found?

A: There is a problem related to the Eclipse AspectJ plugin and the Maven AspectJ dependency. DHIS 2 is built with Maven so this has no practical implications, you can safely ignore it.

 

Q: How do I start DHIS 2 for testing and debugging purposes?

A: First invoke "mvn clean install" on the root POM (dhis-2/pom.xml). Second invoke "mvn clean install" on the web root POM (dhis-2/dhis-web/pom.xml). Navigate to a web module (eg. dhis-2/dhis-web/dhis-web-reporting) or the portal (dhis-2/dhis-web/dhis-portal) and invoke "mvn jetty:run-war". The application will be accessible at "localhost:8080". In other words, there is no need to build the whole portal (which is time consuming) when doing development.

 

Q: What do I do when I get testing errors but still want to build the code?

A: Invoke "mvn clean install -Dtest=false -DfailIfNoTests=false".

 

Q: From where do I get the source code?

A: All groups have been given a branch. The URLs are listed in the project groups document.

 

Q: What do I do when I get OutOfMemoryExceptions when building or running DHIS 2?

A: Try increasing the amount of memory given to the JVM by adding an environment variable "JAVA_OPTS" with the value "-Xms128m -Xmx768m -XX:PermSize=128m -XX:MaxPermSize=768m" depending on the available RAM on your computer.


Q: Why do I get compilations errors for things like String.isEmpty() ?

A: DHIS 2 uses some Java 6 features. Install and use a Java 6 SDK.

 

Q : I can't get the Maven Jetty plugin to run on Mac, how can I fix it?

A: Try setting an environment variable "MAVEN_OPTS" with the value "-Xmx512m".