org.mozilla.javascript.EcmaError

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Using Java objects in Javascript
    via by Jonathan Scott,
  • I have used the following expression to test derived variables: $('Admin.Participant.birthYear').lt($('Admin.Participant.appointmentDate').year().minus($('Admin.Participant.birthYear'))) .or($('Admin.Participant.birthYear').lt($('Admin.Participant.appointmentDate').year().minus($('Admin.Participant.birthYear')))) The result is : (false) or (false) = false When I replace the "or" operator by "equals" in the expression I would expect the following result: (false) equals (false) = true However, I get the following the following error : org.mozilla.javascript.EcmaError: TypeError: Cannot find function equals in object false. (numericMethodTest#14) at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3654) at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3632) at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3660) at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3679) at org.mozilla.javascript.ScriptRuntime.notFunctionError(ScriptRuntime.java:3743) at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThisHelper(ScriptRuntime.java:2247) at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.java:2214) at org.mozilla.javascript.gen.c8._c0(numericMethodTest:14) at org.mozilla.javascript.gen.c8.call(numericMethodTest) at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:398) at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065) at org.mozilla.javascript.gen.c8.call(numericMethodTest) at org.mozilla.javascript.gen.c8.exec(numericMethodTest) at org.obiba.magma.js.JavascriptValueSource$1.run(JavascriptValueSource.java:68) at org.mozilla.javascript.Context.call(Context.java:515) at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:507) at org.obiba.magma.js.JavascriptValueSource.getValue(JavascriptValueSource.java:60) at org.obiba.magma.views.View.getListValue(View.java:219) at org.obiba.magma.views.View.getValue(View.java:198) at org.obiba.magma.support.AbstractValueTableWrapper.getValue(AbstractValueTableWrapper.java:30) at org.obiba.magma.views.View.getValue(View.java:205) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:186) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:164) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:144) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:130) at org.obiba.opal.core.service.impl.DefaultExportServiceImpl.exportTablesToDatasource(DefaultExportServiceImpl.java:71) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy41.exportTablesToDatasource(Unknown Source) at org.obiba.opal.shell.commands.CopyCommand.execute(CopyCommand.java:58) at org.obiba.opal.shell.AbstractOpalShell.executeCommand(AbstractOpalShell.java:97) at org.obiba.opal.shell.AbstractOpalShell.run(AbstractOpalShell.java:51) at java.lang.Thread.run(Thread.java:619)
    via by Martin Boulanger,
  • I have used the following expression to test derived variables: $('Admin.Participant.birthYear').lt($('Admin.Participant.appointmentDate').year().minus($('Admin.Participant.birthYear'))) .or($('Admin.Participant.birthYear').lt($('Admin.Participant.appointmentDate').year().minus($('Admin.Participant.birthYear')))) The result is : (false) or (false) = false When I replace the "or" operator by "equals" in the expression I would expect the following result: (false) equals (false) = true However, I get the following the following error : org.mozilla.javascript.EcmaError: TypeError: Cannot find function equals in object false. (numericMethodTest#14) at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3654) at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3632) at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3660) at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3679) at org.mozilla.javascript.ScriptRuntime.notFunctionError(ScriptRuntime.java:3743) at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThisHelper(ScriptRuntime.java:2247) at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.java:2214) at org.mozilla.javascript.gen.c8._c0(numericMethodTest:14) at org.mozilla.javascript.gen.c8.call(numericMethodTest) at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:398) at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065) at org.mozilla.javascript.gen.c8.call(numericMethodTest) at org.mozilla.javascript.gen.c8.exec(numericMethodTest) at org.obiba.magma.js.JavascriptValueSource$1.run(JavascriptValueSource.java:68) at org.mozilla.javascript.Context.call(Context.java:515) at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:507) at org.obiba.magma.js.JavascriptValueSource.getValue(JavascriptValueSource.java:60) at org.obiba.magma.views.View.getListValue(View.java:219) at org.obiba.magma.views.View.getValue(View.java:198) at org.obiba.magma.support.AbstractValueTableWrapper.getValue(AbstractValueTableWrapper.java:30) at org.obiba.magma.views.View.getValue(View.java:205) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:186) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:164) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:144) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:130) at org.obiba.opal.core.service.impl.DefaultExportServiceImpl.exportTablesToDatasource(DefaultExportServiceImpl.java:71) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy41.exportTablesToDatasource(Unknown Source) at org.obiba.opal.shell.commands.CopyCommand.execute(CopyCommand.java:58) at org.obiba.opal.shell.AbstractOpalShell.executeCommand(AbstractOpalShell.java:97) at org.obiba.opal.shell.AbstractOpalShell.run(AbstractOpalShell.java:51) at java.lang.Thread.run(Thread.java:619)
    via by Martin Boulanger,
  • undefined.split() in ringo/jsgi
    via GitHub by hns
    ,
    • org.mozilla.javascript.EcmaError: TypeError: Cannot find function keys in object function Object() { [native code for Object.Object, arity=1] } . (<cmd>#11) at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3654) at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3632) at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3660) at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3679) at org.mozilla.javascript.ScriptRuntime.notFunctionError(ScriptRuntime.java:3743) at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThisHelper(ScriptRuntime.java:2247) at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.java:2214)

    Users with the same issue

    Unknown visitor2 times, last one,
    Juraji
    5 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,