am Creating Classes that Migrate existing diagnosis data captured via the emrapi module. and added a link o the Admin page that triggers the migration . as far as i ithink, i have instatiated all the objects . but am getting a java.nullPointer exception here is the error log. https://hastebin.com/regemefaya.coffeescript
Have you tried to run in debug mode to check which variable is null on that line?
i actually had not done that. i was using my eyes to check
but it compiles fine, and loads fine . …the problem comes wen i click the link. but let me try he debugg mode
hi @dkayiwa after running the sdk server in debug mode… using
mvn openmrs-sdk:run -Dfork=false -Ddebug
here s the log. https://pastebin.com/sTG5qYtg
Does it run well if you do not run in debug mode?
@dkayiwa i think i havent got the question …
You are running the sdk in debug module. Do you still get this error if you run the sdk again but not in debug mode?
Does it help if you delete the contents of this folder? C:\Users\Dell.m2\repository
yes , i delted it , and ran the sdk again , i got a cleaner log wth few errors, but i still the java.lang.null.pointerException
i have seen the variable that is not instatiated
this is the other error i have now
This looks like a messed up database. It could be easier to just set it up afresh.
does that mean deleting the associated database and rebuiding it up again?
Yes it is.
ok sir @dkayiwa , let me try that
your Actually ryt. ive seen another post which has the same error exactly as i have , and its reletaed to the database Character Set Encoding. all tables should have UTF8 CharSet …that wat ive tried to understand
ive deleted the database, and am trying to run the server again to rebuild the database , but its now giving me an error
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:630) at org.openmrs.util.DatabaseUpdater.getUnrunDatabaseChanges(DatabaseUpdater.java:587) at org.openmrs.util.DatabaseUpdater.updatesRequired(DatabaseUpdater.java:252) at org.openmrs.web.Listener.setupNeeded(Listener.java:217) at org.openmrs.web.Listener.contextInitialized(Listener.java:179) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5077) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5591) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.Exception: 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
how am i supposed to cnfigure the properties file , so that i can rebuid the database?