Saturday, May 19, 2007
However, I have noticed some weird behavior when web applications deployed to Tomcat use environment variable such as USER_HOME. For instance, when starting OpenMRS, the application needs to get the "user.home" system property in order to load modules, runtime properties, etc from the home directory of the user who started Tomcat.
Because the Tomcat Service Manager starts the Tomcat instance as the LocalSystem user (which doesn't have an actual user account on my machine), it can't find the directory specified by the "user.home" variable. Actually, it usually returns just "Application Data", which causes OpenMRS to look under "c:\Application Data", instead of "c:\Documents and Settings\LocalSystem\Application Data".
My first thought was to configure Tomcat Service Manager to use a different user when starting up. I opened the Tomcat Service Manager Properties dialog (right click Tomcat > Configure... in the task tray), navigated to the "Log On" tab, and configured Tomcat to run as me. I saved the settings, closed the dialog, and restarted Tomcat.
Nothing. Same result as before. Even more strange was the fact that sometimes the user.home was "c:\Application Data" and other times it was set to "c:\Documents and Settings\Default User". I wouldn't care if it was one or the other, but the constant switching was causing weird behavior in OpenMRS.
I found the following bug to help explain this behavior.
It looks like the developers are just going to squash this bug (which is fine), but if anyone needs this functionality, let them know.
My next solution was to create a new user account for the LocalSystem user. I'm still testing this out and will post the results when I get a chance.
I believe you might also be able to specify a username/password using the tomcat5 service commands, but I'll go with a quick fix until that becomes necessary.
So it turns out that while the Tomcat Service Manager does not implement the "Log On As" feature, the Windows Service does. If you're using Tomcat Service Manager, then you will have an Apache Tomcat or TomcatX (where X=the major version number) service installed. You can check the Log On settings by following these instructions.
1. Click on Start, Control Panel, Administrative Tools then Services.
2. Right click on Apache Tomcat and select Properties.
3. Click on the Log On tab and fill in the authentication details of the Windows user that you want to start Tomcat.
Thursday, May 17, 2007
And the workaround is relatively simple.
Uncheck "Provide proposals for user defined tasks" under Windows > Preferences > Ant > Editor > Content Assist.
Tuesday, March 20, 2007
In collaboration with Google, the OpenMRS project is proud to offer internship opportunities through the Google Summer of Code program. OpenMRS is a successful open-source project developing an electronic medical record system for developing countries.
Have you ever imagined that writing code could save lives? Then apply to OpenMRS for the Google Summer of Code 2007 and make a difference this summer.
- Develop software for the developing world
- Contribute to a major open-source project
- Learn from experienced open source developers solving real-world problems
- Earn a summer-long stipend so that you can focus on your work
- Make a difference in the world by helping in the fight against HIV/AIDS, TB, and Malaria...doing what you enjoy most
This summer, students around the world have the opportunity to participate in an exciting collaboration between OpenMRS (http://openmrs.org) and Google, Inc. to further develop an open-source medical record system that improves the care of patients with HIV/AIDS, TB, and Malaria. The Google Summer of Code 2007 program provides promising student software developers an opportunity to help these vulnerable populations by spending their summer vacation writing new code that will be used in countries throughout the developing world. During this twelve week program, successful applicants will work directly with assigned mentors to complete their choice of a variety of focused development tasks laid out by the OpenMRS collaborative.