GluuFederation / oxTrust

Gluu Server UI for managing authentication, authorization and users.
https://gluu.org/docs/ce
MIT License
134 stars 61 forks source link

Inserting Sector URI throwing error #2375

Closed mzico closed 1 year ago

mzico commented 1 year ago

Gluu Server version: 4.5.1.Final

I am trying to use Sector URI == https://[hostname_of_Gluu_server]/sectoridentifer/testClient.json But oxTrust throwing error.

Here is the full recording: https://www.youtube.com/watch?v=1yHgBQ9Afq4

And this is what oxTrust.log saying...

2023-09-29 13:02:00,897 TRACE [qtp1199673596-18] [org.gluu.oxtrust.exception.GlobalExceptionHandler] (GlobalExceptionHandler.java:58) - #{updateClientAction.save}: java.lang.NullPointerException
javax.faces.FacesException: #{updateClientAction.save}: java.lang.NullPointerException
    at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:66) ~[jakarta.faces-2.3.18.jar:2.3.18]
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:76) ~[jakarta.faces-2.3.18.jar:2.3.18]
    at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177) ~[jakarta.faces-2.3.18.jar:2.3.18]
    at javax.faces.webapp.FacesServlet.executeLifecyle(FacesServlet.java:707) ~[jakarta.faces-2.3.18.jar:2.3.18]
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:451) ~[jakarta.faces-2.3.18.jar:2.3.18]
    at org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1410) ~[jetty-servlet-10.0.9.jar:10.0.9]
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:764) ~[jetty-servlet-10.0.9.jar:10.0.9]
    at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1630) ~[jetty-servlet-10.0.9.jar:10.0.9]
    at org.eclipse.jetty.websocket.servlet.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:170) ~[websocket-servlet-10.0.9.jar:10.0.9]
    at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) ~[?:?]
    at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1600) ~[?:?]
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:506) ~[?:?]
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:131) ~[?:?]
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:578) ~[?:?]
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122) ~[?:?]
    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:223) ~[?:?]
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1571) ~[?:?]
    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221) ~[?:?]
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1378) ~[?:?]
    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:176) ~[?:?]
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:463) ~[?:?]
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1544) ~[?:?]
    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:174) ~[?:?]
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1300) ~[?:?]
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:129) ~[?:?]
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:192) ~[?:?]
    at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:51) ~[?:?]
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122) ~[?:?]
    at org.eclipse.jetty.server.Server.handle(Server.java:562) ~[?:?]
    at org.eclipse.jetty.server.HttpChannel.lambda$handle$0(HttpChannel.java:505) ~[?:?]
    at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:762) ~[?:?]
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:497) ~[?:?]
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:282) ~[?:?]
    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:319) ~[?:?]
    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100) ~[?:?]
    at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53) ~[?:?]
    at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:412) ~[?:?]
    at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:381) ~[?:?]
    at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:268) ~[?:?]
    at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.lambda$new$0(AdaptiveExecutionStrategy.java:138) ~[?:?]
    at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:407) ~[?:?]
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:894) ~[?:?]
    at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1038) ~[?:?]
    at java.lang.Thread.run(Thread.java:829) ~[?:?]
Caused by: javax.faces.FacesException: #{updateClientAction.save}: java.lang.NullPointerException
    at com.sun.faces.application.ActionListenerImpl.getNavigationOutcome(ActionListenerImpl.java:96) ~[jakarta.faces-2.3.18.jar:2.3.18]
    at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:71) ~[jakarta.faces-2.3.18.jar:2.3.18]
    at javax.faces.component.UICommand.broadcast(UICommand.java:222) ~[jakarta.faces-2.3.18.jar:2.3.18]
    at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:847) ~[jakarta.faces-2.3.18.jar:2.3.18]
    at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1396) ~[jakarta.faces-2.3.18.jar:2.3.18]
    at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:58) ~[jakarta.faces-2.3.18.jar:2.3.18]
    ... 43 more
Caused by: javax.faces.el.EvaluationException: java.lang.NullPointerException
    at com.sun.faces.application.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:76) ~[jakarta.faces-2.3.18.jar:2.3.18]
    at com.sun.faces.application.ActionListenerImpl.getNavigationOutcome(ActionListenerImpl.java:82) ~[jakarta.faces-2.3.18.jar:2.3.18]
    at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:71) ~[jakarta.faces-2.3.18.jar:2.3.18]
    at javax.faces.component.UICommand.broadcast(UICommand.java:222) ~[jakarta.faces-2.3.18.jar:2.3.18]
    at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:847) ~[jakarta.faces-2.3.18.jar:2.3.18]
    at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1396) ~[jakarta.faces-2.3.18.jar:2.3.18]
    at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:58) ~[jakarta.faces-2.3.18.jar:2.3.18]
    ... 43 more
Caused by: java.lang.NullPointerException
    at org.apache.http.impl.client.CloseableHttpClient.determineTarget(CloseableHttpClient.java:92) ~[httpclient-4.5.13.jar:4.5.13]
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) ~[httpclient-4.5.13.jar:4.5.13]
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108) ~[httpclient-4.5.13.jar:4.5.13]
    at org.gluu.oxtrust.action.UpdateClientAction.downloadSectorIdentifierUri(UpdateClientAction.java:2046) ~[classes/:?]
    at org.gluu.oxtrust.action.UpdateClientAction.loadSector(UpdateClientAction.java:1998) ~[classes/:?]
    at org.gluu.oxtrust.action.UpdateClientAction.save(UpdateClientAction.java:406) ~[classes/:?]
    at org.gluu.oxtrust.action.UpdateClientAction$Proxy$_$$_WeldSubclass.save$$super(Unknown Source) ~[classes/:?]
    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.jboss.weld.interceptor.proxy.TerminalAroundInvokeInvocationContext.proceedInternal(TerminalAroundInvokeInvocationContext.java:51) ~[weld-core-impl-3.1.9.Final.jar:3.1.9.Final]
    at org.jboss.weld.interceptor.proxy.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:78) ~[weld-core-impl-3.1.9.Final.jar:3.1.9.Final]
    at org.gluu.service.security.SecurityInterceptor.invoke(SecurityInterceptor.java:55) ~[security-extension-cdi-4.5.1.Final.jar:?]
    at jdk.internal.reflect.GeneratedMethodAccessor151.invoke(Unknown Source) ~[?:?]
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
    at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
    at org.jboss.weld.interceptor.reader.SimpleInterceptorInvocation$SimpleMethodInvocation.invoke(SimpleInterceptorInvocation.java:73) ~[weld-core-impl-3.1.9.Final.jar:3.1.9.Final]
    at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeAroundInvoke(InterceptorMethodHandler.java:84) ~[weld-core-impl-3.1.9.Final.jar:3.1.9.Final]
    at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeInterception(InterceptorMethodHandler.java:72) ~[weld-core-impl-3.1.9.Final.jar:3.1.9.Final]
    at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.invoke(InterceptorMethodHandler.java:56) ~[weld-core-impl-3.1.9.Final.jar:3.1.9.Final]
    at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:79) ~[weld-core-impl-3.1.9.Final.jar:3.1.9.Final]
    at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:68) ~[weld-core-impl-3.1.9.Final.jar:3.1.9.Final]
    at org.gluu.oxtrust.action.UpdateClientAction$Proxy$_$$_WeldSubclass.save(Unknown Source) ~[classes/:?]
    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.apache.el.parser.AstValue.invoke(AstValue.java:246) ~[org.mortbay.jasper.apache-el-9.0.52.jar:9.0.52]
    at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:266) ~[org.mortbay.jasper.apache-el-9.0.52.jar:9.0.52]
    at org.jboss.weld.module.web.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:40) ~[weld-web-3.1.9.Final.jar:3.1.9.Final]
    at org.jboss.weld.module.web.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50) ~[weld-web-3.1.9.Final.jar:3.1.9.Final]
    at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:65) ~[jakarta.faces-2.3.18.jar:2.3.18]
    at com.sun.faces.application.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:66) ~[jakarta.faces-2.3.18.jar:2.3.18]
    at com.sun.faces.application.ActionListenerImpl.getNavigationOutcome(ActionListenerImpl.java:82) ~[jakarta.faces-2.3.18.jar:2.3.18]
    at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:71) ~[jakarta.faces-2.3.18.jar:2.3.18]
    at javax.faces.component.UICommand.broadcast(UICommand.java:222) ~[jakarta.faces-2.3.18.jar:2.3.18]
    at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:847) ~[jakarta.faces-2.3.18.jar:2.3.18]
    at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1396) ~[jakarta.faces-2.3.18.jar:2.3.18]
    at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:58) ~[jakarta.faces-2.3.18.jar:2.3.18]
    ... 43 more
mzico commented 1 year ago

It's fixed in 4.5.2.

shekhar16 commented 1 year ago

https://github.com/GluuFederation/oxTrust/commit/15c74a11526b97ec621ef019b7511172b76acf0b