Initialising a dataset

Am having an error when initialising a dataset for my tests which I am failing to figure out a solution.The dataset was loading well until I introduced this obs This is strange to me because the one am introducing is very similar to .The entire PR is The error can be seen here… I wonder what am missing :thinking: @dkayiwa @ssmusoke @ibacher

NULL not allowed for column "STATUS" . Did you intentionally leave out the status field?

1 Like

When I included it as status=FINAL…I got the same error…

Can you do the same for the rest of the obs rows in that dataset file?

A new error here still related to my new concept

Referential integrity constraint violation: "FK_4T2S7IO9VTX85L7LA56ITT51U: PUBLIC.OBS FOREIGN KEY(CONCEPT_ID) REFERENCES PUBLIC.CONCEPT(CONCEPT_ID) (5096)

This looks like you are using a non existing concept.

Thanks @dkayiwa ur very right, I have been able to solve it with the help of @ssmusoke…I hadn’t added the concept…

1 Like

@dkayiwa I seem to have a new challenge while firing an http request at this line…The error seems to suggest that the controller can’t be found…Is there an issue with my annotation or a different issue entirely that am not seeing…errors at

The controller is found. The problem is with your controller’s GET method return type `AppointmentController.getNumberOfPatients’

Thanks @dkayiwa makes all the difference…Had not added the annotation of @ResponseBody and correct returnType class…

@dkayiwa I have a new followup challenge. My controller seems to be serving the purpose at least as far as the unit test goes…However when I try to integrate the module into a distro: Initializing EhCache CacheManager takes a long time and still the server fails to start with the following errors. This failure seems to follow the annotation of Controller on my rest-bean If I make this a component then the server builds…What could i be missing.

The log you shared is not related to your controller. Do you have anything after it? And by the way, did you get a chance to look at this?

@dkayiwa Unfortunately, I didnt have any logs related to the controller.

I did look at it but since I was creating an end point which isn’t a resource in Openmrs I followed a pattern seen in some modules for example and

The first thing to fix is, ensure that all your references to the rest webservices module in pom.xml have the scope of provided or test as necessary. Then compile, run and tell me if you still have the same problem.

1 Like

@dkayiwa I have been trying to add scope to the webservices dependencies however the classes throw errors when I do so. Not sure if there is a plugin in the pom that stops this or something else. This being said: I have been able to go past the earlier hung at Initializing EhCache CacheManager when I refined the pom. but now I get errors when the server has started and I try to access the homePage.

Are all your changes committed?

@dkayiwa yes they are…

@reagan i did not mean that you remove the rest webservices dependencies. But rather that those which do not have scope get it as <scope>provided</scope>

1 Like

@dkayiwa whenever I try to do that…I end up with errors in the controller and unit test class…

@reagan what exact changes did you make? I do not expect adding scope provided to dependencies that did not have any scope before, to lead into test failures.