By: MH Ramon user 23 Mar 2021 at 2:58 a.m. CDT

4 Responses
MH Ramon gravatar
Hello, previously, we are trying to develop a custom auth on the latest Gluu 4.2 and ubuntu 20.04 Since Gluu 4.2 is not ready yet and Ubuntu 20.04 using python3, so we decide to use Gluu 4.1 over ubuntu 18.04 instead I am new with Java and spring, so correct me if i am wrong The custom authentication requires multi-factor authentication which implemented using java springboot framework There are three steps for authentication 1. Call Request Auth 2. Call Websocket 3. Call Auth Result ------ 1. Call Request Auth --> just a simple class constructor which I need to create an authentication. Then the created information will be sent using Http Post method Library used: java.net.URL , java .net.HttpUrlConnection Status: working fine ------ 2. (The Problem) Call Websocket --> Create a websocket connection between the Jar file and my server Library used: springframework.WebsocketStompClient Status: always failed to connect ------ 3. Call Auth Result --> Receives an authentication result based on created websocket using Http Get method Library used: java.net.URL, java.net.HttpUrlConnection Status: always return false, since websocket is not created This is the Websocket class which cause the problem: (HttpUtils.class) ``` package com.fns.gluu.utils; import com.fasterxml.jackson.databind.ObjectMapper; import com.fns.gluu.model.ResponseDTO; import lombok.extern.slf4j.Slf4j; import org.springframework.http.MediaType; import org.springframework.messaging.converter.MappingJackson2MessageConverter; import org.springframework.messaging.simp.stomp.StompCommand; import org.springframework.messaging.simp.stomp.StompHeaders; import org.springframework.messaging.simp.stomp.StompSession; import org.springframework.messaging.simp.stomp.StompSessionHandlerAdapter; import org.springframework.util.concurrent.ListenableFuture; import org.springframework.web.socket.client.WebSocketClient; import org.springframework.web.socket.client.standard.StandardWebSocketClient; import org.springframework.web.socket.messaging.WebSocketStompClient; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStream; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URL; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; @Slf4j public class HttpUtils { private static ObjectMapper objectMapper = new ObjectMapper(); public static ResponseDTO sendPost(String strURL, String jsonInputString) { URL url = null; try { url = new URL(strURL); } catch (MalformedURLException e) { e.printStackTrace(); } ResponseDTO response = null; HttpURLConnection con = null; try { con = (HttpURLConnection) url.openConnection(); con.setDoOutput(true); con.setRequestMethod("POST"); con.setRequestProperty("Content-Type", MediaType.APPLICATION_JSON_VALUE); con.setConnectTimeout(10000); con.setReadTimeout(100000); OutputStream os = con.getOutputStream(); byte[] input = jsonInputString.getBytes("UTF-8"); os.write(input, 0, input.length); BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(), "UTF-8")); response = objectMapper.readValue(br, ResponseDTO.class); } catch (IOException e) { log.error("sendPost exception :", e); con.disconnect(); } return response; } public static ResponseDTO sendGet(String strURL) { URL url = null; try { url = new URL(strURL); } catch (MalformedURLException e) { log.error("sendGet MalformedURLException :", e); } ResponseDTO response = null; HttpURLConnection con = null; try { con = (HttpURLConnection) url.openConnection(); con.setDoOutput(true); con.setRequestMethod("GET"); con.setConnectTimeout(10000); con.setReadTimeout(100000); BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(), "UTF-8")); response = objectMapper.readValue(br, ResponseDTO.class); } catch (IOException e) { log.error("sendGet IOException :", e); } finally { if (con != null) { con.disconnect(); } } return response; } public static StompSession connectSocket(String url, int timeOut) throws TimeoutException { log.info("Inisde the connect socket"); log.info(url); log.info(String.valueOf(timeOut)); try { log.info("Inisde try and catch"); WebSocketClient client = new StandardWebSocketClient(); WebSocketStompClient stompClient = new WebSocketStompClient(client); stompClient.setInboundMessageSizeLimit(Integer.MAX_VALUE); stompClient.setMessageConverter(new MappingJackson2MessageConverter()); log.info("This is the converted message"); log.info(stompClient.getMessageConverter().toString()); ListenableFuture<StompSession> future = stompClient.connect(url, new StompSessionHandlerAdapter() { @Override public void handleException(StompSession session, StompCommand command, StompHeaders headers, byte[] payload, Throwable exception) { super.handleException(session, command, headers, payload, exception); log.error("connectSocket handleException ", exception); } @Override public void handleTransportError(StompSession session, Throwable exception) { super.handleTransportError(session, exception); log.error("connectSocket handleTransportError ", exception); } }); log.info("this is future value"); log.info(future.get(timeOut, TimeUnit.SECONDS).toString()); return future.get(timeOut, TimeUnit.SECONDS); } catch (InterruptedException e) { log.error("WebSocketService InterruptedException. ", e); } catch (ExecutionException e) { log.error("WebSocketService ExecutionEception. ", e); } return null; } } ``` I think i need all java springboot library , I built my jar along with all of its dependencies (It is bigger than usual but all of the classes are there, including `LinkedCaseInsensitiveMap$EntrySet` from the `org.springframework` ) After I tried to run it, I get this error ``` 2021-03-24 00:24:35,116 ERROR [SimpleAsyncTaskExecutor-1] [com.fns.gluu.utils.HttpUtils$1] (HttpUtils.java:118) - connectSocket handleTransportError java.lang.NoClassDefFoundError: org/springframework/util/LinkedCaseInsensitiveMap$EntrySet at org.springframework.util.LinkedCaseInsensitiveMap.entrySet(LinkedCaseInsensitiveMap.java:264) ~[?:?] at org.springframework.util.MultiValueMapAdapter.entrySet(MultiValueMapAdapter.java:160) ~[?:?] at org.springframework.http.HttpHeaders.entrySet(HttpHeaders.java:1738) ~[?:?] at java.util.AbstractMap.putAll(AbstractMap.java:280) ~[?:1.8.0_222] at java.util.TreeMap.putAll(TreeMap.java:327) ~[?:1.8.0_222] at org.springframework.web.socket.client.standard.StandardWebSocketClient$StandardWebSocketClientConfigurator.beforeRequest(StandardWebSocketClient.java:201) ~[?:?] at org.eclipse.jetty.websocket.jsr356.JsrUpgradeListener.onHandshakeRequest(JsrUpgradeListener.java:47) ~[javax-websocket-client-impl-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.websocket.client.WebSocketUpgradeRequest.initWebSocketHeaders(WebSocketUpgradeRequest.java:486) ~[websocket-client-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.websocket.client.WebSocketUpgradeRequest.send(WebSocketUpgradeRequest.java:559) ~[websocket-client-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.websocket.client.WebSocketUpgradeRequest.sendAsync(WebSocketUpgradeRequest.java:565) ~[websocket-client-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.websocket.client.WebSocketClient.connect(WebSocketClient.java:379) ~[websocket-client-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.websocket.jsr356.ClientContainer.connect(ClientContainer.java:242) ~[javax-websocket-client-impl-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.websocket.jsr356.ClientContainer.connectToServer(ClientContainer.java:286) ~[javax-websocket-client-impl-9.4.26.v20200117.jar:9.4.26.v20200117] at org.springframework.web.socket.client.standard.StandardWebSocketClient.lambda$doHandshakeInternal$0(StandardWebSocketClient.java:151) ~[?:?] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_222] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222] Caused by: java.lang.ClassNotFoundException: org.springframework.util.LinkedCaseInsensitiveMap$EntrySet at org.python.core.SyspathJavaLoader.findClass(SyspathJavaLoader.java:128) ~[jython-standalone-2.7.2.jar:2.7.2] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_222] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_222] ... 16 more 2021-03-24 00:24:35,105 ERROR [qtp1590550415-17] [com.fnsvalue.gluu.utils.HttpUtils] (HttpUtils.java:128) - WebSocketService ExecutionException. java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: org/springframework/util/LinkedCaseInsensitiveMap$EntrySet at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_222] at java.util.concurrent.FutureTask.get(FutureTask.java:206) ~[?:1.8.0_222] at org.springframework.util.concurrent.SettableListenableFuture.get(SettableListenableFuture.java:134) ~[?:?] at com.fnsvalue.gluu.utils.HttpUtils.connectSocket(HttpUtils.java:122) ~[?:?] at com.fnsvalue.gluu.api.GuardianApiService.checkAuthStatus(GuardianApiService.java:82) ~[?:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_222] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_222] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_222] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_222] at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:190) ~[jython-standalone-2.7.2.jar:2.7.2] at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:208) ~[jython-standalone-2.7.2.jar:2.7.2] at org.python.core.PyObject.__call__(PyObject.java:477) ~[jython-standalone-2.7.2.jar:2.7.2] at org.python.core.PyObject.__call__(PyObject.java:481) ~[jython-standalone-2.7.2.jar:2.7.2] at org.python.core.PyMethod.__call__(PyMethod.java:141) ~[jython-standalone-2.7.2.jar:2.7.2] at org.python.pycode._pyx4.authenticate$9(gccs_test.py:105) ~[?:?] at org.python.pycode._pyx4.call_function(gccs_test.py) ~[?:?] at org.python.core.PyTableCode.call(PyTableCode.java:173) ~[jython-standalone-2.7.2.jar:2.7.2] at org.python.core.PyBaseCode.call(PyBaseCode.java:306) ~[jython-standalone-2.7.2.jar:2.7.2] at org.python.core.PyBaseCode.call(PyBaseCode.java:197) ~[jython-standalone-2.7.2.jar:2.7.2] at org.python.core.PyFunction.__call__(PyFunction.java:485) ~[jython-standalone-2.7.2.jar:2.7.2] at org.python.core.PyMethod.instancemethod___call__(PyMethod.java:237) ~[jython-standalone-2.7.2.jar:2.7.2] at org.python.core.PyMethod.__call__(PyMethod.java:228) ~[jython-standalone-2.7.2.jar:2.7.2] at org.python.core.PyMethod.__call__(PyMethod.java:218) ~[jython-standalone-2.7.2.jar:2.7.2] at org.python.core.PyMethod.__call__(PyMethod.java:213) ~[jython-standalone-2.7.2.jar:2.7.2] at org.python.core.PyObject._jcallexc(PyObject.java:3565) ~[jython-standalone-2.7.2.jar:2.7.2] at org.python.core.PyObject._jcall(PyObject.java:3598) ~[jython-standalone-2.7.2.jar:2.7.2] at org.python.proxies.__main__$PersonAuthentication$4.authenticate(Unknown Source) ~[?:?] at org.gluu.oxauth.service.external.ExternalAuthenticationService.executeExternalAuthenticate(ExternalAuthenticationService.java:196) ~[classes/:?] at org.gluu.oxauth.service.external.ExternalAuthenticationService$Proxy$_$$_WeldClientProxy.executeExternalAuthenticate(Unknown Source) ~[classes/:?] at org.gluu.oxauth.auth.Authenticator.userAuthenticationInteractive(Authenticator.java:321) ~[classes/:?] at org.gluu.oxauth.auth.Authenticator.authenticateImpl(Authenticator.java:204) ~[classes/:?] at org.gluu.oxauth.auth.Authenticator.authenticate(Authenticator.java:132) ~[classes/:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_222] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_222] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_222] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_222] at org.apache.el.parser.AstValue.invoke(AstValue.java:247) ~[org.mortbay.jasper.apache-el-8.5.40.jar:8.5.40] at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:267) ~[org.mortbay.jasper.apache-el-8.5.40.jar:8.5.40] at org.jboss.weld.module.web.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:40) ~[weld-web-3.1.2.Final.jar:3.1.2.Final] at org.jboss.weld.module.web.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50) ~[weld-web-3.1.2.Final.jar:3.1.2.Final] at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:107) ~[javax.faces-2.3.9.jar:2.3.9] at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:87) ~[javax.faces-2.3.9.jar:2.3.9] at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102) ~[javax.faces-2.3.9.jar:2.3.9] at javax.faces.component.UICommand.broadcast(UICommand.java:330) ~[javax.faces-2.3.9.jar:2.3.9] at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:870) ~[javax.faces-2.3.9.jar:2.3.9] at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1418) ~[javax.faces-2.3.9.jar:2.3.9] at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82) ~[javax.faces-2.3.9.jar:2.3.9] at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100) ~[javax.faces-2.3.9.jar:2.3.9] at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:201) ~[javax.faces-2.3.9.jar:2.3.9] at javax.faces.webapp.FacesServlet.service(FacesServlet.java:670) ~[javax.faces-2.3.9.jar:2.3.9] at org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(ServletHolder.java:1395) ~[jetty-servlet-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:755) ~[jetty-servlet-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1617) ~[jetty-servlet-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:226) ~[websocket-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604) ~[jetty-servlet-9.4.26.v20200117.jar:9.4.26.v20200117] at org.gluu.oxauth.audit.debug.ServletLoggingFilter.doFilter(ServletLoggingFilter.java:67) ~[classes/:?] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1596) ~[jetty-servlet-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:545) ~[jetty-servlet-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:590) ~[jetty-security-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1607) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1297) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:485) ~[jetty-servlet-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1577) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1212) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:221) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.Server.handle(Server.java:500) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:547) [jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375) [jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:270) [jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [jetty-io-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) [jetty-io-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) [jetty-io-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336) [jetty-util-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) [jetty-util-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) [jetty-util-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129) [jetty-util-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:388) [jetty-util-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806) [jetty-util-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938) [jetty-util-9.4.26.v20200117.jar:9.4.26.v20200117] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222] Caused by: java.lang.NoClassDefFoundError: org/springframework/util/LinkedCaseInsensitiveMap$EntrySet at org.springframework.util.LinkedCaseInsensitiveMap.entrySet(LinkedCaseInsensitiveMap.java:264) ~[?:?] at org.springframework.util.MultiValueMapAdapter.entrySet(MultiValueMapAdapter.java:160) ~[?:?] at org.springframework.http.HttpHeaders.entrySet(HttpHeaders.java:1738) ~[?:?] at java.util.AbstractMap.putAll(AbstractMap.java:280) ~[?:1.8.0_222] at java.util.TreeMap.putAll(TreeMap.java:327) ~[?:1.8.0_222] at org.springframework.web.socket.client.standard.StandardWebSocketClient$StandardWebSocketClientConfigurator.beforeRequest(StandardWebSocketClient.java:201) ~[?:?] at org.eclipse.jetty.websocket.jsr356.JsrUpgradeListener.onHandshakeRequest(JsrUpgradeListener.java:47) ~[javax-websocket-client-impl-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.websocket.client.WebSocketUpgradeRequest.initWebSocketHeaders(WebSocketUpgradeRequest.java:486) ~[websocket-client-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.websocket.client.WebSocketUpgradeRequest.send(WebSocketUpgradeRequest.java:559) ~[websocket-client-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.websocket.client.WebSocketUpgradeRequest.sendAsync(WebSocketUpgradeRequest.java:565) ~[websocket-client-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.websocket.client.WebSocketClient.connect(WebSocketClient.java:379) ~[websocket-client-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.websocket.jsr356.ClientContainer.connect(ClientContainer.java:242) ~[javax-websocket-client-impl-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.websocket.jsr356.ClientContainer.connectToServer(ClientContainer.java:286) ~[javax-websocket-client-impl-9.4.26.v20200117.jar:9.4.26.v20200117] at org.springframework.web.socket.client.standard.StandardWebSocketClient.lambda$doHandshakeInternal$0(StandardWebSocketClient.java:151) ~[?:?] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_222] ... 1 more Caused by: java.lang.ClassNotFoundException: org.springframework.util.LinkedCaseInsensitiveMap$EntrySet at org.python.core.SyspathJavaLoader.findClass(SyspathJavaLoader.java:128) ~[jython-standalone-2.7.2.jar:2.7.2] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_222] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_222] at org.springframework.util.LinkedCaseInsensitiveMap.entrySet(LinkedCaseInsensitiveMap.java:264) ~[?:?] at org.springframework.util.MultiValueMapAdapter.entrySet(MultiValueMapAdapter.java:160) ~[?:?] at org.springframework.http.HttpHeaders.entrySet(HttpHeaders.java:1738) ~[?:?] at java.util.AbstractMap.putAll(AbstractMap.java:280) ~[?:1.8.0_222] at java.util.TreeMap.putAll(TreeMap.java:327) ~[?:1.8.0_222] at org.springframework.web.socket.client.standard.StandardWebSocketClient$StandardWebSocketClientConfigurator.beforeRequest(StandardWebSocketClient.java:201) ~[?:?] at org.eclipse.jetty.websocket.jsr356.JsrUpgradeListener.onHandshakeRequest(JsrUpgradeListener.java:47) ~[javax-websocket-client-impl-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.websocket.client.WebSocketUpgradeRequest.initWebSocketHeaders(WebSocketUpgradeRequest.java:486) ~[websocket-client-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.websocket.client.WebSocketUpgradeRequest.send(WebSocketUpgradeRequest.java:559) ~[websocket-client-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.websocket.client.WebSocketUpgradeRequest.sendAsync(WebSocketUpgradeRequest.java:565) ~[websocket-client-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.websocket.client.WebSocketClient.connect(WebSocketClient.java:379) ~[websocket-client-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.websocket.jsr356.ClientContainer.connect(ClientContainer.java:242) ~[javax-websocket-client-impl-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.websocket.jsr356.ClientContainer.connectToServer(ClientContainer.java:286) ~[javax-websocket-client-impl-9.4.26.v20200117.jar:9.4.26.v20200117] at org.springframework.web.socket.client.standard.StandardWebSocketClient.lambda$doHandshakeInternal$0(StandardWebSocketClient.java:151) ~[?:?] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_222] ... 1 more ``` Since I am new with this, and I realize that the gluu is also built based on the maven, I think that my dependency class is overlapping with the one that Gluu use Since I am new with this, am i missing something? Thank you very much for your help

By Mohib Zico staff 24 Mar 2021 at 8:08 a.m. CDT

Mohib Zico gravatar
Hello Habibur, >> Since Gluu 4.2 is not ready yet and Ubuntu 20.04 using python3, Can you please share some info on that? I thought we released the stable 4.2.3 which has some fix from 4.1.

By MH Ramon user 24 Mar 2021 at 7:15 p.m. CDT

MH Ramon gravatar
Hello Mr Mohib, Thank you for answering my question First of all, I am sorry that I am new in this development team (me and my friends working together ) The thing that I want to achieve is, I want to debug and understand what's wrong with my code, and fix it Since Gluu 4.2 is pretty new, and the number of forums are not that much, I always confused to define my error As I post earlier, the [debugging link](https://gluu.org/docs/gluu-server/4.2/developer-guide/script-debugging/) for Gluu 4.2 is still not finished yet However, the [debugging link](https://gluu.org/docs/gluu-server/4.1/developer-guide/script-debugging/) for Gluu 4.1 is done. So I choose to study that instead. And the code from the [repo](https://repo.gluu.org/tools/tools-intall-4.1.sh) is written on Python 2.7 (the standard python for Ubuntu 18.04). That's the reason I wrote > Since Gluu 4.2 is not ready yet and Ubuntu 20.04 using python3, so we decide to use Gluu 4.1 over ubuntu 18.04 instead Yes I read the official [Release Notes ](https://gluu.org/docs/gluu-server/4.2/release-notes/). You guys pointed those fixes well. But when stared this post, I don't know how to fix my problem My friend told me that maybe there is something wrong with the environment. That's why I post my problem here

By Mohib Zico staff 24 Mar 2021 at 11:38 p.m. CDT

Mohib Zico gravatar
Hi Habibur, I reached our package team to publish "tools" package for 4.2. Thanks much for the report! I am going to request one of our developer to give us some path so you can have idea how to work with Gluu's code. But if you / your company have some serious business use cases, you might wanna discuss that in call [here](https://gluu.org/booking/). Reason behind of call is: customization is not part of community support but if you have really serious need, we can work together to reach your target.

By MH Ramon user 24 Mar 2021 at 11:53 p.m. CDT

MH Ramon gravatar
Ah I see If that so, we will consider about your recommendation to discuss this with Gluu team Thank you very much for your reply