btw no need to use Tomcat, the project is configured to use maven Jetty
plugin

So just navigate your shell prompt to OpenMRS root/webapp folder
and then type :
mvn clean install jetty:run

then maven will start the web app in port 8080

cheers!

On Mon, Mar 19, 2012 at 9:12 PM, Harsha Siriwardena <[email protected]>wrote:

> hi Nadeeshani,
>
> Just create a database named "openmrs" manually by using mysql client.
> and add the relevant root, root-pass(just in-case if you havent configured
> a separate mysql user for  open mrs already) inside the
> "openmrs-runtime.properties"
>
> finally do a "mvn clean install jetty:run" again
> hope this will work!
>
> Regards,
> Harsha
>
>
> On Mon, Mar 19, 2012 at 8:12 PM, Nadeeshani Hewage <
> [email protected]> wrote:
>
>> Hi Harsha,
>>
>> Thanks for the reference :) I tried it. Following is my
>> tomcat/logs/catalina.out
>>
>> Mar 19, 2012 6:13:04 AM org.apache.catalina.startup.HostConfig deployWAR
>> INFO: Deploying web application archive openmrs.war
>> WARN - OpenmrsUtil.getRuntimePropertiesFilePathName(2438) |2012-03-19
>> 06:13:07,161| Unable to find a runtime properties file at
>> /usr/share/tomcat6/apache-tomcat-6.0.35/bin/openmrs-runtime.properties
>> ERROR - Listener.contextInitialized(168) |2012-03-19 06:13:11,665| Got
>> exception while starting up:
>> java.lang.RuntimeException: Error occurred while trying to get the
>> updates needed for the database. Unable to get a connection to the
>> database.  Please check your openmrs runtime properties file and make sure
>> you have the correct connection.username and connection.password set
>>  at
>> org.openmrs.util.DatabaseUpdater.getUnrunDatabaseChanges(DatabaseUpdater.java:627)
>> at
>> org.openmrs.util.DatabaseUpdater.getUnrunDatabaseChanges(DatabaseUpdater.java:586)
>>  at
>> org.openmrs.util.DatabaseUpdater.updatesRequired(DatabaseUpdater.java:257)
>> at org.openmrs.web.Listener.setupNeeded(Listener.java:184)
>>  at org.openmrs.web.Listener.contextInitialized(Listener.java:145)
>>
>> So I created a new openmrs-runtime.properties file on the place that the
>> log specifies, with contents as stated. But the point is, to set
>> "connection.url=jdbc:mysql://localhost:3306/openmrs?autoReconnect=true" , I
>> should have a database named openmrs. The mysql  query to show databases
>> tell me that there is no such database. How do I create it back?
>>
>> Any opinion to overcome this issue is much appreciated.
>>
>> And thanks Wyclif and Anurudda. But I have deleted all the openmrs
>> folders on tomcat, and even tried a new tomcat installation. No luck.
>>
>> Regards
>> Nadeeshani
>>
>>
>> On Mon, Mar 19, 2012 at 6:47 PM, Harsha Siriwardena <[email protected]
>> > wrote:
>>
>>> Hi Nadeeshani Akki,
>>>
>>> Here's the simple 
>>> solution<http://www.harshadura.net/2012/01/solved-open-mrs-webapp-build-problem.html>to
>>>  prevent your exact problem which I was faced earlier too.
>>> I have blogged the solution for my own reference. :)
>>>
>>> hope this helps!
>>>
>>> Regards,
>>> Harsha
>>>
>>> On Mon, Mar 19, 2012 at 12:24 PM, Nadeeshani Hewage <
>>> [email protected]> wrote:
>>>
>>>> Hi devs,
>>>>
>>>> I'm a final year undergraduate from University of Moratuwa, Sri Lanka
>>>> and a would-be applicant for GSoC this year. I have tried playing around
>>>> with the web-app and code, but I'm facing some issues in deploying the .war
>>>> that I built from source. Following are the steps I followed.
>>>>
>>>> *Environment: *Unix (Linux Mint)
>>>>
>>>> *Steps:*
>>>> *
>>>> *
>>>> 1. Successfully checked out and built the complete trunk, avoiding
>>>> tests.
>>>>
>>>> 2. Deployed the openmrs.war (from webapp/target) on Tomcat6 with Tomcat
>>>> Manager, and war is on the running state.
>>>>
>>>> 3. On the very first time I tried this, it asked for my mysql
>>>> credentials, created a database, and I selected the option to proceed
>>>> without using demo data, just to play around      hoping I could get the
>>>> same screen back. Hard luck. Couldn't login with 'admin' and 'test'
>>>> credentials on login screen.
>>>>
>>>> 4. On mysql prompt, i could see openmrs database. And with the commands
>>>>     mysql> USE openmrs
>>>>     mysql> select * from openmrs.users where username="admin";
>>>>     I got an empty result.
>>>>
>>>> 5. Hence hoping to redo the process all-new with demodata, I dropped
>>>> the database, deleted ~/.OpenMRS, 'rm -r' ed openmrs and the war from
>>>> Tomcat's webapp folder, and redeployed the war. This time it ends giving
>>>> following error at start up.
>>>>
>>>>
>>>> *Error:*
>>>> Error occurred while trying to get the updates needed for the database.
>>>> Unable to get a connection to the database. Please check your openmrs
>>>> runtime properties file and make sure you have the correct
>>>> connection.username and connection.password set
>>>>
>>>> java.lang.RuntimeException: Error occurred while trying to get the
>>>> updates needed for the database. Unable to get a connection to the
>>>> database.  Please check your openmrs runtime properties file and make sure
>>>> you have the correct connection.username and connection.password set
>>>>  at
>>>> org.openmrs.util.DatabaseUpdater.getUnrunDatabaseChanges(DatabaseUpdater.java:627)
>>>> at
>>>> org.openmrs.util.DatabaseUpdater.getUnrunDatabaseChanges(DatabaseUpdater.java:586)
>>>>  at
>>>> org.openmrs.util.DatabaseUpdater.updatesRequired(DatabaseUpdater.java:257)
>>>> at org.openmrs.web.Listener.setupNeeded(Listener.java:184)
>>>>  at org.openmrs.web.Listener.contextInitialized(Listener.java:145)
>>>> at
>>>> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
>>>>  at
>>>> org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
>>>> at
>>>> org.apache.catalina.core.StandardContext.reload(StandardContext.java:3461)
>>>>  at
>>>> org.apache.catalina.manager.ManagerServlet.reload(ManagerServlet.java:943)
>>>> at
>>>> org.apache.catalina.manager.HTMLManagerServlet.reload(HTMLManagerServlet.java:557)
>>>>  at
>>>> org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:121)
>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
>>>>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>>>> at
>>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>>>>        ..........
>>>>
>>>>
>>>> I grep-ed for a runtime.properties file but couldn't find any.
>>>>
>>>> Any opinion to get the system running would be most appreciated, and
>>>> what possibly have I missed out
>>>> 1. To be unable to login at my first trial?
>>>> 2. To get the stated error message?
>>>>
>>>> Thanks in advance :)
>>>>
>>>>
>>>> --
>>>> Nadeeshani Hewage
>>>> Undergraduate
>>>> Department of Computer Science and Engineering
>>>> University of Moratuwa
>>>> nadeeshanihewage.blogspot.com
>>>>
>>>>
>>>>  ------------------------------
>>>> Click here to 
>>>> unsubscribe<[email protected]?body=SIGNOFF%20openmrs-devel-l>from
>>>>  OpenMRS Developers' mailing list
>>>>
>>>
>>> ------------------------------
>>> Click here to 
>>> unsubscribe<[email protected]?body=SIGNOFF%20openmrs-devel-l>from 
>>> OpenMRS Developers' mailing list
>>>
>>
>>
>>
>> --
>> Nadeeshani Hewage
>> Undergraduate
>> Department of Computer Science and Engineering
>> University of Moratuwa
>> nadeeshanihewage.blogspot.com
>>
>>
>>  ------------------------------
>> Click here to 
>> unsubscribe<[email protected]?body=SIGNOFF%20openmrs-devel-l>from 
>> OpenMRS Developers' mailing list
>>
>
>

_________________________________________

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

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

Reply via email to