Skip to content
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

UnprocessableEntityException: HTTP 422 Unprocessable Entity: Attachments have data and/or url, or else SHOULD have either contentType and/or language #20

Open
pnrobinson opened this issue Sep 1, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@pnrobinson
Copy link
Collaborator

2022-09-01 17:27:46.906 [main] ERROR o.s.boot.SpringApplication [SpringApplication.java:856] Application run failed
java.lang.IllegalStateException: Failed to execute CommandLineRunner
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:807)
at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:788)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:333)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1309)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1298)
at org.monarchinitiative.hapiphenoclient.PhenoClientConsoleApplication.main(PhenoClientConsoleApplication.java:36)
Caused by: ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException: HTTP 422 Unprocessable Entity: Attachments have data and/or url, or else SHOULD have either contentType and/or language
at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:67)

@pnrobinson pnrobinson added the bug Something isn't working label Sep 1, 2022
@chrisroederucdenver
Copy link
Collaborator

Caused by: ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException: HTTP 422 Unprocessable Entity: Attachments have data and/or url, or else SHOULD have either contentType and/or language
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
at ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException.newInstance(BaseServerResponseException.java:305)
at ca.uhn.fhir.rest.client.impl.BaseClient.invokeClient(BaseClient.java:363)
at ca.uhn.fhir.rest.client.impl.GenericClient$BaseClientExecutable.invoke(GenericClient.java:540)
at ca.uhn.fhir.rest.client.impl.GenericClient$CreateInternal.execute(GenericClient.java:693)
at ca.uhn.fhir.rest.client.impl.GenericClient$CreateInternal.execute(GenericClient.java:647)
at org.monarchinitiative.hapiphenoclient.analysis.PhenopacketDemoRunner.postResource(PhenopacketDemoRunner.java:243)
at org.monarchinitiative.hapiphenoclient.analysis.PhenopacketDemoRunner.postBethlemClinicalExample(PhenopacketDemoRunner.java:374)
at org.monarchinitiative.hapiphenoclient.analysis.PhenopacketDemoRunner.postToFhir(PhenopacketDemoRunner.java:425)
at org.monarchinitiative.hapiphenoclient.PhenoClientConsoleApplication.run(PhenoClientConsoleApplication.java:46)
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:804)
... 5 common frames omitted

@chrisroederucdenver
Copy link
Collaborator

2022-09-06 14:41:40.549 [qtp1239821079-26] DEBUG c.uhn.fhir.rest.server.RestfulServer [RestfulServer.java:1134] RestfulServer.handleRequest() got rest operation type:CREATE
2022-09-06 14:41:40.802 [qtp1239821079-26] ERROR c.uhn.fhir.rest.server.RestfulServer [RestfulServer.java:1183] RestfulServer.handleRequest() Throwable:{}
ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException: Attachments have data and/or url, or else SHOULD have either contentType and/or language
at ca.uhn.fhir.rest.server.interceptor.BaseValidatingInterceptor.fail(BaseValidatingInterceptor.java:125)
at ca.uhn.fhir.rest.server.interceptor.BaseValidatingInterceptor.validate(BaseValidatingInterceptor.java:358)
at ca.uhn.fhir.rest.server.interceptor.RequestValidatingInterceptor.incomingRequestPostProcessed(RequestValidatingInterceptor.java:76)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at ca.uhn.fhir.interceptor.executor.BaseInterceptorService$HookInvoker.invoke(BaseInterceptorService.java:565)
at ca.uhn.fhir.interceptor.executor.BaseInterceptorService.doCallHooks(BaseInterceptorService.java:300)
at ca.uhn.fhir.interceptor.executor.BaseInterceptorService.callHooks(BaseInterceptorService.java:289)
at ca.uhn.fhir.rest.server.RestfulServer.handleRequest(RestfulServer.java:1143)
at ca.uhn.fhir.rest.server.RestfulServer.doPost(RestfulServer.java:423)
at ca.uhn.fhir.rest.server.RestfulServer.service(RestfulServer.java:1868)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)
at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1626)
at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:228)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:126)
at org.springframework.boot.web.servlet.support.ErrorPageFilter.access$000(ErrorPageFilter.java:64)
at org.springframework.boot.web.servlet.support.ErrorPageFilter$1.doFilterInternal(ErrorPageFilter.java:101)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
at org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:119)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:191)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.Server.handle(Server.java:516)
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)
at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:386)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
at java.base/java.lang.Thread.run(Thread.java:833)
2022-09-06 14:41:40.802 [qtp1239821079-26] INFO fhirtest.access [LoggingInterceptor.java:160] ERROR - POST http://localhost:8888/fhir/Observation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants