Announcement

Collapse
No announcement yet.

DICOM Listener: ERROR-300: Transformer error

Collapse
X
 
  • 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 : http://mule.codehaus.org/docs/apidoc...Exception.html
    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)
    org.dcm4che2.io.ContentHandlerAdapter:117 (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 (http://mule.codehaus.org/docs/apidoc...Exception.html)
    ************************************************** ******************************
    Root Exception stack trace:
    java.lang.IllegalStateException: state:EXPECT_FRAG

    at org.dcm4che2.io.ContentHandlerAdapter.onStartEleme nt(ContentHandlerAdapter.java:117)

    at org.dcm4che2.io.ContentHandlerAdapter.startElement (ContentHandlerAdapter.java:89)

    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(DICOMSerializer.java:123)

    at com.mirth.connect.model.converters.DICOMSerializer .fromXML(DICOMSerializer.java:47)

    at com.mirth.connect.server.mule.transformers.JavaScr iptTransformer.evaluateScript(JavaScriptTransforme r.java:384)

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

    at org.mule.transformers.AbstractEventAwareTransforme r.doTransform(AbstractEventAwareTransformer.java:4 8)

    at org.mule.transformers.AbstractTransformer.transfor m(AbstractTransformer.java:197)

    at org.mule.transformers.AbstractTransformer.transfor m(AbstractTransformer.java:200)

    at org.mule.impl.MuleEvent.getTransformedMessage(Mule Event.java:251)

    at org.mule.routing.inbound.SelectiveConsumer.isMatch (SelectiveConsumer.java:61)

    at org.mule.routing.inbound.InboundMessageRouter.rout e(InboundMessageRouter.java:79)

    at org.mule.providers.AbstractMessageReceiver$Default InternalMessageListener.onMessage(AbstractMessageR eceiver.java:487)

    at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:266)

    at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:225)

    at com.mirth.connect.connectors.vm.VMMessageReceiver. getMessages(VMMessageReceiver.java:223)

    at org.mule.providers.TransactedPollingMessageReceive r.poll(TransactedPollingMessageReceiver.java:108)

    at org.mule.providers.PollingMessageReceiver.run(Poll ingMessageReceiver.java:97)

    at org.mule.impl.work.WorkerContext.run(WorkerContext .java:290)

    at edu.emory.mathcs.backport.java.util.concurrent.Thr eadPoolExecutor.runWorker(ThreadPoolExecutor.java: 1061)

    at edu.emory.mathcs.backport.java.util.concurrent.Thr eadPoolExecutor$Worker.run(ThreadPoolExecutor.java :575)

    at java.lang.Thread.run(Thread.java:722)

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

    Venkat

  • #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.

    Comment


    • #3
      Code:
      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.

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

      Comment


      • #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

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

        Comment

        Working...
        X