wso2 / docker-apim

Docker and Docker Compose resources for WSO2 API Manager
Apache License 2.0
142 stars 216 forks source link

NullPointerException on accessing Web UIs #413

Closed cybaspace closed 3 years ago

cybaspace commented 3 years ago

Description:

I installed WSO2 with docker-compose as described in documentation (docker-compose up --build).
System starts, but if I try to access publisher, devportal or admin URL the following NPE is thrown in logs. Only carbon is working. Do I have to perform additional steps not documented?

api-manager_1  | [2021-06-04 13:15:16,919] ERROR - WebAppManager org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException (/publisher/services/utils.js#36)
api-manager_1  | org.jaggeryjs.scriptengine.exceptions.ScriptException: org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException (/publisher/services/utils.js#36)
api-manager_1  |    at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:587) ~[org.jaggeryjs.scriptengine_0.14.13.jar:?]
api-manager_1  |    at org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:289) ~[org.jaggeryjs.scriptengine_0.14.13.jar:?]
api-manager_1  |    at org.jaggeryjs.jaggery.core.manager.WebAppManager.exec(WebAppManager.java:589) [org.jaggeryjs.jaggery.core_0.14.13.jar:?]
api-manager_1  |    at org.jaggeryjs.jaggery.core.manager.WebAppManager.execute(WebAppManager.java:508) [org.jaggeryjs.jaggery.core_0.14.13.jar:?]
api-manager_1  |    at org.jaggeryjs.jaggery.core.JaggeryServlet.doGet(JaggeryServlet.java:24) [org.jaggeryjs.jaggery.core_0.14.13.jar:?]
api-manager_1  |    at javax.servlet.http.HttpServlet.service(HttpServlet.java:634) [tomcat-servlet-api_9.0.34.wso2v1.jar:?]
api-manager_1  |    at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) [tomcat-servlet-api_9.0.34.wso2v1.jar:?]
api-manager_1  |    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) [tomcat_9.0.34.wso2v1.jar:?]
api-manager_1  |    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat_9.0.34.wso2v1.jar:?]
api-manager_1  |    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:712) [tomcat_9.0.34.wso2v1.jar:?]
api-manager_1  |    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:459) [tomcat_9.0.34.wso2v1.jar:?]
api-manager_1  |    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:352) [tomcat_9.0.34.wso2v1.jar:?]
api-manager_1  |    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312) [tomcat_9.0.34.wso2v1.jar:?]
api-manager_1  |    at org.jaggeryjs.jaggery.core.JaggeryFilter.doFilter(JaggeryFilter.java:76) [org.jaggeryjs.jaggery.core_0.14.13.jar:?]
api-manager_1  |    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat_9.0.34.wso2v1.jar:?]
api-manager_1  |    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat_9.0.34.wso2v1.jar:?]
api-manager_1  |    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) [tomcat_9.0.34.wso2v1.jar:?]
api-manager_1  |    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat_9.0.34.wso2v1.jar:?]
api-manager_1  |    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat_9.0.34.wso2v1.jar:?]
api-manager_1  |    at org.wso2.carbon.ui.filters.cache.ContentTypeBasedCachePreventionFilter.doFilter(ContentTypeBasedCachePreventionFilter.java:53) [org.wso2.carbon.ui_4.6.2.jar:?]
api-manager_1  |    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat_9.0.34.wso2v1.jar:?]
api-manager_1  |    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat_9.0.34.wso2v1.jar:?]
api-manager_1  |    at org.apache.catalina.filters.HttpHeaderSecurityFilter.doFilter(HttpHeaderSecurityFilter.java:126) [tomcat_9.0.34.wso2v1.jar:?]
api-manager_1  |    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat_9.0.34.wso2v1.jar:?]
api-manager_1  |    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat_9.0.34.wso2v1.jar:?]
api-manager_1  |    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) [tomcat_9.0.34.wso2v1.jar:?]
api-manager_1  |    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat_9.0.34.wso2v1.jar:?]
api-manager_1  |    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) [tomcat_9.0.34.wso2v1.jar:?]
api-manager_1  |    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) [tomcat_9.0.34.wso2v1.jar:?]
api-manager_1  |    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [tomcat_9.0.34.wso2v1.jar:?]
api-manager_1  |    at org.wso2.carbon.identity.context.rewrite.valve.TenantContextRewriteValve.invoke(TenantContextRewriteValve.java:107) [org.wso2.carbon.identity.context.rewrite.valve_1.4.25.jar:?]
api-manager_1  |    at org.wso2.carbon.identity.authz.valve.AuthorizationValve.invoke(AuthorizationValve.java:110) [org.wso2.carbon.identity.authz.valve_1.4.25.jar:?]
api-manager_1  |    at org.wso2.carbon.identity.auth.valve.AuthenticationValve.invoke(AuthenticationValve.java:102) [org.wso2.carbon.identity.auth.valve_1.4.25.jar:?]
api-manager_1  |    at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:101) [org.wso2.carbon.tomcat.ext_4.6.2.jar:?]
api-manager_1  |    at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:49) [org.wso2.carbon.tomcat.ext_4.6.2.jar:?]
api-manager_1  |    at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62) [org.wso2.carbon.tomcat.ext_4.6.2.jar:?]
api-manager_1  |    at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:145) [org.wso2.carbon.tomcat.ext_4.6.2.jar:?]
api-manager_1  |    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690) [tomcat_9.0.34.wso2v1.jar:?]
api-manager_1  |    at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57) [org.wso2.carbon.tomcat.ext_4.6.2.jar:?]
api-manager_1  |    at org.wso2.carbon.tomcat.ext.valves.RequestCorrelationIdValve.invoke(RequestCorrelationIdValve.java:126) [org.wso2.carbon.tomcat.ext_4.6.2.jar:?]
api-manager_1  |    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) [tomcat_9.0.34.wso2v1.jar:?]
api-manager_1  |    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [tomcat_9.0.34.wso2v1.jar:?]
api-manager_1  |    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373) [tomcat_9.0.34.wso2v1.jar:?]
api-manager_1  |    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat_9.0.34.wso2v1.jar:?]
api-manager_1  |    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) [tomcat_9.0.34.wso2v1.jar:?]
api-manager_1  |    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1590) [tomcat_9.0.34.wso2v1.jar:?]
api-manager_1  |    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat_9.0.34.wso2v1.jar:?]
api-manager_1  |    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
api-manager_1  |    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
api-manager_1  |    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat_9.0.34.wso2v1.jar:?]
api-manager_1  |    at java.lang.Thread.run(Thread.java:834) [?:?]
api-manager_1  | Caused by: org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException (/publisher/services/utils.js#36)
api-manager_1  |    at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1754) ~[js_1.7.0.R4wso2v1.jar:?]
api-manager_1  |    at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:148) ~[js_1.7.0.R4wso2v1.jar:?]
api-manager_1  |    at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225) ~[js_1.7.0.R4wso2v1.jar:?]
api-manager_1  |    at org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:85) ~[js_1.7.0.R4wso2v1.jar:?]
api-manager_1  |    at org.jaggeryjs.rhino.publisher.services.c0._c_getIDPOrigin_2(/publisher/services/utils.js:36) ~[?:?]
api-manager_1  |    at org.jaggeryjs.rhino.publisher.services.c0.call(/publisher/services/utils.js) ~[?:?]
api-manager_1  |    at org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:85) ~[js_1.7.0.R4wso2v1.jar:?]
api-manager_1  |    at org.jaggeryjs.rhino.publisher.services.settings.c0._c_script_0(/publisher/services/settings/settings.jag:31) ~[?:?]
api-manager_1  |    at org.jaggeryjs.rhino.publisher.services.settings.c0.call(/publisher/services/settings/settings.jag) ~[?:?]
api-manager_1  |    at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394) ~[js_1.7.0.R4wso2v1.jar:?]
api-manager_1  |    at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091) ~[js_1.7.0.R4wso2v1.jar:?]
api-manager_1  |    at org.jaggeryjs.rhino.publisher.services.settings.c0.call(/publisher/services/settings/settings.jag) ~[?:?]
api-manager_1  |    at org.jaggeryjs.rhino.publisher.services.settings.c0.exec(/publisher/services/settings/settings.jag) ~[?:?]
api-manager_1  |    at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:583) ~[org.jaggeryjs.scriptengine_0.14.13.jar:?]
api-manager_1  |    ... 50 more
api-manager_1  | Caused by: java.lang.NullPointerException
api-manager_1  |    at org.wso2.carbon.apimgt.impl.utils.APIUtil.getExternalIDPOrigin_aroundBody106(APIUtil.java:2228) ~[org.wso2.carbon.apimgt.impl_9.0.174.4.jar:?]
api-manager_1  |    at org.wso2.carbon.apimgt.impl.utils.APIUtil.getExternalIDPOrigin(APIUtil.java:2225) ~[org.wso2.carbon.apimgt.impl_9.0.174.4.jar:?]
api-manager_1  |    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
api-manager_1  |    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
api-manager_1  |    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
api-manager_1  |    at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
api-manager_1  |    at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126) ~[js_1.7.0.R4wso2v1.jar:?]
api-manager_1  |    at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225) ~[js_1.7.0.R4wso2v1.jar:?]
api-manager_1  |    at org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:85) ~[js_1.7.0.R4wso2v1.jar:?]
api-manager_1  |    at org.jaggeryjs.rhino.publisher.services.c0._c_getIDPOrigin_2(/publisher/services/utils.js:36) ~[?:?]
api-manager_1  |    at org.jaggeryjs.rhino.publisher.services.c0.call(/publisher/services/utils.js) ~[?:?]
api-manager_1  |    at org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:85) ~[js_1.7.0.R4wso2v1.jar:?]
api-manager_1  |    at org.jaggeryjs.rhino.publisher.services.settings.c0._c_script_0(/publisher/services/settings/settings.jag:31) ~[?:?]
api-manager_1  |    at org.jaggeryjs.rhino.publisher.services.settings.c0.call(/publisher/services/settings/settings.jag) ~[?:?]
api-manager_1  |    at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394) ~[js_1.7.0.R4wso2v1.jar:?]
api-manager_1  |    at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091) ~[js_1.7.0.R4wso2v1.jar:?]
api-manager_1  |    at org.jaggeryjs.rhino.publisher.services.settings.c0.call(/publisher/services/settings/settings.jag) ~[?:?]
api-manager_1  |    at org.jaggeryjs.rhino.publisher.services.settings.c0.exec(/publisher/services/settings/settings.jag) ~[?:?]
api-manager_1  |    at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:583) ~[org.jaggeryjs.scriptengine_0.14.13.jar:?]
api-manager_1  |    ... 50 more

Suggested Labels: docker-compose , APIM

Suggested Assignees:

Affected Product Version: WSO2AM 4.0.0

OS, DB, other environment details and versions: macOS 10.15.7, Docker Desktop 3.3.3, Docker Engine 20.10.6, Docker Compose 1.29.1

Steps to reproduce: run docker-compose up --build after docker login and try to access: https://localhost:9443/publisher

Related Issues:

dyegodiniz commented 3 years ago

I'm having the exact same problem, were you able to solve your problem?

cybaspace commented 3 years ago

I'm having the exact same problem, were you able to solve your problem?

Today I used the latest docker image - now it works!

anil1712 commented 3 years ago

@cybaspace Which version you have used?

because I tried the same with 3.2.0 and 4.0.0 getting the exact same exception.

cybaspace commented 3 years ago

because I tried the same with 3.2.0 and 4.0.0 getting the exact same exception.

I had this problem with 4.0.0, but after actualizing to the newest version the problem was solved. I'm not sure which version it was, but higher than 4.0.0. I've already deleted the project and didn't worked anymore with wso2.

ahmadubuntu commented 2 years ago

I have the same issue when I run apim-is-as-km-with-analytics docker-compose in a VM.

[2022-09-09 15:33:05,673] ERROR - WebAppManager org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException (/devportal/services/utils.js#32)
org.jaggeryjs.scriptengine.exceptions.ScriptException: org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException (/devportal/services/utils.js#32)
    at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:587) ~[org.jaggeryjs.scriptengine_0.14.13.jar:?]
    at org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:289) ~[org.jaggeryjs.scriptengine_0.14.13.jar:?]
    at org.jaggeryjs.jaggery.core.manager.WebAppManager.exec(WebAppManager.java:589) ~[org.jaggeryjs.jaggery.core_0.14.13.jar:?]
    at org.jaggeryjs.jaggery.core.manager.WebAppManager.execute(WebAppManager.java:508) ~[org.jaggeryjs.jaggery.core_0.14.13.jar:?]
    at org.jaggeryjs.jaggery.core.JaggeryServlet.doGet(JaggeryServlet.java:24) ~[org.jaggeryjs.jaggery.core_0.14.13.jar:?]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:655) ~[tomcat-servlet-api_9.0.58.wso2v1.jar:?]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:764) ~[tomcat-servlet-api_9.0.58.wso2v1.jar:?]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227) ~[tomcat_9.0.58.wso2v1.jar:?]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat_9.0.58.wso2v1.jar:?]
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:711) ~[tomcat_9.0.58.wso2v1.jar:?]
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:459) ~[tomcat_9.0.58.wso2v1.jar:?]
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:353) ~[tomcat_9.0.58.wso2v1.jar:?]
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:313) ~[tomcat_9.0.58.wso2v1.jar:?]
    at org.jaggeryjs.jaggery.core.JaggeryFilter.doFilter(JaggeryFilter.java:76) ~[org.jaggeryjs.jaggery.core_0.14.13.jar:?]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat_9.0.58.wso2v1.jar:?]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat_9.0.58.wso2v1.jar:?]
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat_9.0.58.wso2v1.jar:?]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat_9.0.58.wso2v1.jar:?]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat_9.0.58.wso2v1.jar:?]
    at org.wso2.carbon.ui.filters.cache.ContentTypeBasedCachePreventionFilter.doFilter(ContentTypeBasedCachePreventionFilter.java:53) ~[org.wso2.carbon.ui_4.6.3.jar:?]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat_9.0.58.wso2v1.jar:?]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat_9.0.58.wso2v1.jar:?]
    at org.apache.catalina.filters.HttpHeaderSecurityFilter.doFilter(HttpHeaderSecurityFilter.java:126) ~[tomcat_9.0.58.wso2v1.jar:?]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat_9.0.58.wso2v1.jar:?]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat_9.0.58.wso2v1.jar:?]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197) ~[tomcat_9.0.58.wso2v1.jar:?]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) ~[tomcat_9.0.58.wso2v1.jar:?]
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540) ~[tomcat_9.0.58.wso2v1.jar:?]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135) ~[tomcat_9.0.58.wso2v1.jar:?]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) ~[tomcat_9.0.58.wso2v1.jar:?]
    at org.wso2.carbon.identity.context.rewrite.valve.TenantContextRewriteValve.invoke(TenantContextRewriteValve.java:107) ~[org.wso2.carbon.identity.context.rewrite.valve_1.4.52.jar:?]
    at org.wso2.carbon.identity.authz.valve.AuthorizationValve.invoke(AuthorizationValve.java:110) ~[org.wso2.carbon.identity.authz.valve_1.4.52.jar:?]
    at org.wso2.carbon.identity.auth.valve.AuthenticationValve.invoke(AuthenticationValve.java:102) ~[org.wso2.carbon.identity.auth.valve_1.4.52.jar:?]
    at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:101) ~[org.wso2.carbon.tomcat.ext_4.6.3.jar:?]
    at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:49) ~[org.wso2.carbon.tomcat.ext_4.6.3.jar:?]
    at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62) ~[org.wso2.carbon.tomcat.ext_4.6.3.jar:?]
    at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:146) ~[org.wso2.carbon.tomcat.ext_4.6.3.jar:?]
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687) ~[tomcat_9.0.58.wso2v1.jar:?]
    at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:58) ~[org.wso2.carbon.tomcat.ext_4.6.3.jar:?]
    at org.wso2.carbon.tomcat.ext.valves.RequestCorrelationIdValve.invoke(RequestCorrelationIdValve.java:126) ~[org.wso2.carbon.tomcat.ext_4.6.3.jar:?]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) ~[tomcat_9.0.58.wso2v1.jar:?]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359) ~[tomcat_9.0.58.wso2v1.jar:?]
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399) ~[tomcat_9.0.58.wso2v1.jar:?]
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) ~[tomcat_9.0.58.wso2v1.jar:?]
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889) ~[tomcat_9.0.58.wso2v1.jar:?]
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735) ~[tomcat_9.0.58.wso2v1.jar:?]
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat_9.0.58.wso2v1.jar:?]
    at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) ~[tomcat_9.0.58.wso2v1.jar:?]
    at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) ~[tomcat_9.0.58.wso2v1.jar:?]
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat_9.0.58.wso2v1.jar:?]
    at java.lang.Thread.run(Thread.java:829) [?:?]
Caused by: org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException (/devportal/services/utils.js#32)
    at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1754) ~[js_1.7.0.R4wso2v1.jar:?]
    at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:148) ~[js_1.7.0.R4wso2v1.jar:?]
    at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225) ~[js_1.7.0.R4wso2v1.jar:?]
    at org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:85) ~[js_1.7.0.R4wso2v1.jar:?]
    at org.jaggeryjs.rhino.devportal.services.c0._c_getIDPOrigin_2(/devportal/services/utils.js:32) ~[?:?]
    at org.jaggeryjs.rhino.devportal.services.c0.call(/devportal/services/utils.js) ~[?:?]
    at org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:85) ~[js_1.7.0.R4wso2v1.jar:?]
    at org.jaggeryjs.rhino.devportal.services.settings.c0._c_script_0(/devportal/services/settings/settings.jag:31) ~[?:?]
    at org.jaggeryjs.rhino.devportal.services.settings.c0.call(/devportal/services/settings/settings.jag) ~[?:?]
    at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394) ~[js_1.7.0.R4wso2v1.jar:?]
    at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091) ~[js_1.7.0.R4wso2v1.jar:?]
    at org.jaggeryjs.rhino.devportal.services.settings.c0.call(/devportal/services/settings/settings.jag) ~[?:?]
    at org.jaggeryjs.rhino.devportal.services.settings.c0.exec(/devportal/services/settings/settings.jag) ~[?:?]
    at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:583) ~[org.jaggeryjs.scriptengine_0.14.13.jar:?]
    ... 50 more
Caused by: java.lang.NullPointerException
    at org.wso2.carbon.apimgt.impl.utils.APIUtil.getExternalIDPOrigin_aroundBody104(APIUtil.java:2308) ~[org.wso2.carbon.apimgt.impl_9.20.74.jar:?]
    at org.wso2.carbon.apimgt.impl.utils.APIUtil.getExternalIDPOrigin(APIUtil.java:2305) ~[org.wso2.carbon.apimgt.impl_9.20.74.jar:?]
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
    at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
    at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126) ~[js_1.7.0.R4wso2v1.jar:?]
    at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225) ~[js_1.7.0.R4wso2v1.jar:?]
    at org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:85) ~[js_1.7.0.R4wso2v1.jar:?]
    at org.jaggeryjs.rhino.devportal.services.c0._c_getIDPOrigin_2(/devportal/services/utils.js:32) ~[?:?]
    at org.jaggeryjs.rhino.devportal.services.c0.call(/devportal/services/utils.js) ~[?:?]
    at org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:85) ~[js_1.7.0.R4wso2v1.jar:?]
    at org.jaggeryjs.rhino.devportal.services.settings.c0._c_script_0(/devportal/services/settings/settings.jag:31) ~[?:?]
    at org.jaggeryjs.rhino.devportal.services.settings.c0.call(/devportal/services/settings/settings.jag) ~[?:?]
    at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394) ~[js_1.7.0.R4wso2v1.jar:?]
    at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091) ~[js_1.7.0.R4wso2v1.jar:?]
    at org.jaggeryjs.rhino.devportal.services.settings.c0.call(/devportal/services/settings/settings.jag) ~[?:?]
    at org.jaggeryjs.rhino.devportal.services.settings.c0.exec(/devportal/services/settings/settings.jag) ~[?:?]
    at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:583) ~[org.jaggeryjs.scriptengine_0.14.13.jar:?]
    ... 50 more

I'm using wso2/wso2am:4.1.0 image.

I checked this behind a reverse proxy but it showed the same errors.