Michael_Lowry

NPE from AWI if SSO URL is used but SSO is disabled

Discussion created by Michael_Lowry on Nov 21, 2017
Latest reply on Feb 6, 2018 by JohnO'Mullane
This morning I tried to log in to our v12.1 system using a parameterized URL. The URL’s paramters included sso-yes and autologon=yes, instructing the AWI to try to log in immediately using single sign-on:
https://awi.mycompany.com/#&system=AWI_SYS1&client=0001&sso=yes&autologin=yes
The AWI login screen appeared but it immediately displayed a null pointer exception.
q453had2jb90.png

The AWI log provided a bit more information about the NPE:
2017-11-21 14:26:52,126 pool-2-thread-1        [WARN ] NOSESSION/- NOUI  +1 [dataservice.connection.ConnectionService] - Login to UC4 Automation Engine failed.
java.lang.NullPointerException: null
     at com.uc4.communication.Connection.login(Connection.java:1614)
     at com.uc4.communication.Connection.login(Connection.java:1585)
     at com.uc4.webui.api.connection.AEConnectionAdapter.login(AEConnectionAdapter.java:74)
     at com.uc4.ecc.backends.impl.dataservice.connection.ConnectionService.login(ConnectionService.java:220)
     at com.uc4.ecc.backends.dataservice.connection.IConnectionService$pbryglu.login(Unknown Source)
     at com.uc4.ecc.backends.impl.dataservice.login.Authorization$Login.login(Authorization.java:67)
     at com.uc4.ecc.backends.impl.dataservice.login.LoginService.login(LoginService.java:26)
     at com.uc4.ecc.backends.dataservice.login.ILoginService$pbryglu.login(Unknown Source)
     at com.uc4.ecc.framework.entrypoint.login.ae.AECredentialsPresenter.performAutomationEngineLogin(AECredentialsPresenter.java:265)
     at com.uc4.ecc.framework.entrypoint.login.ae.AECredentialsPresenter.login(AECredentialsPresenter.java:194)
     at com.uc4.ecc.framework.entrypoint.login.ae.AECredentialsPresenter.access$200(AECredentialsPresenter.java:43)
     at com.uc4.ecc.framework.entrypoint.login.ae.AECredentialsPresenter$2.load(AECredentialsPresenter.java:162)
     at com.uc4.ecc.framework.entrypoint.login.ae.AECredentialsPresenter$2.load(AECredentialsPresenter.java:155)
     at com.uc4.ecc.framework.core.async.BaseRequestCoordinator$1$1.call(BaseRequestCoordinator.java:223)
     at com.uc4.ecc.framework.core.pool.ContextAwareExecutorService$CallableImplementation.call(ContextAwareExecutorService.java:72)
     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
     at java.lang.Thread.run(Thread.java:748)
2017-11-21 14:26:52,126 pool-2-thread-1        [TRACE] NOSESSION/- NOUI  +1 [dataservice.connection.ConnectionService] - Closed connection com.uc4.webui.api.connection.AEConnectionAdapter@68b08d3f
2017-11-21 14:26:52,130 pool-2-thread-1        [DEBUG] NOSESSION/- NOUI  +1 [trypoint.login.ae.AECredentialsPresenter] - Failed login
The log did not clearly point to the cause of the problem, and it took me a while to figure it out. I had disabled SSO for testing, and had forgotten to re-enable it.
[uc4.webui.common.properties.Configurable] - Loaded configuration value: sso.enabled -> false (false default)
Once I re-enabled SSO in configuration.properties and restarted the AWI, the problem went away. It would be nice if the AWI displayed a more descriptive error message in this situation — e.g., “Single sign-on is disabled.”

Outcomes