Uploaded image for project: 'Apache Submarine'
  1. Apache Submarine
  2. SUBMARINE-444

[WORKBENCH] Login error should be more graceful

    XMLWordPrintableJSON

Details

    Description

      If the sys_user table is empty, or if the user/password is incorrect, the login page shows an error like this:

      The submarine workbench log has the following NPE error:

      [ERROR] 2020-03-19 00:33:46,739 method:org.apache.submarine.server.workbench.rest.LoginRestApi.login(LoginRestApi.java:65)
      
      java.lang.NullPointerException
              at org.apache.submarine.server.workbench.rest.LoginRestApi.login(LoginRestApi.java:63)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:76)
              at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:148)
              at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:191)
              at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:200)
              at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:103)
              at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:493)
              at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:415)
              at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:104)
              at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:277)
      
      

      We should make the login failure easier to understand. Do not assume the sysUser is correct.

      Attachments

        Issue Links

          Activity

            People

              lowc1012 Ryan Lo
              weichiu Wei-Chiu Chuang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m