我们正在尝试为 GREG(API Store 和 API Publisher)使用 API Manager 插件。我们注意到,如果我们的用户帐户带有@something.com,那么 API Publisher 会假定您正在使用租户并针对 jaggery 应用程序中不存在的文件触发代码,这是 greg- 中的租户感知功能登陆.jag。
Caused by: org.mozilla.javascript.WrappedException: Wrapped org.jaggeryjs.scriptengine.exceptions.ScriptException: Requested resource /modules/tenant-api.js cannot be found (/publisher/extensions/app/greg_publisher/pages/greg-landing.jag#9)
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.publisher.extensions.app.greg_publisher.pages.c0._c_anonymous_1(/publisher/extensions/app/greg_publisher/pages/greg-landing.jag:9)
at org.jaggeryjs.rhino.publisher.extensions.app.greg_publisher.pages.c0.call(/publisher/extensions/app/greg_publisher/pages/greg-landing.jag)
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.call2(OptRuntime.java:42)
at org.jaggeryjs.rhino.publisher.modules.c1._c_anonymous_19(/publisher/modules/publisher.js:409)
at org.jaggeryjs.rhino.publisher.modules.c1.call(/publisher/modules/publisher.js)
at org.mozilla.javascript.optimizer.OptRuntime.call0(OptRuntime.java:23)
at org.jaggeryjs.rhino.<store>.scripts.c0._c_anonymous_18(<store>/scripts/server.js:318)
at org.jaggeryjs.rhino.<store>.scripts.c0.call(<store>/scripts/server.js)
at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)
at org.jaggeryjs.rhino.publisher.modules.c1._c_anonymous_18(/publisher/modules/publisher.js:404)
at org.jaggeryjs.rhino.publisher.modules.c1.call(/publisher/modules/publisher.js)
at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
at org.jaggeryjs.rhino.publisher.extensions.app.greg_publisher.pages.c0._c_script_0(/publisher/extensions/app/greg_publisher/pages/greg-landing.jag:3)
at org.jaggeryjs.rhino.publisher.extensions.app.greg_publisher.pages.c0.call(/publisher/extensions/app/greg_publisher/pages/greg-landing.jag)
at org.jaggeryjs.rhino.publisher.extensions.app.greg_publisher.pages.c0.exec(/publisher/extensions/app/greg_publisher/pages/greg-landing.jag)
at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:567)
... 57 more Caused by: org.jaggeryjs.scriptengine.exceptions.ScriptException: Requested resource /modules/tenant-api.js cannot be found
at org.jaggeryjs.jaggery.core.manager.WebAppManager.getScriptLastModified(WebAppManager.java:766)
at org.jaggeryjs.jaggery.core.manager.WebAppManager.executeScript(WebAppManager.java:300)
at org.jaggeryjs.jaggery.core.manager.WebAppManager.require(WebAppManager.java:358)
at sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
... 78 more
我们检查了 Enterprise Store,它也缺少错误中引用的文件。
最后,在完整的 API 安装中,解决此问题的方法是更新 user-mgt.xml
<Property name="UsernameWithEmailJavaScriptRegEx">[a-zA-Z0-9@._-|//]{3,30}$</Property>
我们是否缺少任何配置来避免这种情况?
谢谢,凯文