From: Uddipan M. <udd...@tc...> - 2013-07-19 12:16:22
|
Hi all, I am facing a problem while sending a base64 string inside HL7 message in the OBX segment field 5 of the ORU_R01 message. Actually I have encoded one png image in base64 string and the size of base64 string is around 37kB. But while receiving the message on server side(inside servlet) I am getting an error.(I am trying to receive the message in processMessage method with signature public Message processMessage(Message theMessage, Map<String, Object> theMetadata) throws ReceivingApplicationException, HL7Exception) Jul 19, 2013 2:35:06 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet [com.tcs.hl7server.MyServer] in context with path [/MyHL7Server] threw exception java.lang.ArrayIndexOutOfBoundsException at java.lang.System.arraycopy(Native Method) at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:441) at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:315) at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:200) at ca.uhn.hl7v2.hoh.encoder.AbstractHl7OverHttpDecoder.readBytesNonChunked(AbstractHl7OverHttpDecoder.java:370) at ca.uhn.hl7v2.hoh.encoder.AbstractHl7OverHttpDecoder.doReadContentsFromInputStreamAndDecode(AbstractHl7OverHttpDecoder.java:191) at ca.uhn.hl7v2.hoh.encoder.AbstractHl7OverHttpDecoder.readContentsFromInputStreamAndDecode(AbstractHl7OverHttpDecoder.java:421) at ca.uhn.hl7v2.hoh.raw.server.HohRawServlet.doPost(HohRawServlet.java:68) at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) But if I try to capture the incoming HL7 message in doPost method of the servlet,the Message can be read using BufferedReader. Can anyone please point out why the error is coming at line no 370 in AbstractHl7OverHttpDecoder.java ?Is there any size limit of HL7 message implemented using HAPi? Uddipan Mukherjee Systems Engineer Tata Consultancy Services Ph:- 8981151600 Cell:- 8125893206 Mailto: udd...@tc... Website: http://www.tcs.com ____________________________________________ Experience certainty. IT Services Business Solutions Consulting ____________________________________________ =====-----=====-----===== Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you |