was trying this locally, but getting ’ cannot find symbol produces error during compilation’. Any pointers?
You should always provide as much information as you can, in this case you should paste your compilation log on https://hastebin.com/
@RequestMapping attributes suggested on SO are shipped with a more recent version of Spring, but I’m shooting in the dark here.
Sorry, not aware of the procedure. Details available at https://hastebin.com/ohovajuhax.sql
This class lives in the submodule omod-common that depends on Core 1.9.x and hence on Spring 3.0.5.RELEASE. Here is the output of
+- org.openmrs.api:openmrs-api:jar:1.9.10:provided | +- org.springframework:spring-core:jar:3.0.5.RELEASE:provided
For the sake of troubleshooting the issue you could make REST WS depend on the same version of Spring that is actually used at runtime. Most likely 4.1.4.RELEASE.
I tried by removing - headers = “Content-Type=multipart/form-data” - in MainResourceController.java - basically not forcing any content type. It worked
Thanks and let me know what to do with this change
You would need to create a bug ticket for this in RESTWS.
The ticket would have to explain what exactly your fix aims at solving. My guess is that
MainResourceController enforces that the upload content type is
multipart/form-data. On the other hand it remains loose on what the accepted content is (= it does not specify the
Accept header). So perhaps, when requests come in with a mismatched
Accept header an error 415 is thrown.
You would have to confirm all this before creating the ticket.
@raff, I wonder if you could skim through hereup and confirm whether my thinking makes sense?
It should be okay to skip headers. Spring should put correct headers given MultipartFile is expected as a parameter.
Ok good. @kshebbar can you create that ticket in the RESTWS Jira project?
@raff do you think that this is what might have happened:
Yes, I think so. However, the server OS shouldn’t matter rather the client OS / browser. From the thread it’s unclear to me, if @kshebbar used always the same client.
yes, I always used the same client. When the server was in Windows, did not face any issues, but had issues when hosted on cent OS.