Hi Manuranga, I'm using *WSReqwest* in one of my backend jaggeryfiles in* UnifiedUI*. I'm getting the following run time error.Is it a Jaggery Limitation ? is there any solution or a work though to overcome this.
Error : A module cannot be found with the specified name : ws Log : [2015-09-09 17:08:34,130] ERROR > {org.jaggeryjs.jaggery.core.manager.CommonManager} - A module cannot be > found with the specified name : ws > [2015-09-09 17:08:34,132] ERROR > {org.jaggeryjs.jaggery.core.manager.WebAppManager} - > org.mozilla.javascript.WrappedException: Wrapped > org.jaggeryjs.scriptengine.exceptions.ScriptException: A module cannot be > found with the specified name : ws > (/mdm/lib/handlebars-v2.0.0.js#2236(Function)#2) > org.jaggeryjs.scriptengine.exceptions.ScriptException: > org.mozilla.javascript.WrappedException: Wrapped > org.jaggeryjs.scriptengine.exceptions.ScriptException: A module cannot be > found with the specified name : ws > (/mdm/lib/handlebars-v2.0.0.js#2236(Function)#2) > at > org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:571) > at org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:273) > at > org.jaggeryjs.jaggery.core.manager.WebAppManager.exec(WebAppManager.java:587) > at > org.jaggeryjs.jaggery.core.manager.WebAppManager.execute(WebAppManager.java:507) > at org.jaggeryjs.jaggery.core.JaggeryServlet.doGet(JaggeryServlet.java:24) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:620) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) > at > org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748) > at > org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:486) > at > org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:378) > at > org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:338) > at org.jaggeryjs.jaggery.core.JaggeryFilter.doFilter(JaggeryFilter.java:21) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) > at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) > at > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) > at > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) > at > org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504) > at > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) > at > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) > at > org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:99) > at > org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47) > at > org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:57) > at > org.wso2.carbon.webapp.authenticator.framework.WebappAuthenticationHandler.invoke(WebappAuthenticationHandler.java:39) > at > org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47) > at > org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62) > at > org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:159) > at > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) > at > org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57) > at > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) > at > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421) > at > org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074) > at > org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611) > at > org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1739) > at > org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1698) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > at > org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) > at java.lang.Thread.run(Thread.java:745) > Caused by: org.mozilla.javascript.WrappedException: Wrapped > org.jaggeryjs.scriptengine.exceptions.ScriptException: A module cannot be > found with the specified name : ws > (/mdm/lib/handlebars-v2.0.0.js#2236(Function)#2) > at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1754) > at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:148) > at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:386) > at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63) > at > org.jaggeryjs.rhino.mdm.modules.c1._c_anonymous_19(/mdm/modules/user.js:545) > at org.jaggeryjs.rhino.mdm.modules.c1.call(/mdm/modules/user.js) > at > org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:85) > at > org.jaggeryjs.rhino.mdm.units.user_create.c1._c_onRequest_1(/mdm/units/user-create/user-create.js:10) > at > org.jaggeryjs.rhino.mdm.units.user_create.c1.call(/mdm/units/user-create/user-create.js) > at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63) > at > org.jaggeryjs.rhino.mdm.lib.c1._c_anonymous_1(/mdm/lib/handlebars-helpers.js:26) > at org.jaggeryjs.rhino.mdm.lib.c1.call(/mdm/lib/handlebars-helpers.js) > at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63) > at > org.jaggeryjs.rhino.mdm.lib.c1._c_anonymous_7(/mdm/lib/handlebars-helpers.js:161) > at org.jaggeryjs.rhino.mdm.lib.c1.call(/mdm/lib/handlebars-helpers.js) > at > org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430) > at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269) > at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97) > at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1473) > at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:815) > at > org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109) > at > org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430) > at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269) > at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97) > at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52) > at > org.jaggeryjs.rhino.mdm.lib.c2._c_anonymous_48(/mdm/lib/handlebars-v2.0.0.js:589) > at org.jaggeryjs.rhino.mdm.lib.c2.call(/mdm/lib/handlebars-v2.0.0.js) > at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32) > at > org.jaggeryjs.rhino.mdm.lib.c1._c_anonymous_4(/mdm/lib/handlebars-helpers.js:109) > at org.jaggeryjs.rhino.mdm.lib.c1.call(/mdm/lib/handlebars-helpers.js) > at > org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430) > at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269) > at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97) > at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1473) > at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:815) > at > org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109) > at > org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430) > at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269) > at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97) > at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52) > at > org.jaggeryjs.rhino.mdm.lib.c2._c_anonymous_44(/mdm/lib/handlebars-v2.0.0.js:558) > at org.jaggeryjs.rhino.mdm.lib.c2.call(/mdm/lib/handlebars-v2.0.0.js) > at > org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430) > at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269) > at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97) > at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52) > at > org.jaggeryjs.rhino.mdm.lib.c2._c_anonymous_142(/mdm/lib/handlebars-v2.0.0.js:2029) > at org.jaggeryjs.rhino.mdm.lib.c2.call(/mdm/lib/handlebars-v2.0.0.js) > at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32) > at > org.jaggeryjs.rhino.mdm.lib.c1._c_anonymous_3(/mdm/lib/handlebars-helpers.js:76) > at org.jaggeryjs.rhino.mdm.lib.c1.call(/mdm/lib/handlebars-helpers.js) > at > org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430) > at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269) > at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97) > at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1473) > at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:815) > at > org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109) > at > org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430) > at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269) > at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97) > at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52) > at > org.jaggeryjs.rhino.mdm.lib.c2._c_anonymous_44(/mdm/lib/handlebars-v2.0.0.js:558) > at org.jaggeryjs.rhino.mdm.lib.c2.call(/mdm/lib/handlebars-v2.0.0.js) > at > org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430) > at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269) > at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97) > at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52) > at > org.jaggeryjs.rhino.mdm.lib.c2._c_anonymous_142(/mdm/lib/handlebars-v2.0.0.js:2029) > at org.jaggeryjs.rhino.mdm.lib.c2.call(/mdm/lib/handlebars-v2.0.0.js) > at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32) > at > org.jaggeryjs.rhino.mdm.lib.c3._c_anonymous_8(/mdm/lib/fuse-router.js:154) > at org.jaggeryjs.rhino.mdm.lib.c3.call(/mdm/lib/fuse-router.js) > at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63) > at > org.jaggeryjs.rhino.mdm.lib.c3._c_anonymous_2(/mdm/lib/fuse-router.js:29) > at org.jaggeryjs.rhino.mdm.lib.c3.call(/mdm/lib/fuse-router.js) > at > org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:85) > at org.jaggeryjs.rhino.mdm.lib.c0._c_script_0(/mdm/lib/fuse.jag:27) > at org.jaggeryjs.rhino.mdm.lib.c0.call(/mdm/lib/fuse.jag) > at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394) > at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091) > at org.jaggeryjs.rhino.mdm.lib.c0.call(/mdm/lib/fuse.jag) > at org.jaggeryjs.rhino.mdm.lib.c0.exec(/mdm/lib/fuse.jag) > at > org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:567) > ... 42 more > Caused by: org.jaggeryjs.scriptengine.exceptions.ScriptException: A module > cannot be found with the specified name : ws > at > org.jaggeryjs.jaggery.core.manager.CommonManager.require(CommonManager.java:251) > at > org.jaggeryjs.jaggery.core.manager.WebAppManager.require(WebAppManager.java:346) > at sun.reflect.GeneratedMethodAccessor75.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:606) > at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126) > ... 123 more Thanks and Regards. Kamidu Sachith Punchihewa *Software Engineer* WSO2, Inc. lean . enterprise . middleware Mobile : +94 (0) 770566749 <%2B94%20%280%29%20773%20451194> Disclaimer: This communication may contain privileged or other confidential information and is intended exclusively for the addressee/s. If you are not the intended recipient/s, or believe that you may have received this communication in error, please reply to the sender indicating that fact and delete the copy you received and in addition, you should not print, copy, retransmit, disseminate, or otherwise use the information contained in this communication. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. The sender does not accept liability for any errors or omissions.
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev