com.mirth.connect.server.MirthJavascriptTransformerException: CHANNEL: WsToHttpTest CONNECTOR: sourceConnector SCRIPT SOURCE: TRANSFORMER LINE NUMBER: 31 DETAILS: TypeError: Cannot set property "1" of undefined to "" at f4645dbe-9637-415e-ae39-f3dce72d6eaa:31 (createSegment) at f4645dbe-9637-415e-ae39-f3dce72d6eaa:53 (doTransform) at f4645dbe-9637-415e-ae39-f3dce72d6eaa:80 (doScript) at f4645dbe-9637-415e-ae39-f3dce72d6eaa:82 at com.mirth.connect.server.transformers.JavaScriptFilterTransformer$FilterTransformerTask.doCall(JavaScriptFilterTransformer.java:154)

Stack Overflow | 伽角马 | 4 months ago
  1. 0

    How to convert a json into HL7 using Mirth Connect 3.4.1?

    Stack Overflow | 4 months ago | 伽角马
    com.mirth.connect.server.MirthJavascriptTransformerException: CHANNEL: WsToHttpTest CONNECTOR: sourceConnector SCRIPT SOURCE: TRANSFORMER LINE NUMBER: 31 DETAILS: TypeError: Cannot set property "1" of undefined to "" at f4645dbe-9637-415e-ae39-f3dce72d6eaa:31 (createSegment) at f4645dbe-9637-415e-ae39-f3dce72d6eaa:53 (doTransform) at f4645dbe-9637-415e-ae39-f3dce72d6eaa:80 (doScript) at f4645dbe-9637-415e-ae39-f3dce72d6eaa:82 at com.mirth.connect.server.transformers.JavaScriptFilterTransformer$FilterTransformerTask.doCall(JavaScriptFilterTransformer.java:154)
  2. 0

    HL7 with Mirth: How to avoid Segments with double sequence numbers?

    Stack Overflow | 2 months ago | kramer65
    com.mirth.connect.server.MirthJavascriptTransformerException: CHANNEL: test setup CONNECTOR: sourceConnector SCRIPT SOURCE: TRANSFORMER SOURCE CODE: 46: //createSegment('OBX', tmp, 1); 47: //tmp['OBX'][1]['OBX.1']['OBX.1.1'] = 1; 48: //tmp['OBX'][1]['OBX.2']['OBX.2.1'] = "ST"; 49: createSegment('OBX', tmp, 2); 50: tmp['OBX'][2]['OBX.1']['OBX.1.1'] = 2; 51: tmp['OBX'][2]['OBX.2']['OBX.2.1'] = "ST"; 52: LINE NUMBER: 50 DETAILS: TypeError: Cannot read property "OBX.1" from undefined at 682bcffd-73bf-405b-af83-ba83b19d86ab:50 (doTransform) at 682bcffd-73bf-405b-af83-ba83b19d86ab:126 (doScript) at 682bcffd-73bf-405b-af83-ba83b19d86ab:128
  3. 0

    Not sure if this is at all related to MIRTH-3824... In version 3.3.0, you could put a JSON object into a Response object, and choose that response in your source connector, and everything would work just fine. When you viewed the response message (whether in the receiving channel's source or the sending channel's destination), you would correctly see the JSON object that was put into the response. So, for example, you could do something like this in the Postprocessor, and respond from the Postprocessor: var jsonObj = { "result": "This is the result.", "data": "This is some other data." } return ResponseFactory.getSentResponse(jsonObj); However, it's no longer working this way in 3.3.1. Now, when you look at the response message in the message view, you see: [object Object] And if you try to use the response in a response transformer, you get an error like this: Response Transformer error ERROR MESSAGE: Error evaluating response transformer com.mirth.connect.server.MirthJavascriptTransformerException: CHANNEL: HTTP Client with JSON CONNECTOR: Destination 1 SCRIPT SOURCE: response SOURCE CODE: 39: } 40: eval('importPackage(' + Packages.java.lang.Class.forName(className).getPackage().getName() + ')'); 41: } 42: } 43: function doScript() { 44: msg = JSON.parse(connectorMessage.getResponseTransformedData()); 45: function doTransform() { 46: 47: 48: var mapping; LINE NUMBER: 44 DETAILS: SyntaxError: Unexpected token: o at d89555a6-f1d2-4738-a164-48b213af267f:44 (doScript) at d89555a6-f1d2-4738-a164-48b213af267f:91 at com.mirth.connect.server.transformers.JavaScriptResponseTransformer$ResponseTransformerTask.call(JavaScriptResponseTransformer.java:160) at com.mirth.connect.server.transformers.JavaScriptResponseTransformer$ResponseTransformerTask.call(JavaScriptResponseTransformer.java:118) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) I've attached a couple of channels (an HTTP Sender that sends to an HTTP Listener with JSON as the data type) that demonstrate this. The channels work perfectly fine under 3.3.0, but cause an error under 3.3.1.

    Mirth Project | 11 months ago | Eric Butterfield
    com.mirth.connect.server.MirthJavascriptTransformerException: CHANNEL: HTTP Client with JSON CONNECTOR: Destination 1 SCRIPT SOURCE: response SOURCE CODE: 39: } 40: eval('importPackage(' + Packages.java.lang.Class.forName(className).getPackage().getName() + ')'); 41: } 42: } 43: function doScript() { 44: msg = JSON.parse(connectorMessage.getResponseTransformedData()); 45: function doTransform() { 46: 47: 48: var mapping; LINE NUMBER: 44 DETAILS: SyntaxError: Unexpected token: o at d89555a6-f1d2-4738-a164-48b213af267f:44 (doScript) at d89555a6-f1d2-4738-a164-48b213af267f:91
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Not sure if this is at all related to MIRTH-3824... In version 3.3.0, you could put a JSON object into a Response object, and choose that response in your source connector, and everything would work just fine. When you viewed the response message (whether in the receiving channel's source or the sending channel's destination), you would correctly see the JSON object that was put into the response. So, for example, you could do something like this in the Postprocessor, and respond from the Postprocessor: var jsonObj = { "result": "This is the result.", "data": "This is some other data." } return ResponseFactory.getSentResponse(jsonObj); However, it's no longer working this way in 3.3.1. Now, when you look at the response message in the message view, you see: [object Object] And if you try to use the response in a response transformer, you get an error like this: Response Transformer error ERROR MESSAGE: Error evaluating response transformer com.mirth.connect.server.MirthJavascriptTransformerException: CHANNEL: HTTP Client with JSON CONNECTOR: Destination 1 SCRIPT SOURCE: response SOURCE CODE: 39: } 40: eval('importPackage(' + Packages.java.lang.Class.forName(className).getPackage().getName() + ')'); 41: } 42: } 43: function doScript() { 44: msg = JSON.parse(connectorMessage.getResponseTransformedData()); 45: function doTransform() { 46: 47: 48: var mapping; LINE NUMBER: 44 DETAILS: SyntaxError: Unexpected token: o at d89555a6-f1d2-4738-a164-48b213af267f:44 (doScript) at d89555a6-f1d2-4738-a164-48b213af267f:91 at com.mirth.connect.server.transformers.JavaScriptResponseTransformer$ResponseTransformerTask.call(JavaScriptResponseTransformer.java:160) at com.mirth.connect.server.transformers.JavaScriptResponseTransformer$ResponseTransformerTask.call(JavaScriptResponseTransformer.java:118) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) I've attached a couple of channels (an HTTP Sender that sends to an HTTP Listener with JSON as the data type) that demonstrate this. The channels work perfectly fine under 3.3.0, but cause an error under 3.3.1.

    Mirth Project | 11 months ago | Eric Butterfield
    com.mirth.connect.server.MirthJavascriptTransformerException: CHANNEL: HTTP Client with JSON CONNECTOR: Destination 1 SCRIPT SOURCE: response SOURCE CODE: 39: } 40: eval('importPackage(' + Packages.java.lang.Class.forName(className).getPackage().getName() + ')'); 41: } 42: } 43: function doScript() { 44: msg = JSON.parse(connectorMessage.getResponseTransformedData()); 45: function doTransform() { 46: 47: 48: var mapping; LINE NUMBER: 44 DETAILS: SyntaxError: Unexpected token: o at d89555a6-f1d2-4738-a164-48b213af267f:44 (doScript) at d89555a6-f1d2-4738-a164-48b213af267f:91
  6. 0

    ERROR-300: Transformer error ERROR MESSAGE: Error evaluating filter/transformer com.mirth.connect.server.MirthJavascriptTransformerException: CHANNEL: Channel 0 CONNECTOR: sourceConnector SCRIPT SOURCE: SOURCE CODE: 392: } 393: 394: function getXV(SegmentRoot, newSegmentPath) 395: { 396: var segment = smartCreateSegmentXML(SegmentRoot, newSegmentPath); 397: return segment.parent()[segment.name()]; 398: } 399: 400: function deleteXV(SegmentRoot, newSegmentPath) 401: { LINE NUMBER: 397 DETAILS: TypeError: name is not a function, it is xml. at 7f032f12-ffd8-44bc-b7ab-6923a4c260f5:397 (getXV) at 7f032f12-ffd8-44bc-b7ab-6923a4c260f5:687 at 7f032f12-ffd8-44bc-b7ab-6923a4c260f5:676 at 7f032f12-ffd8-44bc-b7ab-6923a4c260f5:2177 at 7f032f12-ffd8-44bc-b7ab-6923a4c260f5:2164 at 7f032f12-ffd8-44bc-b7ab-6923a4c260f5:2823 (doTransform) at 7f032f12-ffd8-44bc-b7ab-6923a4c260f5:2826 (doScript) at 7f032f12-ffd8-44bc-b7ab-6923a4c260f5:2828 at com.mirth.connect.server.transformers.JavaScriptFilterTransformer$FilterTransformerTask.call(JavaScriptFilterTransformer.java:127) at com.mirth.connect.server.transformers.JavaScriptFilterTransformer$FilterTransformerTask.call(JavaScriptFilterTransformer.java:1) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:680)

    Mirth Project | 4 years ago | Adrian Galvan
    com.mirth.connect.server.MirthJavascriptTransformerException: CHANNEL: Channel 0 CONNECTOR: sourceConnector SCRIPT SOURCE: SOURCE CODE: 392: } 393: 394: function getXV(SegmentRoot, newSegmentPath) 395: { 396: var segment = smartCreateSegmentXML(SegmentRoot, newSegmentPath); 397: return segment.parent()[segment.name()]; 398: } 399: 400: function deleteXV(SegmentRoot, newSegmentPath) 401: { LINE NUMBER: 397 DETAILS: TypeError: name is not a function, it is xml. at 7f032f12-ffd8-44bc-b7ab-6923a4c260f5:397 (getXV) at 7f032f12-ffd8-44bc-b7ab-6923a4c260f5:687 at 7f032f12-ffd8-44bc-b7ab-6923a4c260f5:676 at 7f032f12-ffd8-44bc-b7ab-6923a4c260f5:2177 at 7f032f12-ffd8-44bc-b7ab-6923a4c260f5:2164 at 7f032f12-ffd8-44bc-b7ab-6923a4c260f5:2823 (doTransform) at 7f032f12-ffd8-44bc-b7ab-6923a4c260f5:2826 (doScript) at 7f032f12-ffd8-44bc-b7ab-6923a4c260f5:2828

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. com.mirth.connect.server.MirthJavascriptTransformerException

      CHANNEL: WsToHttpTest CONNECTOR: sourceConnector SCRIPT SOURCE: TRANSFORMER LINE NUMBER: 31 DETAILS: TypeError: Cannot set property "1" of undefined to "" at f4645dbe-9637-415e-ae39-f3dce72d6eaa:31 (createSegment) at f4645dbe-9637-415e-ae39-f3dce72d6eaa:53 (doTransform) at f4645dbe-9637-415e-ae39-f3dce72d6eaa:80 (doScript) at f4645dbe-9637-415e-ae39-f3dce72d6eaa:82 at com.mirth.connect.server.transformers.JavaScriptFilterTransformer$FilterTransformerTask.doCall(JavaScriptFilterTransformer.java:154)

      at com.mirth.connect.server.transformers.JavaScriptFilterTransformer$FilterTransformerTask.doCall()
    2. com.mirth.connect
      JavaScriptTask.call
      1. com.mirth.connect.server.transformers.JavaScriptFilterTransformer$FilterTransformerTask.doCall(JavaScriptFilterTransformer.java:119)
      2. com.mirth.connect.server.util.javascript.JavaScriptTask.call(JavaScriptTask.java:113)
      2 frames
    3. Java RT
      Thread.run
      1. java.util.concurrent.FutureTask.run(FutureTask.java:266)
      2. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      3. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      4. java.lang.Thread.run(Thread.java:745)
      4 frames