Announcement

Collapse
No announcement yet.

Transform error: Function function toString

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

  • Transform error: Function function toString

    I'm getting the following error on my transformers:
    ERROR-300: Transformer error
    ERROR MESSAGE: Error evaluating transformer
    org.mozilla.javascript.EcmaError: ReferenceError: Function function toString() { [native code for XMLList.toString, arity=0] }
    can not be used as the left-hand side of assignment or as an operand of ++ or -- operator. (0af1594a-c73e-43e4-8784-41f10986c2aa#7)

    Since I haven't put ++ or -- in my transformer how do we prevent this error?

    I've attached the channel, here is the complete error message:

    ERROR-300: Transformer error
    ERROR MESSAGE: Error evaluating transformer
    org.mozilla.javascript.EcmaError: ReferenceError: Function function toString() { [native code for XMLList.toString, arity=0] }
    can not be used as the left-hand side of assignment or as an operand of ++ or -- operator. (0af1594a-c73e-43e4-8784-41f10986c2aa#7)
    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.callRef(Scrip tRuntime.java:2052)
    at org.mozilla.javascript.gen.c152._c3(0af1594a-c73e-43e4-8784-41f10986c2aa:7)
    at org.mozilla.javascript.gen.c152.call(0af1594a-c73e-43e4-8784-41f10986c2aa)
    at org.mozilla.javascript.optimizer.OptRuntime.callNa me0(OptRuntime.java:106)
    at org.mozilla.javascript.gen.c152._c0(0af1594a-c73e-43e4-8784-41f10986c2aa:10)
    at org.mozilla.javascript.gen.c152.call(0af1594a-c73e-43e4-8784-41f10986c2aa)
    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.c152.call(0af1594a-c73e-43e4-8784-41f10986c2aa)
    at org.mozilla.javascript.gen.c152.exec(0af1594a-c73e-43e4-8784-41f10986c2aa)
    at com.webreach.mirth.server.mule.transformers.JavaSc riptTransformer.evaluateTransformerScript(JavaScri ptTransformer.java:359)
    at com.webreach.mirth.server.mule.transformers.JavaSc riptTransformer.transform(JavaScriptTransformer.ja va:278)
    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.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:492)
    at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:271)
    at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:230)
    at com.webreach.mirth.server.mule.providers.file.File MessageReceiver.processFile(FileMessageReceiver.ja va:183)
    at com.webreach.mirth.server.mule.providers.file.File MessageReceiver.poll(FileMessageReceiver.java:111)
    at org.mule.providers.PollingMessageReceiver.run(Poll ingMessageReceiver.java:73)
    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(Thread.java:595)

    ADT_A01_to_usr.xml (15752 bytes)

  • #2
    Re:Transform error: Function function toString

    You've changed the fields in your map functions.

    Comment


    • #3
      Re:Transform error: Function function toString

      In what way have I changed the fields?

      Comment


      • #4
        Re:Transform error: Function function toString

        Looks like, in transformer steps 3, 4, and 5 "Message Segment" and "Mapping" field values need to be swaped.

        Comment


        • #5
          Re:Transform error: Function function toString

          Thanks, that was the problem.

          Comment


          • #6
            Re:Transform error: Function function toString

            Sorry, I was too cryptic.

            Comment

            Working...
            X