Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • If you've added a log4j.xml file to your metadata directory and metadata is referenced in the .classpath file and you still don't see any log messages in the console during the execution of the test, make sure that the metadata directory comes before all JARs that might have a log4j.xml in them already (i.e. openmrs-api.jar)
  • If you create custom tables and map them using hibernate, an error in the <table_name>.hbm.xml can be masked and you will just get an error to the effect that your service cannot be found when you call Context.getService(<your_service>.class). If you compile the module and load it into the OpenMRS web interface, it will tell you the real error.
  • If you get an exception like org.openmrs.api.APIException: Service not found: class org.openmrs.module. ... then you may need to do one of two things. First, make sure that you have run the and ant "package module" task. If you've already done that, then you probably need to fix your build file for the module you're including.
    1. Open build.xml in the module you're compiling
    2. Find the "package-jar" target
    3. Remove the line like "<exclude name="*" />"
    4. Repackage your jar file and try using it again in the other module
  • To skip the authentication username/popup when testing, place these variables into your runtime properties file: junit.username=admin
    junit.password=test

...

First, make sure that you have run thepackage moduleAnt the package module Ant target. Secondly, make sure your test class extendsBaseModuleContextSensitiveTestSecondextendsBaseModuleContextSensitiveTest. Second, make sure your "build" folder was on the .classpath so that Eclipse knows about your compiled classes

...

Hibernate will only look for your module's Hibernate mapping files (*.hbm.xml) in classpath*:*.omod. You must have the reference to<classpathentry to <classpathentry kind="lib" path="dist"/>in > in your module's .classpathfile (see above). NOTE: Since /dist is now a referenced library, you might also need to make sure it is present at compilation time (Ant-clean deletes it). Rearrange your build.xml to create /dist before the compilation call. You may need to do an Eclipse clean (which is different than an Ant clean) and then repeat this step.

...