org.obiba.magma.js.MagmaJsRuntimeException: The returned value is expected to be a value sequence.

JIRA | Yannick Marcon | 2 years ago
  1. 0

    Example: * a participant has multiple drugs: MEDICATIONS variable in Participants table * a drug is described in the Drugs table The view ParticipantsAndDrugs tries to join the Drugs variables from the Drug ID found in the MEDICATIONS variable using [$join|http://wiki.obiba.org/display/OPALDOC/joined+value+selector+method] method. => fails because the fact that MEDICATIONS is repeatable is not handled correctly {code} 2014-07-14 10:03:11,474 [qtp1610846519-191] ERROR org.obiba.opal.web.magma.provider.UnhandledExceptionMapper - Unhandled exception org.obiba.magma.js.MagmaJsRuntimeException: The returned value is expected to be a value sequence. at org.obiba.magma.js.JavascriptValueSource$AbstractEvaluationContextAction.asValue(JavascriptValueSource.java:194) ~[magma-js-1.10.1.jar:1.10.1] at org.obiba.magma.js.JavascriptValueSource$ValueSetEvaluationContextAction.eval(JavascriptValueSource.java:258) ~[magma-js-1.10.1.jar:1.10.1] at org.obiba.magma.js.JavascriptValueSource$AbstractEvaluationContextAction.run(JavascriptValueSource.java:171) ~[magma-js-1.10.1.jar:1.10.1] at org.mozilla.javascript.Context.call(Context.java:489) ~[rhino-1.7R4.jar:1.7R4] at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:504) ~[rhino-1.7R4.jar:1.7R4] at org.obiba.magma.js.JavascriptValueSource.getValue(JavascriptValueSource.java:91) ~[magma-js-1.10.1.jar:1.10.1] at org.obiba.magma.js.JavascriptVariableValueSource.getValue(JavascriptVariableValueSource.java:84) ~[magma-js-1.10.1.jar:1.10.1] at org.obiba.magma.views.View$ViewVariableValueSource.getValue(View.java:534) ~[magma-api-1.10.1.jar:1.10.1] {code}

    JIRA | 2 years ago | Yannick Marcon
    org.obiba.magma.js.MagmaJsRuntimeException: The returned value is expected to be a value sequence.
  2. 0

    Example: * a participant has multiple drugs: MEDICATIONS variable in Participants table * a drug is described in the Drugs table The view ParticipantsAndDrugs tries to join the Drugs variables from the Drug ID found in the MEDICATIONS variable using [$join|http://wiki.obiba.org/display/OPALDOC/joined+value+selector+method] method. => fails because the fact that MEDICATIONS is repeatable is not handled correctly {code} 2014-07-14 10:03:11,474 [qtp1610846519-191] ERROR org.obiba.opal.web.magma.provider.UnhandledExceptionMapper - Unhandled exception org.obiba.magma.js.MagmaJsRuntimeException: The returned value is expected to be a value sequence. at org.obiba.magma.js.JavascriptValueSource$AbstractEvaluationContextAction.asValue(JavascriptValueSource.java:194) ~[magma-js-1.10.1.jar:1.10.1] at org.obiba.magma.js.JavascriptValueSource$ValueSetEvaluationContextAction.eval(JavascriptValueSource.java:258) ~[magma-js-1.10.1.jar:1.10.1] at org.obiba.magma.js.JavascriptValueSource$AbstractEvaluationContextAction.run(JavascriptValueSource.java:171) ~[magma-js-1.10.1.jar:1.10.1] at org.mozilla.javascript.Context.call(Context.java:489) ~[rhino-1.7R4.jar:1.7R4] at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:504) ~[rhino-1.7R4.jar:1.7R4] at org.obiba.magma.js.JavascriptValueSource.getValue(JavascriptValueSource.java:91) ~[magma-js-1.10.1.jar:1.10.1] at org.obiba.magma.js.JavascriptVariableValueSource.getValue(JavascriptVariableValueSource.java:84) ~[magma-js-1.10.1.jar:1.10.1] at org.obiba.magma.views.View$ViewVariableValueSource.getValue(View.java:534) ~[magma-api-1.10.1.jar:1.10.1] {code}

    JIRA | 2 years ago | Yannick Marcon
    org.obiba.magma.js.MagmaJsRuntimeException: The returned value is expected to be a value sequence.

    Root Cause Analysis

    1. org.obiba.magma.js.MagmaJsRuntimeException

      The returned value is expected to be a value sequence.

      at org.obiba.magma.js.JavascriptValueSource$AbstractEvaluationContextAction.asValue()
    2. org.obiba.magma
      JavascriptValueSource$AbstractEvaluationContextAction.run
      1. org.obiba.magma.js.JavascriptValueSource$AbstractEvaluationContextAction.asValue(JavascriptValueSource.java:194)[magma-js-1.10.1.jar:1.10.1]
      2. org.obiba.magma.js.JavascriptValueSource$ValueSetEvaluationContextAction.eval(JavascriptValueSource.java:258)[magma-js-1.10.1.jar:1.10.1]
      3. org.obiba.magma.js.JavascriptValueSource$AbstractEvaluationContextAction.run(JavascriptValueSource.java:171)[magma-js-1.10.1.jar:1.10.1]
      3 frames
    3. Rhino
      ContextFactory.call
      1. org.mozilla.javascript.Context.call(Context.java:489)[rhino-1.7R4.jar:1.7R4]
      2. org.mozilla.javascript.ContextFactory.call(ContextFactory.java:504)[rhino-1.7R4.jar:1.7R4]
      2 frames
    4. org.obiba.magma
      View$ViewVariableValueSource.getValue
      1. org.obiba.magma.js.JavascriptValueSource.getValue(JavascriptValueSource.java:91)[magma-js-1.10.1.jar:1.10.1]
      2. org.obiba.magma.js.JavascriptVariableValueSource.getValue(JavascriptVariableValueSource.java:84)[magma-js-1.10.1.jar:1.10.1]
      3. org.obiba.magma.views.View$ViewVariableValueSource.getValue(View.java:534)[magma-api-1.10.1.jar:1.10.1]
      3 frames