niccie
(Eunice Njeri)
October 23, 2017, 3:21pm
1
Hello Everyone,
I have completed working on a Java task but facing an issue with generating a .omod file.
Every time I upload a newly generated .omod file it crashes my standalone.
I am not sure what I am facing here.
I have even tried re-cloning the repository and even using the new 2.6.1 standalone version but still fails to be successful.
Please assist.
sample omod
https://drive.google.com/a/andela.com/file/d/0B2C7fOrkWvS1dm1iVlNKZUN1QkE/view?usp=sharing
dkayiwa
(Daniel Kayiwa)
October 23, 2017, 3:37pm
2
Can you paste the server log at pastebin.com ?
niccie
(Eunice Njeri)
October 23, 2017, 3:52pm
3
dkayiwa
(Daniel Kayiwa)
October 23, 2017, 4:02pm
4
This does not look like the full contents of your log file.
Stop the standalone
Delete the logs folder
Start the standanlone up to the point of reproducing the error and then paste the contents of the log file at pastebin.com
niccie
(Eunice Njeri)
October 23, 2017, 6:09pm
5
@dkayiwa
I have done as above.
Note this log https://pastebin.com/p73P35pr .
dkayiwa
(Daniel Kayiwa)
October 23, 2017, 7:09pm
6
Which module are you compiling that crashes your openmrs?
And does openmrs run well if you remove that module?
willa
(Willa Mhawila)
October 23, 2017, 7:12pm
7
FWIW I was working on an angular directive defined in uicommons module and every time I upload the omod to standalone 2.6.1 I was not able to access the patient dashboard. Restarting the standalone solved the issue. (Sorry, I didn’t even bother to understand the error)
niccie
(Eunice Njeri)
October 23, 2017, 7:27pm
8
@dkayiwa
I am trying to upload a Rest Web Services OMOD.
On removing the module, it still does not resolve it and some of the other modules stop and when I restart them they throw errors.
@willa
Restarting seems to solve the issue but the api documentation module still has the error in screenshot above.
dkayiwa
(Daniel Kayiwa)
October 23, 2017, 7:41pm
9
If you discard your local changes in the module and compile again, does it work?
dkayiwa
(Daniel Kayiwa)
October 24, 2017, 2:51pm
10
@niccie do not worry, i was able to reproduce it here: https://qa-refapp.openmrs.org/openmrs/module/webservices/rest/apiDocs.htm
@gayanw could it be caused by your previous commits?
gayanw
(Gayan W.)
October 24, 2017, 3:40pm
12
@dkayiwa @niccie
The errors shown in the screenshot have nothing to do with the standalone being crashed. The errors showing are due to undocumented resources , as we have enabled validation in the swagger-ui. These errors can be ignored.
Reference application seems to still use webservices.rest version: 2.16
But most my changes are introduced, in later versions.
Can you also provide with an error log without your .omod.
I see this in the error log. Not sure if it is helpful.
java.lang.IllegalStateException: Servlets can not be added to context /openmrs-standalone as the context has been initialised
dkayiwa
(Daniel Kayiwa)
October 24, 2017, 7:46pm
13
@gayanw she was using the snapshot version of the rest webservices module.
gayanw
(Gayan W.)
October 25, 2017, 4:02am
14
I mean the swagger errors showing up in the picture can’t be relevant The crash has to be due to something else.
I just tried running 2.22.0-SNAPSHOT version of webservices.rest module on reference application 2.7.0-SNAPSHOT. And there was no errors.
I didn’t try the standalone version. May be there are other ways to reproduce.
dkayiwa
(Daniel Kayiwa)
October 25, 2017, 8:11am
15
@gayanw ignore the word crash. I think she simply did mean the above screenshot.
What would you suggest as the way forward to resolve these errors? https://qa-refapp.openmrs.org/openmrs/module/webservices/rest/apiDocs.htm
niccie
(Eunice Njeri)
October 25, 2017, 8:39am
16
@gayanw @dkayiwa
Sorry for the late reply.
@gayanw
I granted you access to the .omod.
As Daniel has replied in above, we can first look into those errors.
I also downloaded and tried with the latest Rest .omod file and it works just fine with no errors.
Therefore errors seems to be with .omod snapshot.
gayanw
(Gayan W.)
October 25, 2017, 9:05am
17
Yes. I too tried your omod and I could reproduce the same error. May be it is to do with the changes you made to that omod.
https://pastebin.com/iWVWJw7i
@dkayiwa , In the Swagger UI upgrade we enabled spec validation. So a quick hack is to disable it. But I think the ideal solution will be to document these undocumented resources. I have already wrote a Wiki page on this.
https://wiki.openmrs.org/display/docs/Documenting+REST+Resources
There are already issues open for these:
RESTWS-681 Document TaskActionResource
Type: Task
Priority: Should
These actually are tasks and not bugs. I’m thinking of opening tasks for each resource. So these swagger validation errors will disappear.
niccie
(Eunice Njeri)
October 25, 2017, 9:11am
18
Probably or I installed some unwanted stuff in my eclipse when working on it.
Since it was only for two files and the PR was merged, do you mind pulling the changes and generate a .omod on your end?
dkayiwa
(Daniel Kayiwa)
October 25, 2017, 9:13am
19
@gayanw do you think those are small and simple enough to be good GCI coding tasks?
The application period ended yesterday and Google will announce accepted organizations tomorrow. We currently have 14 mentors. If you are interested in mentoring and haven’t signed up yet, please sign up using this short 3 minutes form https://goo.gl/forms/AHtqYb9N5UrREd7K2
We had over 150 tasks which where mostly from previous gci years. These tasks don’t cover all categories yet. GCI tasks can fall under one of the following categories
Coding (No task for this category yet)
Documentation /…
gayanw
(Gayan W.)
October 25, 2017, 9:17am
20
Yes, I think they are simple enough as there is no much logic to it. Understanding Swagger model classes will be good enough.