Not able to start: Error when accessing http://localhost:8080/openmrs/initialsetup

82 views
Skip to first unread message

Susan Tan

unread,
Jun 8, 2013, 1:46:13 AM6/8/13
to d...@openmrs.org
I'm new to OpenMRS; I've already set up the environment (mysql, tomcat, eclipse, java installed), and cloned the openMRS-core git repo onto my local drive. I run mvn jetty:run and when I go to http://localhost:8080/openmrs/initialsetup, I get the following stack trace. 

The following error occurred at startup:
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:631)
	at org.openmrs.util.DatabaseUpdater.getUnrunDatabaseChanges(DatabaseUpdater.java:590)
	at org.openmrs.util.DatabaseUpdater.updatesRequired(DatabaseUpdater.java:261)
	at org.openmrs.web.Listener.setupNeeded(Listener.java:184)

I also notice that there are import errors on libraries such as errors in 
"import org.apache.commons.lang.StringUtils;

import org.apache.commons.logging.Log;

import org.apache.commons.logging.LogFactory;" 

Eclipse cannot find those apache libraries. How do I fix this problem? 

Nyoman Ribeka

unread,
Jun 8, 2013, 2:27:47 AM6/8/13
to d...@openmrs.org

Susan,

Have you run the maven build in the root project? You need to run either install or package in root project first I think.

--
OpenMRS Developers: http://go.openmrs.org/dev
Post: d...@openmrs.org
Unsubscribe: dev+uns...@openmrs.org
Manage your OpenMRS subscriptions at https://id.openmrs.org/
 
 

Awanthika Senarath

unread,
Jun 8, 2013, 2:40:35 AM6/8/13
to d...@openmrs.org
run install on the root project and then run jetty:run, it should work

https://wiki.openmrs.org/display/docs/Step+by+Step+Installation+for+Developers

see compiling openmrs section
--
------------------------------------------------------------------------------------------->>
AWANTHIKA SENARATH
Undergraduate
Department of Electronics and Telecommunication Engineering
University of Moratuwa

Susan Tan

unread,
Jun 8, 2013, 3:31:59 AM6/8/13
to d...@openmrs.org
Now I'm getting this error. I can connect to the mysql server and I've managed to reset the root password (because I forgot it originally). Here's the screenshot attached.


Screen Shot 2013-06-08 at 12.29.21 AM.png

Harsha Siriwardena

unread,
Jun 8, 2013, 4:29:52 AM6/8/13
to Developers
This is a weird error, got me once  when trying to deploy omrs in openshift. probably a java issue.
Could you please pastbin your tomcat/jetty log

Harsha Siriwardena
[harshadura.net]


On Sat, Jun 8, 2013 at 1:01 PM, Susan Tan <onceuponat...@gmail.com> wrote:
Now I'm getting this error. I can connect to the mysql server and I've managed to reset the root password (because I forgot it originally). Here's the screenshot attached.

Susan Tan

unread,
Jun 9, 2013, 11:35:50 PM6/9/13
to d...@openmrs.org
I did the mvn clean install and mvn jetty:run the project. I see that I had originally deleted openmrs-runtime.properties. So that's why the webapp cannot access the mySQL database. How do i fix this? 

Susan Tan

unread,
Jun 9, 2013, 11:39:28 PM6/9/13
to d...@openmrs.org
Screenshot of the error attached. 
Screen Shot 2013-06-09 at 8.37.48 PM.png

Suranga Kasthurirathne

unread,
Jun 9, 2013, 11:42:21 PM6/9/13
to d...@openmrs.org


Hi,

If you've deleted your run-time properties file, then re-running the mvn jetty:run command should lead you to the beginning of the installation process, where you can move through the steps necessary to re-create your Db. etc. 
It really shouldn't move you to the error page you've attached.

Are you sure that your runtime properties file doesn't exist ? if it does, deleting it will allow you to re-run the installation process....



On Mon, Jun 10, 2013 at 9:09 AM, Susan Tan <onceuponat...@gmail.com> wrote:
Screenshot of the error attached. 

--
OpenMRS Developers: http://go.openmrs.org/dev
Post: d...@openmrs.org
Unsubscribe: dev+uns...@openmrs.org
Manage your OpenMRS subscriptions at https://id.openmrs.org/
 
 



--
Best Regards,

Suranga

Susan Tan

unread,
Jun 9, 2013, 11:50:05 PM6/9/13
to d...@openmrs.org
I ran mvn jetty:run again, did the setup, got the same invalid username/pw error("
Invalid username and/or password: admin Unable to complete the startup.")
, and on the terminal, I did ls ~/.OpenMRS/ , which ouputs "logic/       modules/     openmrs.log". There's no openmrs-runtime.properties. 

Susan Tan

unread,
Jun 9, 2013, 11:50:54 PM6/9/13
to d...@openmrs.org
I'm on the irc channel as arctansusan if anyone wants to help me debug this issue. 

Harsha Kumara

unread,
Jun 9, 2013, 11:57:18 PM6/9/13
to d...@openmrs.org
Did you able to complete the setup? As we discuss previously there was a problem with mysql root user password settings.Did you fix it.Then what you have to do is delete the .OpenMRS directory and drop the openmrs database if exist in the mysql databases.


On Mon, Jun 10, 2013 at 9:20 AM, Susan Tan <onceuponat...@gmail.com> wrote:
I'm on the irc channel as arctansusan if anyone wants to help me debug this issue. 

--
OpenMRS Developers: http://go.openmrs.org/dev
Post: d...@openmrs.org
Unsubscribe: dev+uns...@openmrs.org
Manage your OpenMRS subscriptions at https://id.openmrs.org/
 
 



--
Harsha Kumara
Undergraduate
Department of Computer Science and Engineering
University of Moratuwa
Sri Lanka.

Susan Tan

unread,
Jun 10, 2013, 12:13:38 AM6/10/13
to d...@openmrs.org
Harsha, I followed your advice, deleting the openmrs db and deleting the .OpenMRS directory, and the initial setup page automatically re-directs me to the login page. I can finally log in and use openMRS webapp. Thanks!! 

Also, what are some good beginner,easy-pick intro tickets that you would recommend? I'm new to Java (and quickly learning it!) This is a list of 30+ intro tickets: https://tickets.openmrs.org/secure/IssueNavigator.jspa?mode=hide&requestId=10068

Susan 
Reply all
Reply to author
Forward
0 new messages