iti-41 with no content fails, but bridgeErrorHandler doesn´t work

25 views
Skip to first unread message

floria...@googlemail.com

unread,
Oct 23, 2020, 6:03:19 AM10/23/20
to ipf-user

Hi,
I´m testing Test 11983:submit_no_doc from xdstools.
The Test sends metadata, but without content. As expected it fails, but i´m not able to send a proper error response since the error happens inside on the ipf endpoint processing and adding the option bridgeErrorHandler=true does not work. Any other idea how to handle this?
Thanks,
Florian

Here is the stacktrace:

org.apache.camel.InvalidPayloadException: No body available of type: org.openehealth.ipf.commons.ihe.xds.core.requests.ProvideAndRegisterDocumentSet but has value: org.openehealth.ipf.commons.ihe.xds.core.ebxml.ebxml30.ProvideAndRegisterDocumentSetRequestType@473303bc of type: org.openehealth.ipf.commons.ihe.xds.core.ebxml.ebxml30.ProvideAndRegisterDocumentSetRequestType on: Message. Caused by: Error during type conversion from type: org.openehealth.ipf.commons.ihe.xds.core.ebxml.ebxml30.ProvideAndRegisterDocumentSetRequestType to the required type: org.openehealth.ipf.commons.ihe.xds.core.requests.ProvideAndRegisterDocumentSet with value org.openehealth.ipf.commons.ihe.xds.core.ebxml.ebxml30.ProvideAndRegisterDocumentSetRequestType@473303bc due to java.lang.IllegalArgumentException: null content is not allowed. Exchange[ID-EIT-BON-NB065-1603447331344-0-2]. Caused by: [org.apache.camel.TypeConversionException - Error during type conversion from type: org.openehealth.ipf.commons.ihe.xds.core.ebxml.ebxml30.ProvideAndRegisterDocumentSetRequestType to the required type: org.openehealth.ipf.commons.ihe.xds.core.requests.ProvideAndRegisterDocumentSet with value org.openehealth.ipf.commons.ihe.xds.core.ebxml.ebxml30.ProvideAndRegisterDocumentSetRequestType@473303bc due to java.lang.IllegalArgumentException: null content is not allowed]
    at org.apache.camel.support.MessageSupport.getMandatoryBody(MessageSupport.java:118) ~[camel-support-3.4.3.jar:3.4.3]
    at org.apache.camel.processor.ConvertBodyProcessor.process(ConvertBodyProcessor.java:105) ~[camel-base-3.4.3.jar:3.4.3]
    at org.apache.camel.processor.ConvertBodyProcessor.process(ConvertBodyProcessor.java:143) ~[camel-base-3.4.3.jar:3.4.3]
    at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$RedeliveryTask.doRun(RedeliveryErrorHandler.java:702) ~[camel-base-3.4.3.jar:3.4.3]
    at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$RedeliveryTask.run(RedeliveryErrorHandler.java:616) ~[camel-base-3.4.3.jar:3.4.3]
    at org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148) ~[camel-base-3.4.3.jar:3.4.3]
    at org.apache.camel.impl.engine.DefaultReactiveExecutor.scheduleMain(DefaultReactiveExecutor.java:60) ~[camel-base-3.4.3.jar:3.4.3]
    at org.apache.camel.processor.Pipeline.process(Pipeline.java:147) ~[camel-base-3.4.3.jar:3.4.3]
    at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:286) ~[camel-base-3.4.3.jar:3.4.3]
    at org.apache.camel.impl.engine.DefaultAsyncProcessorAwaitManager.process(DefaultAsyncProcessorAwaitManager.java:83) ~[camel-base-3.4.3.jar:3.4.3]
    at org.apache.camel.support.AsyncProcessorSupport.process(AsyncProcessorSupport.java:40) ~[camel-support-3.4.3.jar:3.4.3]
    at org.openehealth.ipf.platform.camel.ihe.ws.DefaultWsConsumer.process(DefaultWsConsumer.java:73) ~[ipf-platform-camel-ihe-ws-4.0-SNAPSHOT.jar:na]
    at org.openehealth.ipf.platform.camel.ihe.ws.AbstractWebService.process(AbstractWebService.java:72) ~[ipf-platform-camel-ihe-ws-4.0-SNAPSHOT.jar:na]
    at org.openehealth.ipf.platform.camel.ihe.xds.iti41.Iti41Service.documentRepositoryProvideAndRegisterDocumentSetB(Iti41Service.java:41) ~[ipf-platform-camel-ihe-xds-4.0-SNAPSHOT.jar:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
    at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:179) ~[cxf-core-3.4.0.jar:3.4.0]
    at org.apache.cxf.jaxws.JAXWSMethodInvoker.performInvocation(JAXWSMethodInvoker.java:66) ~[cxf-rt-frontend-jaxws-3.4.0.jar:3.4.0]
    at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96) ~[cxf-core-3.4.0.jar:3.4.0]
    at org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.invoke(AbstractJAXWSMethodInvoker.java:232) ~[cxf-rt-frontend-jaxws-3.4.0.jar:3.4.0]
    at org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:85) ~[cxf-rt-frontend-jaxws-3.4.0.jar:3.4.0]
    at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:74) ~[cxf-core-3.4.0.jar:3.4.0]
    at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59) ~[cxf-core-3.4.0.jar:3.4.0]
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[na:na]
    at java.base/java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:264) ~[na:na]
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java) ~[na:na]
    at org.apache.cxf.interceptor.ServiceInvokerInterceptor$2.run(ServiceInvokerInterceptor.java:126) ~[cxf-core-3.4.0.jar:3.4.0]
    at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37) ~[cxf-core-3.4.0.jar:3.4.0]
    at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:131) ~[cxf-core-3.4.0.jar:3.4.0]
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) ~[cxf-core-3.4.0.jar:3.4.0]
    at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) ~[cxf-core-3.4.0.jar:3.4.0]
    at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267) ~[cxf-rt-transports-http-3.4.0.jar:3.4.0]
    at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234) ~[cxf-rt-transports-http-3.4.0.jar:3.4.0]
    at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208) ~[cxf-rt-transports-http-3.4.0.jar:3.4.0]
    at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160) ~[cxf-rt-transports-http-3.4.0.jar:3.4.0]
    at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:225) ~[cxf-rt-transports-http-3.4.0.jar:3.4.0]
    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:296) ~[cxf-rt-transports-http-3.4.0.jar:3.4.0]
    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:215) ~[cxf-rt-transports-http-3.4.0.jar:3.4.0]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:665) ~[jakarta.servlet-api-4.0.2.jar:4.0.2]
    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:271) ~[cxf-rt-transports-http-3.4.0.jar:3.4.0]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-9.0.37.jar:9.0.37]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
    at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-5.2.8.RELEASE.jar:5.2.8.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.8.RELEASE.jar:5.2.8.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
    at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-5.2.8.RELEASE.jar:5.2.8.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.8.RELEASE.jar:5.2.8.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
    at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:108) ~[spring-boot-actuator-2.2.4.RELEASE.jar:2.2.4.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.8.RELEASE.jar:5.2.8.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.2.8.RELEASE.jar:5.2.8.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.8.RELEASE.jar:5.2.8.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1589) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
    at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
Caused by: org.apache.camel.TypeConversionException: Error during type conversion from type: org.openehealth.ipf.commons.ihe.xds.core.ebxml.ebxml30.ProvideAndRegisterDocumentSetRequestType to the required type: org.openehealth.ipf.commons.ihe.xds.core.requests.ProvideAndRegisterDocumentSet with value org.openehealth.ipf.commons.ihe.xds.core.ebxml.ebxml30.ProvideAndRegisterDocumentSetRequestType@473303bc due to java.lang.IllegalArgumentException: null content is not allowed
    at org.apache.camel.support.SimpleTypeConverter.convertTo(SimpleTypeConverter.java:103) ~[camel-support-3.4.3.jar:3.4.3]
    at org.apache.camel.impl.converter.CoreTypeConverterRegistry.doConvertTo(CoreTypeConverterRegistry.java:338) ~[camel-base-3.4.3.jar:3.4.3]
    at org.apache.camel.impl.converter.CoreTypeConverterRegistry.doConvertTo(CoreTypeConverterRegistry.java:234) ~[camel-base-3.4.3.jar:3.4.3]
    at org.apache.camel.impl.converter.CoreTypeConverterRegistry.mandatoryConvertTo(CoreTypeConverterRegistry.java:213) ~[camel-base-3.4.3.jar:3.4.3]
    at org.apache.camel.support.MessageSupport.getMandatoryBody(MessageSupport.java:116) ~[camel-support-3.4.3.jar:3.4.3]
    ... 78 common frames omitted
Caused by: java.lang.IllegalArgumentException: null content is not allowed
    at org.openehealth.ipf.commons.core.ContentMap.setContent(ContentMap.java:98) ~[ipf-commons-core-4.0-SNAPSHOT.jar:na]
    at org.openehealth.ipf.commons.ihe.xds.core.transform.requests.ProvideAndRegisterDocumentSetTransformer.fromEbXML(ProvideAndRegisterDocumentSetTransformer.java:125) ~[ipf-commons-ihe-xds-4.0-SNAPSHOT.jar:na]
    at org.openehealth.ipf.platform.camel.ihe.xds.core.converters.EbXML30Converters.convert(EbXML30Converters.java:69) ~[ipf-platform-camel-ihe-xds-4.0-SNAPSHOT.jar:na]
    at org.openehealth.ipf.platform.camel.ihe.xds.core.converters.EbXML30ConvertersLoader.lambda$registerConverters$5(EbXML30ConvertersLoader.java:34) ~[ipf-platform-camel-ihe-xds-4.0-SNAPSHOT.jar:na]
    at org.apache.camel.support.SimpleTypeConverter.convertTo(SimpleTypeConverter.java:99) ~[camel-support-3.4.3.jar:3.4.3]
    ... 82 common frames omitted

Dmytro Rud

unread,
Oct 23, 2020, 7:28:03 AM10/23/20
to ipf-...@googlegroups.com
Hello Florian

IPF XDS components generate protocol-specific error messages out of the box, no additional configuration is necessary.

Best regards
Dmytro


--
You received this message because you are subscribed to the Google Groups "ipf-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ipf-user+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ipf-user/23e35e8a-7400-4850-b7e9-63355f1be58fn%40googlegroups.com.

floria...@googlemail.com

unread,
Oct 26, 2020, 3:36:41 AM10/26/20
to ipf-user
Hello Dmytro,

yes, but unfornuately MISSING_DOCUMENT_FOR_DOC_ENTRY is missing in the response:

<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
  <soap:Header>
    <Action xmlns="http://www.w3.org/2005/08/addressing">urn:ihe:iti:2007:ProvideAndRegisterDocumentSet-bResponse</Action>
    <MessageID xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:e75e91f4-2246-4d77-afa5-779abfc5f6cf</MessageID>
    <To xmlns="http://www.w3.org/2005/08/addressing">http://www.w3.org/2005/08/addressing/anonymous</To>
    <RelatesTo xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:A889C9F4B2DF8A02DD1603447331122</RelatesTo>
  </soap:Header>
  <soap:Body>
    <ns3:RegistryResponse xmlns:ns6="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0" xmlns:ns5="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0" xmlns:ns4="urn:ihe:iti:xds-b:2007" xmlns:ns3="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" xmlns:ns2="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" status="urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Failure">
      <ns3:RegistryErrorList>
        <ns3:RegistryError codeContext="No body available of type: org.openehealth.ipf.commons.ihe.xds.core.requests.ProvideAndRegisterDocumentSet but has value: org.openehealth.ipf.commons.ihe.xds.core.ebxml.ebxml30.ProvideAndRegisterDocumentSetRequestType@7bcd40bc of type: org.openehealth.ipf.commons.ihe.xds.core.ebxml.ebxml30.ProvideAndRegisterDocumentSetRequestType on: Message. Caused by: Error during type conversion from type: org.openehealth.ipf.commons.ihe.xds.core.ebxml.ebxml30.ProvideAndRegisterDocumentSetRequestType to the required type: org.openehealth.ipf.commons.ihe.xds.core.requests.ProvideAndRegisterDocumentSet with value org.openehealth.ipf.commons.ihe.xds.core.ebxml.ebxml30.ProvideAndRegisterDocumentSetRequestType@7bcd40bc due to java.lang.IllegalArgumentException: null content is not allowed. Exchange[ID-EIT-BON-NB065-1603447331344-0-1]. Caused by: [org.apache.camel.TypeConversionException - Error during type conversion from type: org.openehealth.ipf.commons.ihe.xds.core.ebxml.ebxml30.ProvideAndRegisterDocumentSetRequestType to the required type: org.openehealth.ipf.commons.ihe.xds.core.requests.ProvideAndRegisterDocumentSet with value org.openehealth.ipf.commons.ihe.xds.core.ebxml.ebxml30.ProvideAndRegisterDocumentSetRequestType@7bcd40bc due to java.lang.IllegalArgumentException: null content is not allowed]" errorCode="XDSRepositoryError" severity="urn:oasis:names:tc:ebxml-regrep:ErrorSeverityType:Error"/>
      </ns3:RegistryErrorList>
    </ns3:RegistryResponse>
  </soap:Body>
</soap:Envelope>

Best regards
Florian

Dmytro Rud

unread,
Oct 26, 2020, 4:11:10 AM10/26/20
to ipf-...@googlegroups.com
Hello Florian

The converters assume that the message is valid.  It means that you should validate the message before trying to convert it -- see https://oehf.github.io/ipf-docs/docs/ihe/messageValidation

Best regards
Dmytro


Reply all
Reply to author
Forward
0 new messages