No announcement yet.

DICOM Listener: ERROR-300: Transformer error

  • Filter
  • Time
  • Show
Clear All
new posts

  • DICOM Listener: ERROR-300: Transformer error

    When I try to read particular DICOM files, I end up with the below error message. If I am not wrong this error occurs while converting XML back to DICOM message at the source.

    I appreciate your help to fix the issue...

    [2013-05-14 11:24:09,978] ERROR (org.mule.impl.DefaultExceptionStrategy:231):
    ************************************************** ******************************
    Message : java.lang.IllegalStateException: state:EXPECT_FRAG (com.mirth.connect.model.converters.SerializerExce ption)
    Type : org.mule.umo.transformer.TransformerException
    Code : 64999
    JavaDoc :
    Transformer : Transformer{name='5ac3f9db-b0e1-4292-bf72-d92a967f071b_source_transformer', returnClass=false, returnClass=false, sourceTypes=[]}
    ************************************************** ******************************
    Exception stack is:
    1. state:EXPECT_FRAG (java.lang.IllegalStateException) (null)
    2. java.lang.IllegalStateException: state:EXPECT_FRAG (com.mirth.connect.model.converters.SerializerExce ption)
    com.mirth.connect.model.converters.DICOMSerializer :126 (null)
    3. java.lang.IllegalStateException: state:EXPECT_FRAG (com.mirth.connect.model.converters.SerializerExce ption) (org.mule.umo.transformer.TransformerException)
    com.mirth.connect.server.mule.transformers.JavaScr iptTransformer:410 (
    ************************************************** ******************************
    Root Exception stack trace:
    java.lang.IllegalStateException: state:EXPECT_FRAG

    at nt(

    at (

    at org.apache.xerces.parsers.AbstractSAXParser.startE lement(Unknown Source)

    at org.apache.xerces.impl.XMLDocumentFragmentScannerI mpl.scanStartElement(Unknown Source)

    at org.apache.xerces.impl.XMLDocumentFragmentScannerI mpl$FragmentContentDispatcher.dispatch(Unknown Source)

    at org.apache.xerces.impl.XMLDocumentFragmentScannerI mpl.scanDocument(Unknown Source)

    at org.apache.xerces.parsers.XML11Configuration.parse (Unknown Source)

    at org.apache.xerces.parsers.XML11Configuration.parse (Unknown Source)

    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)

    at org.apache.xerces.parsers.AbstractSAXParser.parse( Unknown Source)

    at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser .parse(Unknown Source)

    at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)

    at com.mirth.connect.model.converters.DICOMSerializer .fromXML(

    at com.mirth.connect.model.converters.DICOMSerializer .fromXML(

    at com.mirth.connect.server.mule.transformers.JavaScr iptTransformer.evaluateScript(JavaScriptTransforme

    at com.mirth.connect.server.mule.transformers.JavaScr iptTransformer.transform(JavaScriptTransformer.jav a:296)

    at org.mule.transformers.AbstractEventAwareTransforme r.doTransform( 8)

    at org.mule.transformers.AbstractTransformer.transfor m(

    at org.mule.transformers.AbstractTransformer.transfor m(

    at org.mule.impl.MuleEvent.getTransformedMessage(Mule

    at org.mule.routing.inbound.SelectiveConsumer.isMatch (

    at org.mule.routing.inbound.InboundMessageRouter.rout e(

    at org.mule.providers.AbstractMessageReceiver$Default InternalMessageListener.onMessage(AbstractMessageR

    at org.mule.providers.AbstractMessageReceiver.routeMe ssage(

    at org.mule.providers.AbstractMessageReceiver.routeMe ssage(

    at com.mirth.connect.connectors.vm.VMMessageReceiver. getMessages(

    at org.mule.providers.TransactedPollingMessageReceive r.poll(


    at .java:290)

    at eadPoolExecutor.runWorker( 1061)

    at eadPoolExecutor$ :575)


    ************************************************** ******************************
    Last edited by venkatepost; 05-14-2013, 01:25 AM.


  • #2
    Are there any private tags?

    Do you have any private tags in your DICOM?

    I've just come across this and in my case the DICOM object had private tags which where sequences, when mirth converts this to xml it uses a UN VR type, however when it subsequently tries to decode it's own xml the presence of sequence data within an item that's not of VR type SQ confuses the parser.


    • #3
      java.lang.IllegalStateException: state:EXPECT_FRAG
      Thanks for this. I just came across the same thing in 3.4.2. Sure enough, I have private DICOM tags with vr types of UN rather than SQ in it.

      I've just verified this is also a problem in 3.5.2.

      Here's my workaround for a Philips Cath.

      function fixphilipscath(arg1) {
      	if (msg['tag20019000']['item']['tag20011069']['@vr']=="UN") { 
      	if (msg['tag20019000']['@vr']=="UN") {
      	if (msg['tag2003102E']['@vr']=="UN") { 
      Last edited by tippenring; 05-31-2018, 09:49 AM. Reason: more info


      • #4
        I have found a solution to dicom serializer error (EXPECT_FRAG or Private Tags Problem) like that;

        First set all data types to RAW in the channel that is DICOM Listener or whatever,
        Create a Destination as Javascript Writer,
        In this destination, return raw data (return DICOMUtil.getDICOMRawData(connectorMessage); )
        In the Response Transformer of this destination, change the data type of message templates to DICOM,
        Open a binary dicom file in message template,
        and finally, get any desired tags from dicom.

        I didn't get any error in 3.6.1, 3.6.2, 3.8.0 with this way

        Last edited by ysdemiryilmaz; 05-08-2020, 03:16 AM.
        Yavuz Selim Demiryılmaz
        Computer Engineer @imageRAD