← Back to team overview

dhis2-devs team mailing list archive

Re: Problem in running dhis2.15 war file

 

Dear Knut,

I am trying to run dhis2.15 war file on my machine which has Window 8.1 Pro
OS with 10GB RAM
capacity and 3.6 GHz i3 processor, Here i have set system environment with
following parameters/
variables and corresponding value as following given below

JAVA_OPT = -Xms512m –Xmx5120m
MVN_OPT = -Xms512m –Xmx5120m -XX:PermSize=512m

But when i am trying to execute, it appears with
 java.lang.OutOfMemoryError: Java heap space

Addressing with your second question which is why i am seems to stick with
dhis2.15 standard war file
is because i did not find any other branch or release candidate in dhis2
scrum list where and whose development
status has been modified to "Mature" status apart from or except dhis2.7
standard branch with release
candidate war file development. But still i did not get solution of this
problem why my machine is facing
issue with java.lang.OutOfMemoryError: Java heap space ?


On Sat, Sep 17, 2016 at 3:35 PM, Knut Staring <knutst@xxxxxxxxx> wrote:

> And why 2.15?
>
> On 17 Sep 2016 12:04, "Knut Staring" <knutst@xxxxxxxxx> wrote:
>
>> Hi, what are your JAVA_OPTS? Are you using Java 7?
>>
>> On 17 Sep 2016 09:25, "Brajesh Murari" <brajesh.murari@xxxxxxxxx> wrote:
>>
>>> Hello Devs,
>>>
>>> I am trying to build and run dhis15 war file on my machine, it comes
>>> with following as you can see in log stdout.
>>>
>>> Any suggestions in this regard ?
>>>
>>> $ mvn tomcat:run-war
>>> [INFO] Scanning for projects...
>>> [INFO]
>>> [INFO] ------------------------------------------------------------
>>> ------------
>>> [INFO] Building DHIS Web Portal 2.15
>>> [INFO] ------------------------------------------------------------
>>> ------------
>>> [INFO]
>>> [INFO] >>> tomcat-maven-plugin:1.1:run-war (default-cli) > package @
>>> dhis-web-portal >>>
>>> Downloading: http://maven.dhis2.org/ampleco
>>> de-local/org/apache/ant/ant/maven-metadata.xml
>>> [WARNING] Could not transfer metadata org.apache.ant:ant/maven-metadata.xml
>>> from/to amplecode_maven2_repo (http://maven.dhis2.org/amplecode-local):
>>> maven.dhis2.org
>>> [INFO]
>>> [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @
>>> dhis-web-portal ---
>>> [debug] execute contextualize
>>> [INFO] Using 'UTF-8' encoding to copy filtered resources.
>>> [INFO] Copying 2 resources
>>> [INFO]
>>> [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @
>>> dhis-web-portal ---
>>> [INFO] Nothing to compile - all classes are up to date
>>> [INFO]
>>> [INFO] --- maven-resources-plugin:2.5:testResources
>>> (default-testResources) @ dhis-web-portal ---
>>> [debug] execute contextualize
>>> [INFO] Using 'UTF-8' encoding to copy filtered resources.
>>> [INFO] skip non existing resourceDirectory D:\Sorce\dhis2.15\dhis-2\dhis-
>>> web\dhis-web-portal\src\test\resources
>>> [INFO]
>>> [INFO] --- maven-compiler-plugin:2.3.2:testCompile
>>> (default-testCompile) @ dhis-web-portal ---
>>> [INFO] No sources to compile
>>> [INFO]
>>> [INFO] --- maven-surefire-plugin:2.16:test (default-test) @
>>> dhis-web-portal ---
>>> [INFO] No tests to run.
>>> [INFO]
>>> [INFO] --- maven-war-plugin:2.4:war (default-war) @ dhis-web-portal ---
>>> [INFO] Packaging webapp
>>> [INFO] Assembling webapp [dhis-web-portal] in
>>> [D:\Sorce\dhis2.15\dhis-2\dhis-web\dhis-web-portal\target\dhis]
>>> [INFO] Processing war project
>>> [INFO] Copying webapp resources [D:\Sorce\dhis2.15\dhis-2\dhis
>>> -web\dhis-web-portal\src\main\webapp]
>>> [INFO] Building jar: D:\Sorce\dhis2.15\dhis-2\dhis-
>>> web\dhis-web-portal\target\dhis\WEB-INF\lib\dhis-web-portal-2.15.jar
>>> [INFO] Processing overlay [ id org.hisp.dhis:dhis-web-commons-resources]
>>> [INFO] Processing overlay [ id org.hisp.dhis:dhis-web-ohie]
>>> [INFO] Processing overlay [ id org.hisp.dhis:dhis-web-sms]
>>> [INFO] Processing overlay [ id org.hisp.dhis:dhis-web-mainten
>>> ance-datadictionary]
>>> [INFO] Processing overlay [ id org.hisp.dhis:dhis-web-mainten
>>> ance-dataset]
>>> [INFO] Processing overlay [ id org.hisp.dhis:dhis-web-mainten
>>> ance-organisationunit]
>>> [INFO] Processing overlay [ id org.hisp.dhis:dhis-web-maintenance-user]
>>> [INFO] Processing overlay [ id org.hisp.dhis:dhis-web-mainten
>>> ance-dataadmin]
>>> [INFO] Processing overlay [ id org.hisp.dhis:dhis-web-mainten
>>> ance-settings]
>>> [INFO] Processing overlay [ id org.hisp.dhis:dhis-web-mainten
>>> ance-program]
>>> [INFO] Processing overlay [ id org.hisp.dhis:dhis-web-mainten
>>> ance-mobile]
>>> [INFO] Processing overlay [ id org.hisp.dhis:dhis-web-importexport]
>>> [INFO] Processing overlay [ id org.hisp.dhis:dhis-web-validationrule]
>>> [INFO] Processing overlay [ id org.hisp.dhis:dhis-web-dataentry]
>>> [INFO] Processing overlay [ id org.hisp.dhis:dhis-web-dashboa
>>> rd-integration]
>>> [INFO] Processing overlay [ id org.hisp.dhis:dhis-web-mapping]
>>> [INFO] Processing overlay [ id org.hisp.dhis:dhis-web-caseentry]
>>> [INFO] Processing overlay [ id org.hisp.dhis:dhis-web-light]
>>> [INFO] Processing overlay [ id org.hisp.dhis:dhis-web-mobile]
>>> [INFO] Processing overlay [ id org.hisp.dhis:dhis-web-reporting]
>>> [INFO] Processing overlay [ id org.hisp.dhis:dhis-web-visualizer]
>>> [INFO] Processing overlay [ id org.hisp.dhis:dhis-web-pivot]
>>> [INFO] Processing overlay [ id org.hisp.dhis:dhis-web-event-capture]
>>> [INFO] Processing overlay [ id org.hisp.dhis:dhis-web-event-reports]
>>> [INFO] Processing overlay [ id org.hisp.dhis:dhis-web-tracker-capture]
>>> [INFO] Processing overlay [ id org.hisp.dhis:dhis-web-mainten
>>> ance-appmanager]
>>> [INFO] Webapp assembled in [53380 msecs]
>>> [INFO] Building war: D:\Sorce\dhis2.15\dhis-2\dhis-
>>> web\dhis-web-portal\target\dhis.war
>>> [INFO]
>>> [INFO] <<< tomcat-maven-plugin:1.1:run-war (default-cli) < package @
>>> dhis-web-portal <<<
>>> [WARNING] Failure to transfer org.apache.ant:ant/maven-metadata.xml
>>> from http://maven.dhis2.org/amplecode-local was cached in the local
>>> repository, resolution will not be reattempted until the update interval of
>>> amplecode_maven2_repo has elapsed or updates are forced. Original error:
>>> Could not transfer metadata org.apache.ant:ant/maven-metadata.xml
>>> from/to amplecode_maven2_repo (http://maven.dhis2.org/amplecode-local):
>>> maven.dhis2.org
>>> [INFO]
>>> [INFO] --- tomcat-maven-plugin:1.1:run-war (default-cli) @
>>> dhis-web-portal ---
>>> [INFO] Running war on http://localhost:8080/dhis-web-portal
>>> [INFO] Using existing Tomcat server configuration at
>>> D:\Sorce\dhis2.15\dhis-2\dhis-web\dhis-web-portal\target\tomcat
>>> Sep 17, 2016 12:36:56 PM org.apache.catalina.startup.Embedded start
>>> INFO: Starting tomcat server
>>> Sep 17, 2016 12:36:56 PM org.apache.catalina.core.StandardEngine start
>>> INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
>>> Sep 17, 2016 12:36:58 PM org.apache.catalina.core.ApplicationContext log
>>> INFO: Initializing Spring root WebApplicationContext
>>> * INFO  2016-09-17 12:37:03,633 System property dhis2.home not set
>>> (DefaultLocationManager.java [main])
>>> * INFO  2016-09-17 12:37:03,636 Environment variable DHIS2_HOME points
>>> to C:\DHIS2_HOME (DefaultLocationManager.java [main])
>>> * INFO  2016-09-17 12:37:04,518 Hibernate configuration loaded, using
>>> dialect: org.hibernate.dialect.MySQLDialect
>>> (DefaultHibernateConfigurationProvider.java [main])
>>> Sep 17, 2016 12:48:57 PM org.apache.catalina.core.StandardContext
>>> listenerStart
>>> SEVERE: Exception sending context initialized event to listener instance
>>> of class org.springframework.web.context.ContextLoaderListener
>>> java.lang.OutOfMemoryError: Java heap space
>>>         at java.util.Arrays.copyOf(Arrays.java:3332)
>>>         at java.lang.AbstractStringBuilder.ensureCapacityInternal(Abstr
>>> actStringBuilder.java:124)
>>>         at java.lang.AbstractStringBuilder.append(AbstractStringBuilder
>>> .java:448)
>>>         at java.lang.StringBuffer.append(StringBuffer.java:270)
>>>         at java.io.StringWriter.write(StringWriter.java:112)
>>>         at java.io.PrintWriter.write(PrintWriter.java:456)
>>>         at java.io.PrintWriter.write(PrintWriter.java:473)
>>>         at java.io.PrintWriter.print(PrintWriter.java:603)
>>>         at java.io.PrintWriter.println(PrintWriter.java:756)
>>>         at java.lang.Throwable$WrappedPrintWriter.println(Throwable.jav
>>> a:764)
>>>         at java.lang.Throwable.printStackTrace(Throwable.java:658)
>>>         at java.lang.Throwable.printStackTrace(Throwable.java:721)
>>>         at org.springframework.beans.factory.BeanCreationException.prin
>>> tStackTrace(BeanCreationException.java:177)
>>>         at org.springframework.beans.factory.BeanCreationException.prin
>>> tStackTrace(BeanCreationException.java:181)
>>>         at org.apache.log4j.DefaultThrowableRenderer.render(DefaultThro
>>> wableRenderer.java:60)
>>>         at org.apache.log4j.spi.ThrowableInformation.getThrowableStrRep
>>> (ThrowableInformation.java:87)
>>>         at org.apache.log4j.spi.LoggingEvent.getThrowableStrRep(Logging
>>> Event.java:413)
>>>         at org.apache.log4j.WriterAppender.subAppend(WriterAppender.jav
>>> a:313)
>>>         at org.apache.log4j.WriterAppender.append(WriterAppender.java:1
>>> 62)
>>>         at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.
>>> java:251)
>>>         at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOn
>>> Appenders(AppenderAttachableImpl.java:66)
>>>         at org.apache.log4j.Category.callAppenders(Category.java:206)
>>>         at org.apache.log4j.Category.forcedLog(Category.java:391)
>>>         at org.apache.log4j.Category.log(Category.java:856)
>>>         at org.apache.commons.logging.impl.Log4JLogger.error(Log4JLogge
>>> r.java:257)
>>>         at org.springframework.web.context.ContextLoader.initWebApplica
>>> tionContext(ContextLoader.java:319)
>>>         at org.springframework.web.context.ContextLoaderListener.contex
>>> tInitialized(ContextLoaderListener.java:112)
>>>         at org.apache.catalina.core.StandardContext.listenerStart(Stand
>>> ardContext.java:4135)
>>>         at org.apache.catalina.core.StandardContext.start(StandardConte
>>> xt.java:4630)
>>>         at org.apache.catalina.core.ContainerBase.start(ContainerBase.j
>>> ava:1045)
>>>         at org.apache.catalina.core.StandardHost.start(StandardHost.jav
>>> a:785)
>>>         at org.apache.catalina.core.ContainerBase.start(ContainerBase.j
>>> ava:1045)
>>>
>>> Sep 17, 2016 12:48:58 PM org.apache.catalina.core.StandardContext
>>> listenerStart
>>> SEVERE: Exception sending context initialized event to listener instance
>>> of class org.hisp.dhis.system.startup.StartupListener
>>> java.lang.NullPointerException
>>>         at org.hisp.dhis.system.startup.StartupListener.contextInitiali
>>> zed(StartupListener.java:64)
>>>         at org.apache.catalina.core.StandardContext.listenerStart(Stand
>>> ardContext.java:4135)
>>>         at org.apache.catalina.core.StandardContext.start(StandardConte
>>> xt.java:4630)
>>>         at org.apache.catalina.core.ContainerBase.start(ContainerBase.j
>>> ava:1045)
>>>         at org.apache.catalina.core.StandardHost.start(StandardHost.jav
>>> a:785)
>>>         at org.apache.catalina.core.ContainerBase.start(ContainerBase.j
>>> ava:1045)
>>>         at org.apache.catalina.core.StandardEngine.start(StandardEngine
>>> .java:445)
>>>         at org.apache.catalina.startup.Embedded.start(Embedded.java:825)
>>>         at org.codehaus.mojo.tomcat.AbstractRunMojo.startContainer(Abst
>>> ractRunMojo.java:558)
>>>         at org.codehaus.mojo.tomcat.AbstractRunMojo.execute(AbstractRun
>>> Mojo.java:255)
>>>         at org.apache.maven.plugin.DefaultBuildPluginManager.executeMoj
>>> o(DefaultBuildPluginManager.java:134)
>>>         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(Moj
>>> oExecutor.java:207)
>>>         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(Moj
>>> oExecutor.java:153)
>>>         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(Moj
>>> oExecutor.java:145)
>>>         at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.b
>>> uildProject(LifecycleModuleBuilder.java:116)
>>>         at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.b
>>> uildProject(LifecycleModuleBuilder.java:80)
>>>         at org.apache.maven.lifecycle.internal.builder.singlethreaded.S
>>> ingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
>>>         at org.apache.maven.lifecycle.internal.LifecycleStarter.execute
>>> (LifecycleStarter.java:128)
>>>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:30
>>> 7)
>>>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:19
>>> 3)
>>>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
>>>         at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
>>>         at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
>>>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
>>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
>>> ssorImpl.java:62)
>>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
>>> thodAccessorImpl.java:43)
>>>         at java.lang.reflect.Method.invoke(Method.java:498)
>>>         at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnha
>>> nced(Launcher.java:289)
>>>         at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Lau
>>> ncher.java:229)
>>>         at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithEx
>>> itCode(Launcher.java:415)
>>>         at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launc
>>> her.java:356)
>>>
>>> Sep 17, 2016 12:48:58 PM org.apache.catalina.core.StandardContext start
>>> SEVERE: Error listenerStart
>>> Sep 17, 2016 12:48:58 PM org.apache.catalina.core.StandardContext start
>>> SEVERE: Context [/dhis-web-portal] startup failed due to previous errors
>>> * ERROR 2016-09-17 12:48:45,741 Context initialization failed
>>> (ContextLoader.java [main])
>>> * INFO  2016-09-17 12:48:58,919 De-registering jdbc driver:
>>> org.h2.Driver@58b041c6 (StartupListener.java [main])
>>> * INFO  2016-09-17 12:48:58,920 De-registering jdbc driver:
>>> org.hsqldb.jdbc.JDBCDriver@2ac7fab6 (StartupListener.java [main])
>>> * INFO  2016-09-17 12:48:58,920 De-registering jdbc driver:
>>> org.postgresql.Driver@4e952240 (StartupListener.java [main])
>>> * INFO  2016-09-17 12:48:58,921 De-registering jdbc driver:
>>> com.mysql.jdbc.Driver@5410b903 (StartupListener.java [main])
>>> Sep 17, 2016 12:48:58 PM org.apache.catalina.core.ApplicationContext log
>>> INFO: Closing Spring root WebApplicationContext
>>> Sep 17, 2016 12:48:59 PM org.apache.catalina.loader.WebappClassLoader
>>> clearReferencesThreads
>>> SEVERE: The web application [/dhis-web-portal] appears to have started a
>>> thread named [Abandoned connection cleanup thread] but has failed to stop
>>> it. This is very likely to create a memory leak.
>>>
>>>
>>> --
>>> Thanks and Regards
>>>
>>> Brajesh Murari
>>>
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~dhis2-devs
>>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>


-- 
Thanks and Regards

Brajesh Murari

Follow ups

References