Facing error while sending base64 string in HL7 message over HTTP from android client -
i working hl7 message in android client (api 17) , using hapi library generate , parse hl7 messages.the message working fine when transmitting small string values. have send image on http hl7 server , using mdm_t02 message of hl7 version 2.5. getting following error in server side when sending hl7 message image converted base64 string , inserted obx-5 field.
jul 23, 2013 3:05:32 pm org.apache.catalina.core.standardwrappervalve invoke severe: servlet.service() servlet [com.tcs.hl7server.myserver] in context path [/myhl7server] threw exception java.lang.arrayindexoutofboundsexception @ java.lang.system.arraycopy(native method) @ org.apache.tomcat.util.buf.bytechunk.substract(bytechunk.java:441) @ org.apache.catalina.connector.inputbuffer.read(inputbuffer.java:315) @ org.apache.catalina.connector.coyoteinputstream.read(coyoteinputstream.java:200) @ ca.uhn.hl7v2.hoh.encoder.abstracthl7overhttpdecoder.readbytesnonchunked(abstracthl7overhttpdecoder.java:370) @ ca.uhn.hl7v2.hoh.encoder.abstracthl7overhttpdecoder.doreadcontentsfrominputstreamanddecode(abstracthl7overhttpdecoder.java:191) @ ca.uhn.hl7v2.hoh.encoder.abstracthl7overhttpdecoder.readcontentsfrominputstreamanddecode(abstracthl7overhttpdecoder.java:421) @ ca.uhn.hl7v2.hoh.raw.server.hohrawservlet.dopost(hohrawservlet.java:68) @ javax.servlet.http.httpservlet.service(httpservlet.java:647) @ javax.servlet.http.httpservlet.service(httpservlet.java:728) @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:305) @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:210) @ org.apache.catalina.core.standardwrappervalve.invoke(standardwrappervalve.java:222) @ org.apache.catalina.core.standardcontextvalve.invoke(standardcontextvalve.java:123) @ org.apache.catalina.authenticator.authenticatorbase.invoke(authenticatorbase.java:472) @ org.apache.catalina.core.standardhostvalve.invoke(standardhostvalve.java:171) @ org.apache.catalina.valves.errorreportvalve.invoke(errorreportvalve.java:99) @ org.apache.catalina.valves.accesslogvalve.invoke(accesslogvalve.java:936) @ org.apache.catalina.core.standardenginevalve.invoke(standardenginevalve.java:118) @ org.apache.catalina.connector.coyoteadapter.service(coyoteadapter.java:407) @ org.apache.coyote.http11.abstracthttp11processor.process(abstracthttp11processor.java:1004) @ org.apache.coyote.abstractprotocol$abstractconnectionhandler.process(abstractprotocol.java:589) @ org.apache.tomcat.util.net.jioendpoint$socketprocessor.run(jioendpoint.java:310) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1110) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:603) @ java.lang.thread.run(thread.java:722)
i not getting why thr bytechunk.java giving error.
it highly appreciated if can throw light on this. thanks.
the problem in handing httpservletrequest in server side using hapi provided api maximum size of buffer in hapi classes capped 4kb.in case hl7 message having base 64 string payload of 20-30 kb. problem solved when incoming httpservletrequest handled in separate dopost method , hl7 message created incoming data.
Comments
Post a Comment