Hi Marcos,

I'm not sure if there is a way to do this before the war file is deployed
but once you deploy the war and it is unpacked, you can go ahead and make
changes (2) or (3) listed here:
https://wiki.openmrs.org/display/docs/Application+Data+Directory

I think you'd then require a Tomcat restart and you'd be good to go.

Ali

On Thu, Mar 15, 2012 at 7:28 PM, Marcos Núñez <[email protected]> wrote:

> Hi! I've been trying to install two OpenMRS in one tomcat server, running
> in an Ubuntu server. I have an OpenMRS 1.8.2 deployed
> in /usr/share/tomcat6/.OpenMRS folder, now I want a 1.8.3 OMRS deployed
> in /usr/share/tomcat6/.OpenMRS_produ
>
> Having red
> https://wiki.openmrs.org/display/docs/Multiple+Instances+of+OpenMRS I
> followed this steps:
>
>    1. Download the latest 1.8.3 war
>    2. Rename it to openmrs_produ.war
>    3. Deployed it using tomcat's html manager
>    4. Follow the setup wizzard, creating a new database, a new admin
>    user, etc.
>
>
> My application data directory by default is .OpenMRS, so as expected I
> found an openmrs_produ-runtime.properties file in
> /usr/share/tomcat6/.OpenMRS In there, I added the line:
>
> application_data_directory=/usr/share/tomcat6/.OpenMRS_produ
>
> and created the folder /usr/share/tomcat6/.OpenMRS_produ, assigning it to
> the tomcat user. I then redeployed the openmrs_produ.war, hoping the
> wizzard would start again, but when it does I get this error:
>
> *The following error occurred at startup:*
> java.lang.NullPointerException
>
> javax.servlet.ServletException: java.lang.NullPointerException
>       at org.openmrs.web.Listener.startOpenmrs(Listener.java:217)
>       at org.openmrs.web.Listener.contextInitialized(Listener.java:148)
>       at 
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)
>       at 
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
>       at 
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
>       at 
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
>       at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
>       at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:905)
>       at 
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:525)
>       at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1359)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:616)
>       at 
> org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
>       at 
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:857)
>       at 
> com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:795)
>       at 
> org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1475)
>       at 
> org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:250)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>       at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>       at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>       at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>       at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>       at 
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:558)
>       at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>       at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>       at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>       at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
>       at 
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
>       at 
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
>       at 
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
>       at java.lang.Thread.run(Thread.java:636)
> Caused by: java.lang.NullPointerException
>       at org.openmrs.scheduler.SchedulerUtil.startup(SchedulerUtil.java:40)
>       at org.openmrs.web.Listener.startOpenmrs(Listener.java:212)
>       ... 33 more
>
>
>
> I'm pretty sure I'm doing something wrong in here. Is there a way to
> assign the application data directory before deploying the war file and
> running the setup wizzard?  Would the setup wizzard pick up an
> openmrs_produ-runtime.properties file with
> "application_data_directory=/usr/share/tomcat6/.OpenMRS_produ" as sole line?
>
> Thanks in advance
>
> Marcos
>
> ------------------------------
> Click here to 
> unsubscribe<[email protected]?body=SIGNOFF%20openmrs-implement-l>from
>  OpenMRS Implementers' mailing list




-- 
Ali Habib
Director, Informatics
Interactive Research and Development
Ph: +92-21-34327697
[email protected]

_________________________________________

To unsubscribe from OpenMRS Implementers' mailing list, send an e-mail to 
[email protected] with "SIGNOFF openmrs-implement-l" in the  body 
(not the subject) of your e-mail.

[mailto:[email protected]?body=SIGNOFF%20openmrs-implement-l]

Reply via email to