Announcement

Collapse
No announcement yet.

Mirth 1.4 - ReferenceError: "useStrictParser" is not defined.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Mirth 1.4 - ReferenceError: "useStrictParser" is not defined.

    Environment:

    Mirth 1.4, Windows XP Pro, Java Runtime 1.6 Update 1
    Outbound Channel: Database to FileWriter
    ==========
    Code:
    // Mirth 1.3.1 code commented: 
    //var outputMessage = serializer.fromXML(tmp);
    
    //Code chagned for Mirth 1.4:
    var outputMessage = SerializerFactory.getHL7Serializer(useStrictParser).fromXML(message);
    Getting "ReferenceError: "useStrictParser" is not defined" when trying to send an OUTBOUND message.

    Tried restarting Mirth, Delete and Re-import channel, Java Cache cleanup. Also tried "Use Strict Parser" turned ON and OFF (Destination / Edit Transformer / Outgoing Data / Properties / Use sctrict Parser - Checked and then tried after uncheck). Problem persists.

    Any help to resolve would be appreciated.

    Thanks in advance!


    ==========
    ERROR 2007-04-11 15:23:49,507 [82b75f3e-410d-46be-856e-e88bd99dd9cf_destination_1_connector.dispatcher.1] org.mule.impl.DefaultComponentExceptionStrategy: Caught exception in Exception Strategy for: 82b75f3e-410d-46be-856e-e88bd99dd9cf: org.mule.umo.transformer.TransformerException: ReferenceError: "useStrictParser" is not defined. (884dd72e-248b-4404-9ab6-a9f0a54c50f1#108) (org.mozilla.javascript.EcmaError) (org.mule.umo.transformer.TransformerException)
    org.mule.umo.transformer.TransformerException: ReferenceError: "useStrictParser" is not defined. (884dd72e-248b-4404-9ab6-a9f0a54c50f1#108) (org.mozilla.javascript.EcmaError) (org.mule.umo.transformer.TransformerException)
    at com.webreach.mirth.server.mule.transformers.JavaSc riptTransformer.transform(JavaScriptTransformer.ja va:245)
    at org.mule.transformers.AbstractEventAwareTransforme r.doTransform(AbstractEventAwareTransformer.java:4 8)
    at org.mule.transformers.AbstractTransformer.transfor m(AbstractTransformer.java:197)
    at org.mule.impl.MuleEvent.getTransformedMessage(Mule Event.java:251)
    at com.webreach.mirth.server.controllers.MessageObjec tController.getMessageObjectFromEvent(MessageObjec tController.java:276)
    at com.webreach.mirth.server.mule.providers.file.File MessageDispatcher.doDispatch(FileMessageDispatcher .java:71)
    at org.mule.providers.AbstractMessageDispatcher$Worke r.run(AbstractMessageDispatcher.java:257)
    at org.mule.impl.work.WorkerContext.run(WorkerContext .java:290)
    at edu.emory.mathcs.backport.java.util.concurrent.Thr eadPoolExecutor$Worker.runTask(ThreadPoolExecutor. java:650)
    at edu.emory.mathcs.backport.java.util.concurrent.Thr eadPoolExecutor$Worker.run(ThreadPoolExecutor.java :675)
    at java.lang.Thread.run(Unknown Source)
    Caused by: org.mule.umo.transformer.TransformerException: ReferenceError: "useStrictParser" is not defined. (884dd72e-248b-4404-9ab6-a9f0a54c50f1#108) (org.mozilla.javascript.EcmaError)
    at com.webreach.mirth.server.mule.transformers.JavaSc riptTransformer.evaluateTransformerScript(JavaScri ptTransformer.java:348)
    at com.webreach.mirth.server.mule.transformers.JavaSc riptTransformer.transform(JavaScriptTransformer.ja va:229)
    ... 10 more
    Caused by: org.mozilla.javascript.EcmaError: ReferenceError: "useStrictParser" is not defined. (884dd72e-248b-4404-9ab6-a9f0a54c50f1#108)
    at org.mozilla.javascript.ScriptRuntime.constructErro r(ScriptRuntime.java:3226)
    at org.mozilla.javascript.ScriptRuntime.constructErro r(ScriptRuntime.java:3216)
    at org.mozilla.javascript.ScriptRuntime.notFoundError (ScriptRuntime.java:3289)
    at org.mozilla.javascript.ScriptRuntime.nameOrFunctio n(ScriptRuntime.java:1633)
    at org.mozilla.javascript.ScriptRuntime.name(ScriptRu ntime.java:1572)
    at org.mozilla.javascript.gen.c20._c3(884dd72e-248b-4404-9ab6-a9f0a54c50f1:108)
    at org.mozilla.javascript.gen.c20.call(884dd72e-248b-4404-9ab6-a9f0a54c50f1)
    at org.mozilla.javascript.optimizer.OptRuntime.callNa me0(OptRuntime.java:106)
    at org.mozilla.javascript.gen.c20._c0(884dd72e-248b-4404-9ab6-a9f0a54c50f1:117)
    at org.mozilla.javascript.gen.c20.call(884dd72e-248b-4404-9ab6-a9f0a54c50f1)
    at org.mozilla.javascript.ContextFactory.doTopCall(Co ntextFactory.java:337)
    at org.mozilla.javascript.ScriptRuntime.doTopCall(Scr iptRuntime.java:2755)
    at org.mozilla.javascript.gen.c20.call(884dd72e-248b-4404-9ab6-a9f0a54c50f1)
    at org.mozilla.javascript.gen.c20.exec(884dd72e-248b-4404-9ab6-a9f0a54c50f1)
    at com.webreach.mirth.server.mule.transformers.JavaSc riptTransformer.evaluateTransformerScript(JavaScri ptTransformer.java:308)
    ... 11 more

  • #2
    Re: Mirth 1.4 - ReferenceError: "useStrictParser" is not defined.

    Perhaps:

    Code:
    var outputMessage = SerializerFactory.getHL7Serializer(false).fromXML(message);

    Comment


    • #3
      Re: Mirth 1.4 - ReferenceError: "useStrictParser" is not defined.

      Thank you for the reply. I get "Can't find method" error when I try:

      Code:
      var outputMessage = SerializerFactory.getHL7Serializer(false).fromXML(message);
      ERROR 2007-04-11 17:07:34,909 [82b75f3e-410d-46be-856e-e88bd99dd9cf_destination_1_connector.dispatcher.1] org.mule.impl.DefaultComponentExceptionStrategy: Caught exception in Exception Strategy for: 82b75f3e-410d-46be-856e-e88bd99dd9cf: org.mule.umo.transformer.TransformerException: Can't find method com.webreach.mirth.model.converters.SerializerFact ory.getHL7Serializer(boolean). (29d3f97c-d311-40c1-b063-c74634ec1651#108) (org.mozilla.javascript.EvaluatorException) (org.mule.umo.transformer.TransformerException)
      org.mule.umo.transformer.TransformerException: Can't find method com.webreach.mirth.model.converters.SerializerFact ory.getHL7Serializer(boolean). (29d3f97c-d311-40c1-b063-c74634ec1651#108) (org.mozilla.javascript.EvaluatorException) (org.mule.umo.transformer.TransformerException)
      at com.webreach.mirth.server.mule.transformers.JavaSc riptTransformer.transform(JavaScriptTransformer.ja va:245)
      at org.mule.transformers.AbstractEventAwareTransforme r.doTransform(AbstractEventAwareTransformer.java:4 8)
      at org.mule.transformers.AbstractTransformer.transfor m(AbstractTransformer.java:197)
      at org.mule.impl.MuleEvent.getTransformedMessage(Mule Event.java:251)
      at com.webreach.mirth.server.controllers.MessageObjec tController.getMessageObjectFromEvent(MessageObjec tController.java:276)
      at com.webreach.mirth.server.mule.providers.file.File MessageDispatcher.doDispatch(FileMessageDispatcher .java:71)
      at org.mule.providers.AbstractMessageDispatcher$Worke r.run(AbstractMessageDispatcher.java:257)
      at org.mule.impl.work.WorkerContext.run(WorkerContext .java:290)
      at edu.emory.mathcs.backport.java.util.concurrent.Thr eadPoolExecutor$Worker.runTask(ThreadPoolExecutor. java:650)
      at edu.emory.mathcs.backport.java.util.concurrent.Thr eadPoolExecutor$Worker.run(ThreadPoolExecutor.java :675)
      at java.lang.Thread.run(Unknown Source)
      Caused by: org.mule.umo.transformer.TransformerException: Can't find method com.webreach.mirth.model.converters.SerializerFact ory.getHL7Serializer(boolean). (29d3f97c-d311-40c1-b063-c74634ec1651#108) (org.mozilla.javascript.EvaluatorException)
      at com.webreach.mirth.server.mule.transformers.JavaSc riptTransformer.evaluateTransformerScript(JavaScri ptTransformer.java:348)
      at com.webreach.mirth.server.mule.transformers.JavaSc riptTransformer.transform(JavaScriptTransformer.ja va:229)
      ... 10 more
      Caused by: org.mozilla.javascript.EvaluatorException: Can't find method com.webreach.mirth.model.converters.SerializerFact ory.getHL7Serializer(boolean). (29d3f97c-d311-40c1-b063-c74634ec1651#108)
      at org.mozilla.javascript.DefaultErrorReporter.runtim eError(DefaultErrorReporter.java:95)
      at org.mozilla.javascript.Context.reportRuntimeError( Context.java:966)
      at org.mozilla.javascript.Context.reportRuntimeError( Context.java:1022)
      at org.mozilla.javascript.Context.reportRuntimeError1 (Context.java:985)
      at org.mozilla.javascript.NativeJavaMethod.call(Nativ eJavaMethod.java:158)
      at org.mozilla.javascript.optimizer.OptRuntime.call1( OptRuntime.java:64)
      at org.mozilla.javascript.gen.c25._c3(29d3f97c-d311-40c1-b063-c74634ec1651:108)
      at org.mozilla.javascript.gen.c25.call(29d3f97c-d311-40c1-b063-c74634ec1651)
      at org.mozilla.javascript.optimizer.OptRuntime.callNa me0(OptRuntime.java:106)
      at org.mozilla.javascript.gen.c25._c0(29d3f97c-d311-40c1-b063-c74634ec1651:117)
      at org.mozilla.javascript.gen.c25.call(29d3f97c-d311-40c1-b063-c74634ec1651)
      at org.mozilla.javascript.ContextFactory.doTopCall(Co ntextFactory.java:337)
      at org.mozilla.javascript.ScriptRuntime.doTopCall(Scr iptRuntime.java:2755)
      at org.mozilla.javascript.gen.c25.call(29d3f97c-d311-40c1-b063-c74634ec1651)
      at org.mozilla.javascript.gen.c25.exec(29d3f97c-d311-40c1-b063-c74634ec1651)
      at com.webreach.mirth.server.mule.transformers.JavaSc riptTransformer.evaluateTransformerScript(JavaScri ptTransformer.java:308)
      ... 11 more

      Comment


      • #4
        Re: Mirth 1.4 - ReferenceError: "useStrictParser" is not defined.

        Should be:

        var outputMessage = SerializerFactory.getHL7Serializer(false, false).fromXML(message);

        There was a last minute change in 1.4 that wasn't reflected on the drag and drop.

        The first parameter is "useStrictParser" the second is "useValidationOnStrictParser".

        -Chris
        Chris Lang

        Comment


        • #5
          Re: Mirth 1.4 - ReferenceError: "useStrictParser" is not defined.

          Chris,

          Thank you for the reply. When I try that, I don't get any error but the output message is not in HL7 format.

          The outbound ORU message I get is:
          [red]
          ownermiddlenameA
          faxqueuedocumentid2
          patientmiddlenameR
          patientaccount12345
          patientssn111223333
          cursysdatetime20070412120615
          refphysuffixMD
          patientgenderF
          refphyfirstnameTestRefPhyFirstName
          observationdate20050203
          documenttypedescriptionMISC
          patientstateOH
          ownerid123
          patientfirstnameTestPatFirstName
          documentidDocumentID123456
          patientlastnameTestPatLastName
          ownerfirstnameTestOwnerFirstName
          refphyupinA12345
          patientcityTestPatCity
          refphylastnameTestRefPhy
          patientaddress1234 Main St
          ownerlastnameSmith
          refphymiddlename
          patientzipcode12345
          patientbirthdate19600303
          [/red]

          Comment


          • #6
            Re: Mirth 1.4 - ReferenceError: "useStrictParser" is not defined.

            Change "message" to "msg"

            -Chris
            Chris Lang

            Comment


            • #7
              Re: Mirth 1.4 - ReferenceError: "useStrictParser" is not defined.

              Tried that. Getting the same output as above. Problem persists!

              Comment

              Working...
              X