New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add-call to unmodifiable list causes server exception #302

Closed
magnuschatt opened this Issue Feb 24, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@magnuschatt

magnuschatt commented Feb 24, 2016

In v1.4 it looks like RestfulServerUtils.addProfileToBundleEntry(line 92) is trying to add an element to an unmodifiable list. The list comes from ResourceMetadataKeyEnum.PROFILES.get, which in turns gets it from ResourceMetadataKeyEnum.getIdListFromMetadataOrNullIfNone.

In our case the call to addProfileToBundleEntry stems from trying to READ a resource from the server.

Copied from server.log:
java.lang.UnsupportedOperationException at java.util.Collections$UnmodifiableCollection.add(Collections.java:1115) at ca.uhn.fhir.rest.server.RestfulServerUtils.addProfileToBundleEntry(RestfulServerUtils.java:92) at ca.uhn.fhir.rest.server.RestfulServerUtils.streamResponseAsResource(RestfulServerUtils.java:601) at ca.uhn.fhir.rest.server.RestfulResponse.streamResponseAsResource(RestfulResponse.java:46) at ca.uhn.fhir.rest.method.BaseResourceReturningMethodBinding.invokeServer(BaseResourceReturningMethodBinding.java:255) at ca.uhn.fhir.rest.server.RestfulServer.handleRequest(RestfulServer.java:629) at ca.uhn.fhir.rest.server.RestfulServer.doGet(RestfulServer.java:259) at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:512) at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:150) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:854) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:511) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:744) at org.jboss.threads.JBossThread.run(JBossThread.java:122)

@jamesagnew

This comment has been minimized.

Owner

jamesagnew commented Feb 28, 2016

Thanks for reporting, checking in a fix now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment