Android Question websocket Push

Discussion in 'Android Questions' started by sasidhar, Apr 29, 2018.

  1. sasidhar

    sasidhar Active Member Licensed User

    Attached Files:

  2. Erel

    Erel Administrator Staff Member Licensed User

    Have you opened the relevant port in the server firewall?
     
  3. sasidhar

    sasidhar Active Member Licensed User

    Hi,
    yes.Opened port. below screenshot
    upload_2018-5-6_19-17-0.png
     
  4. sasidhar

    sasidhar Active Member Licensed User

    Below error in command prompt..


    access$201(Unknown Source)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
    run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Caused by: org.eclipse.jetty.websocket.api.UpgradeException: 0 null
    at org.eclipse.jetty.websocket.client.WebSocketUpgradeRequest.onComplete
    (WebSocketUpgradeRequest.java:513)
    ... 23 more
    Caused by: java.net.SocketTimeoutException: Connect Timeout
    ... 8 more
    org.eclipse.jetty.websocket.api.UpgradeException: 0 null
    at org.eclipse.jetty.websocket.client.WebSocketUpgradeRequest.onComplete
    (WebSocketUpgradeRequest.java:513)
    at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNoti
    fier.java:193)
    at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNoti
    fier.java:185)
    at org.eclipse.jetty.client.HttpExchange.notifyFailureComplete(HttpExcha
    nge.java:269)
    at org.eclipse.jetty.client.HttpExchange.abort(HttpExchange.java:240)
    at org.eclipse.jetty.client.HttpConversation.abort(HttpConversation.java
    :141)
    at org.eclipse.jetty.client.HttpRequest.abort(HttpRequest.java:748)
    at org.eclipse.jetty.client.HttpDestination.abort(HttpDestination.java:4
    43)
    at org.eclipse.jetty.client.HttpDestination.failed(HttpDestination.java:
    223)
    at org.eclipse.jetty.client.AbstractConnectionPool$1.failed(AbstractConn
    ectionPool.java:122)
    at org.eclipse.jetty.util.Promise$Wrapper.failed(Promise.java:136)
    at org.eclipse.jetty.client.HttpClient$1$1.failed(HttpClient.java:589)
    at org.eclipse.jetty.client.AbstractHttpClientTransport.connectFailed(Ab
    stractHttpClientTransport.java:154)
    at org.eclipse.jetty.client.AbstractHttpClientTransport$ClientSelectorMa
    nager.connectionFailed(AbstractHttpClientTransport.java:199)
    at org.eclipse.jetty.io.ManagedSelector$Connect.failed(ManagedSelector.j
    ava:659)
    at org.eclipse.jetty.io.ManagedSelector$Connect.access$1300(ManagedSelec
    tor.java:626)
    at org.eclipse.jetty.io.ManagedSelector$ConnectTimeout.run(ManagedSelect
    or.java:681)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
    access$201(Unknown Source)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
    run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.net.SocketTimeoutException: Connect Timeout
    ... 8 more
    org.eclipse.jetty.websocket.api.UpgradeException: 0 null
    at org.eclipse.jetty.websocket.client.WebSocketUpgradeRequest.onComplete
    (WebSocketUpgradeRequest.java:520)
    at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNoti
    fier.java:193)
    at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNoti
    fier.java:185)
    at org.eclipse.jetty.client.HttpExchange.notifyFailureComplete(HttpExcha
    nge.java:269)
    at org.eclipse.jetty.client.HttpExchange.abort(HttpExchange.java:240)
    at org.eclipse.jetty.client.HttpConversation.abort(HttpConversation.java
    :141)
    at org.eclipse.jetty.client.HttpRequest.abort(HttpRequest.java:748)
    at org.eclipse.jetty.client.HttpDestination.abort(HttpDestination.java:4
    43)
    at org.eclipse.jetty.client.HttpDestination.failed(HttpDestination.java:
    223)
    at org.eclipse.jetty.client.AbstractConnectionPool$1.failed(AbstractConn
    ectionPool.java:122)
    at org.eclipse.jetty.util.Promise$Wrapper.failed(Promise.java:136)
    at org.eclipse.jetty.client.HttpClient$1$1.failed(HttpClient.java:589)
    at org.eclipse.jetty.client.AbstractHttpClientTransport.connectFailed(Ab
    stractHttpClientTransport.java:154)
    at org.eclipse.jetty.client.AbstractHttpClientTransport$ClientSelectorMa
    nager.connectionFailed(AbstractHttpClientTransport.java:199)
    at org.eclipse.jetty.io.ManagedSelector$Connect.failed(ManagedSelector.j
    ava:659)
    at org.eclipse.jetty.io.ManagedSelector$Connect.access$1300(ManagedSelec
    tor.java:626)
    at org.eclipse.jetty.io.ManagedSelector$ConnectTimeout.run(ManagedSelect
    or.java:681)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
    access$201(Unknown Source)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
    run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    java.util.concurrent.ExecutionException: org.eclipse.jetty.websocket.api.Upgrade
    Exception: 0 null
    at java.util.concurrent.CompletableFuture.reportGet(Unknown Source)
    at java.util.concurrent.CompletableFuture.get(Unknown Source)
    at anywhersoftware.b4j.objects.WebSocketClientWrapper.Close(WebSocketCli
    entWrapper.java:76)
    at anywhersoftware.b4j.objects.WebSocketClientWrapper$WSHandler.onWebSoc
    ketError(WebSocketClientWrapper.java:118)
    at org.eclipse.jetty.websocket.common.events.JettyListenerEventDriver.on
    Error(JettyListenerEventDriver.java:112)
    at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.incomin
    gError(AbstractEventDriver.java:96)
    at org.eclipse.jetty.websocket.client.WebSocketUpgradeRequest.handleExce
    ption(WebSocketUpgradeRequest.java:526)
    at org.eclipse.jetty.websocket.client.WebSocketUpgradeRequest.onComplete
    (WebSocketUpgradeRequest.java:520)
    at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNoti
    fier.java:193)
    at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNoti
    fier.java:185)
    at org.eclipse.jetty.client.HttpExchange.notifyFailureComplete(HttpExcha
    nge.java:269)
    at org.eclipse.jetty.client.HttpExchange.abort(HttpExchange.java:240)
    at org.eclipse.jetty.client.HttpConversation.abort(HttpConversation.java
    :141)
    at org.eclipse.jetty.client.HttpRequest.abort(HttpRequest.java:748)
    at org.eclipse.jetty.client.HttpDestination.abort(HttpDestination.java:4
    43)
    at org.eclipse.jetty.client.HttpDestination.failed(HttpDestination.java:
    223)
    at org.eclipse.jetty.client.AbstractConnectionPool$1.failed(AbstractConn
    ectionPool.java:122)
    at org.eclipse.jetty.util.Promise$Wrapper.failed(Promise.java:136)
    at org.eclipse.jetty.client.HttpClient$1$1.failed(HttpClient.java:589)
    at org.eclipse.jetty.client.AbstractHttpClientTransport.connectFailed(Ab
    stractHttpClientTransport.java:154)
    at org.eclipse.jetty.client.AbstractHttpClientTransport$ClientSelectorMa
    nager.connectionFailed(AbstractHttpClientTransport.java:199)
    at org.eclipse.jetty.io.ManagedSelector$Connect.failed(ManagedSelector.j
    ava:659)
    at org.eclipse.jetty.io.ManagedSelector$Connect.access$1300(ManagedSelec
    tor.java:626)
    at org.eclipse.jetty.io.ManagedSelector$ConnectTimeout.run(ManagedSelect
    or.java:681)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
    access$201(Unknown Source)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
    run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Caused by: org.eclipse.jetty.websocket.api.UpgradeException: 0 null
    at org.eclipse.jetty.websocket.client.WebSocketUpgradeRequest.onComplete
    (WebSocketUpgradeRequest.java:513)
    ... 23 more
    Caused by: java.net.SocketTimeoutException: Connect Timeout
    ... 8 more

    E:\FOR COPY\New folder\SETUP\b4JNetwork\test>java -jar WebSocketPush.jar
    2018-05-06 17:48:14.807:INFO::JavaFX Application Thread: Logging initialized @23
    01ms to org.eclipse.jetty.util.log.StdErrLog
    org.eclipse.jetty.websocket.api.UpgradeException: 0 null
    at org.eclipse.jetty.websocket.client.WebSocketUpgradeRequest.onComplete
    (WebSocketUpgradeRequest.java:513)
    at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNoti
    fier.java:193)
    at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNoti
    fier.java:185)
    at org.eclipse.jetty.client.HttpExchange.notifyFailureComplete(HttpExcha
    nge.java:269)
    at org.eclipse.jetty.client.HttpExchange.abort(HttpExchange.java:240)
    at org.eclipse.jetty.client.HttpConversation.abort(HttpConversation.java
    :141)
    at org.eclipse.jetty.client.HttpRequest.abort(HttpRequest.java:748)
    at org.eclipse.jetty.client.HttpDestination.abort(HttpDestination.java:4
    43)
    at org.eclipse.jetty.client.HttpDestination.failed(HttpDestination.java:
    223)
    at org.eclipse.jetty.client.AbstractConnectionPool$1.failed(AbstractConn
    ectionPool.java:122)
    at org.eclipse.jetty.util.Promise$Wrapper.failed(Promise.java:136)
    at org.eclipse.jetty.client.HttpClient$1$1.failed(HttpClient.java:589)
    at org.eclipse.jetty.client.AbstractHttpClientTransport.connectFailed(Ab
    stractHttpClientTransport.java:154)
    at org.eclipse.jetty.client.AbstractHttpClientTransport$ClientSelectorMa
    nager.connectionFailed(AbstractHttpClientTransport.java:199)
    at org.eclipse.jetty.io.ManagedSelector$Connect.failed(ManagedSelector.j
    ava:659)
    at org.eclipse.jetty.io.ManagedSelector$Connect.access$1300(ManagedSelec
    tor.java:626)
    at org.eclipse.jetty.io.ManagedSelector$ConnectTimeout.run(ManagedSelect
    or.java:681)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
    access$201(Unknown Source)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
    run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.net.SocketTimeoutException: Connect Timeout
    ... 8 more
    org.eclipse.jetty.websocket.api.UpgradeException: 0 null
    WebSocket Closed: 0 null
    at org.eclipse.jetty.websocket.client.WebSocketUpgradeRequest.onComplete
    (WebSocketUpgradeRequest.java:520)
    at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNoti
    fier.java:193)
    at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNoti
    fier.java:185)
    at org.eclipse.jetty.client.HttpExchange.notifyFailureComplete(HttpExcha
    nge.java:269)
    at org.eclipse.jetty.client.HttpExchange.abort(HttpExchange.java:240)
    at org.eclipse.jetty.client.HttpConversation.abort(HttpConversation.java
    :141)
    at org.eclipse.jetty.client.HttpRequest.abort(HttpRequest.java:748)
    at org.eclipse.jetty.client.HttpDestination.abort(HttpDestination.java:4
    43)
    at org.eclipse.jetty.client.HttpDestination.failed(HttpDestination.java:
    223)
    at org.eclipse.jetty.client.AbstractConnectionPool$1.failed(AbstractConn
    ectionPool.java:122)
    at org.eclipse.jetty.util.Promise$Wrapper.failed(Promise.java:136)
    at org.eclipse.jetty.client.HttpClient$1$1.failed(HttpClient.java:589)
    at org.eclipse.jetty.client.AbstractHttpClientTransport.connectFailed(Ab
    stractHttpClientTransport.java:154)
    at org.eclipse.jetty.client.AbstractHttpClientTransport$ClientSelectorMa
    nager.connectionFailed(AbstractHttpClientTransport.java:199)
    at org.eclipse.jetty.io.ManagedSelector$Connect.failed(ManagedSelector.j
    ava:659)
    at org.eclipse.jetty.io.ManagedSelector$Connect.access$1300(ManagedSelec
    tor.java:626)
    at org.eclipse.jetty.io.ManagedSelector$ConnectTimeout.run(ManagedSelect
    or.java:681)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
    access$201(Unknown Source)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
    run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    java.util.concurrent.ExecutionException: org.eclipse.jetty.websocket.api.Upgrade
    Exception: 0 null
    at java.util.concurrent.CompletableFuture.reportGet(Unknown Source)
    at java.util.concurrent.CompletableFuture.get(Unknown Source)
    at anywhersoftware.b4j.objects.WebSocketClientWrapper.Close(WebSocketCli
    entWrapper.java:76)
    at anywhersoftware.b4j.objects.WebSocketClientWrapper$WSHandler.onWebSoc
    ketError(WebSocketClientWrapper.java:118)
    at org.eclipse.jetty.websocket.common.events.JettyListenerEventDriver.on
    Error(JettyListenerEventDriver.java:112)
    at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.incomin
    gError(AbstractEventDriver.java:96)
    at org.eclipse.jetty.websocket.client.WebSocketUpgradeRequest.handleExce
    ption(WebSocketUpgradeRequest.java:526)
    at org.eclipse.jetty.websocket.client.WebSocketUpgradeRequest.onComplete
    (WebSocketUpgradeRequest.java:520)
    at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNoti
    fier.java:193)
    at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNoti
    fier.java:185)
    at org.eclipse.jetty.client.HttpExchange.notifyFailureComplete(HttpExcha
    nge.java:269)
    at org.eclipse.jetty.client.HttpExchange.abort(HttpExchange.java:240)
    at org.eclipse.jetty.client.HttpConversation.abort(HttpConversation.java
    :141)
    at org.eclipse.jetty.client.HttpRequest.abort(HttpRequest.java:748)
    at org.eclipse.jetty.client.HttpDestination.abort(HttpDestination.java:4
    43)
    at org.eclipse.jetty.client.HttpDestination.failed(HttpDestination.java:
    223)
    at org.eclipse.jetty.client.AbstractConnectionPool$1.failed(AbstractConn
    ectionPool.java:122)
    at org.eclipse.jetty.util.Promise$Wrapper.failed(Promise.java:136)
    at org.eclipse.jetty.client.HttpClient$1$1.failed(HttpClient.java:589)
    at org.eclipse.jetty.client.AbstractHttpClientTransport.connectFailed(Ab
    stractHttpClientTransport.java:154)
    at org.eclipse.jetty.client.AbstractHttpClientTransport$ClientSelectorMa
    nager.connectionFailed(AbstractHttpClientTransport.java:199)
    at org.eclipse.jetty.io.ManagedSelector$Connect.failed(ManagedSelector.j
    ava:659)
    at org.eclipse.jetty.io.ManagedSelector$Connect.access$1300(ManagedSelec
    tor.java:626)
    at org.eclipse.jetty.io.ManagedSelector$ConnectTimeout.run(ManagedSelect
    or.java:681)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
    access$201(Unknown Source)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
    run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Caused by: org.eclipse.jetty.websocket.api.UpgradeException: 0 null
    at org.eclipse.jetty.websocket.client.WebSocketUpgradeRequest.onComplete
    (WebSocketUpgradeRequest.java:513)
    ... 23 more
    Caused by: java.net.SocketTimeoutException: Connect Timeout
    ... 8 more
     
  5. Erel

    Erel Administrator Staff Member Licensed User

    I recommend you to start with running the B4J server on your PC. Once it works you should move it to the server.
     
  6. sasidhar

    sasidhar Active Member Licensed User

    Thanks erel,

    I tried to run jar file locally, but giving error, unable to open the application. Below error shows in command prompt.



    Microsoft Windows [Version 10.0.16299.371]

    (c) 2017 Microsoft Corporation. All rights reserved.

    C:\Users\srinidhi>cd C:\Softwares\basic4android-Licensed\Projects\Samples\WebSockets_push\test

    C:\Softwares\basic4android-Licensed\Projects\Samples\WebSockets_push\test>java -jar WebSocketPush.jar
    Picked up _JAVA_OPTIONS: -Xmx1g -Xms1g
    main._process_globals (java line: 125)
    java.lang.NoClassDefFoundError: javafx/scene/control/Dialog
    at b4j.example.main._process_globals(main.java:125)
    at b4j.example.main.initializeProcessGlobals(main.java:115)
    at b4j.example.main.start(main.java:35)
    at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:319)
    at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:219)
    at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:182)
    at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:179)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:179)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:76)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:17)
    at com.sun.glass.ui.win.WinApplication$3$1.run(WinApplication.java:67)
    at java.lang.Thread.run(Thread.java:744)
    Caused by: java.lang.ClassNotFoundException: javafx.scene.control.Dialog
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    ... 14 more


    C:\Softwares\basic4android-Licensed\Projects\Samples\WebSockets_push\test>
    C:\Softwares\basic4android-Licensed\Projects\Samples\WebSockets_push\test>
    C:\Softwares\basic4android-Licensed\Projects\Samples\WebSockets_push\test>java -jar WebSocketPush.jar
    Picked up _JAVA_OPTIONS: -Xmx1g -Xms1g
    main._process_globals (java line: 125)
    java.lang.NoClassDefFoundError: javafx/scene/control/Dialog
    at b4j.example.main._process_globals(main.java:125)
    at b4j.example.main.initializeProcessGlobals(main.java:115)
    at b4j.example.main.start(main.java:35)
    at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:319)
    at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:219)
    at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:182)
    at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:179)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:179)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:76)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:17)
    at com.sun.glass.ui.win.WinApplication$3$1.run(WinApplication.java:67)
    at java.lang.Thread.run(Thread.java:744)
    Caused by: java.lang.ClassNotFoundException: javafx.scene.control.Dialog
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    ... 14 more


    thanks
    sasidhar

    t
     
  7. sasidhar

    sasidhar Active Member Licensed User

    Hi Erel,

    Updated jdk 8.x, now working, but still same issue coming.

    upload_2018-5-8_22-34-52.png
     
  8. Erel

    Erel Administrator Staff Member Licensed User

    The link is incorrect. It should be 127.0.0.1 if you are running the client app on the same computer as the server.
     
  9. sasidhar

    sasidhar Active Member Licensed User

  10. Erel

    Erel Administrator Staff Member Licensed User

    Please upload your client and server projects.
     
  11. sasidhar

    sasidhar Active Member Licensed User

    Attached Files:

  12. DonManfred

    DonManfred Expert Licensed User

    The comment from erel was:
    I don´t see any Project... How do you expect we could help with this less on information?
     
    Last edited: May 18, 2018
  13. sasidhar

    sasidhar Active Member Licensed User

    Hi Don,
    Understand, but Zip file size is big (around 6MB), unable to send. How can i send any other option.
    I have changed only IP and URL in both example projects given in URL.

    thanks
    sasidhar
     
  14. DonManfred

    DonManfred Expert Licensed User

    Both project should not exceed the limit if you use File-Export as zip from the IDE.
    The ZIP is usually a few kb....

    What makes the zip 6mb big???
     
  15. sasidhar

    sasidhar Active Member Licensed User

    Ok will share as suggested.

    thanks
    sasidhar
     
  16. sasidhar

    sasidhar Active Member Licensed User

    Hi ,
    Attached code. for both server and client application
    thanks
    sasidhar
     

    Attached Files:

  17. sasidhar

    sasidhar Active Member Licensed User

    When I run jb4J jar file I get below error.

    java.net.ConnectException: Connection refused: no further information
    at java.base/sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
    at org.eclipse.jetty.io.SelectorManager.doFinishConnect(SelectorManager.java:320)
    at org.eclipse.jetty.io.ManagedSelector.processConnect(ManagedSelector.java:350)
    at org.eclipse.jetty.io.ManagedSelector.access$900(ManagedSelector.java:61)
    at org.eclipse.jetty.io.ManagedSelector$SelectorProducer.processSelected(ManagedSelector.java:282)
    at org.eclipse.jetty.io.ManagedSelector$SelectorProducer.produce(ManagedSelector.java:177)
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:211)
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:126)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:673)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:591)
    at java.base/java.lang.Thread.run(Thread.java:844)
    org.eclipse.jetty.websocket.api.UpgradeException: 0 null
    WebSocket Closed: Connection refused: no further information
    at org.eclipse.jetty.websocket.client.WebSocketUpgradeRequest.onComplete(WebSocketUpgradeRequest.java:520)
    at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:193)
    at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:185)
    at org.eclipse.jetty.client.HttpExchange.notifyFailureComplete(HttpExchange.java:269)
    at org.eclipse.jetty.client.HttpExchange.abort(HttpExchange.java:240)
    at org.eclipse.jetty.client.HttpConversation.abort(HttpConversation.java:141)
    at org.eclipse.jetty.client.HttpRequest.abort(HttpRequest.java:748)
    at org.eclipse.jetty.client.HttpDestination.abort(HttpDestination.java:443)
    at org.eclipse.jetty.client.HttpDestination.failed(HttpDestination.java:223)
    at org.eclipse.jetty.client.AbstractConnectionPool$1.failed(AbstractConnectionPool.java:122)
    at org.eclipse.jetty.util.Promise$Wrapper.failed(Promise.java:136)
    at org.eclipse.jetty.client.HttpClient$1$1.failed(HttpClient.java:589)
    at org.eclipse.jetty.client.AbstractHttpClientTransport.connectFailed(AbstractHttpClientTransport.java:154)
    at org.eclipse.jetty.client.AbstractHttpClientTransport$ClientSelectorManager.connectionFailed(AbstractHttpClientTransport.java:199)
    at org.eclipse.jetty.io.ManagedSelector$Connect.failed(ManagedSelector.java:659)
    at org.eclipse.jetty.io.ManagedSelector$Connect.access$1300(ManagedSelector.java:626)
    at org.eclipse.jetty.io.ManagedSelector.processConnect(ManagedSelector.java:380)
    at org.eclipse.jetty.io.ManagedSelector.access$900(ManagedSelector.java:61)
    at org.eclipse.jetty.io.ManagedSelector$SelectorProducer.processSelected(ManagedSelector.java:282)
    at org.eclipse.jetty.io.ManagedSelector$SelectorProducer.produce(ManagedSelector.java:177)
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:211)
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:126)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:673)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:591)
    at java.base/java.lang.Thread.run(Thread.java:844)
    java.util.concurrent.ExecutionException: java.net.ConnectException: Connection refused: no further information
    at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395)
    at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1999)
    at anywhersoftware.b4j.objects.WebSocketClientWrapper.Close(WebSocketClientWrapper.java:76)
    at anywhersoftware.b4j.objects.WebSocketClientWrapper$WSHandler.onWebSocketError(WebSocketClientWrapper.java:118)
    at org.eclipse.jetty.websocket.common.events.JettyListenerEventDriver.onError(JettyListenerEventDriver.java:112)
    at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.incomingError(AbstractEventDriver.java:96)
    at org.eclipse.jetty.websocket.client.WebSocketUpgradeRequest.handleException(WebSocketUpgradeRequest.java:526)
    at org.eclipse.jetty.websocket.client.WebSocketUpgradeRequest.onComplete(WebSocketUpgradeRequest.java:520)
    at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:193)
    at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:185)
    at org.eclipse.jetty.client.HttpExchange.notifyFailureComplete(HttpExchange.java:269)
    at org.eclipse.jetty.client.HttpExchange.abort(HttpExchange.java:240)
    at org.eclipse.jetty.client.HttpConversation.abort(HttpConversation.java:141)
    at org.eclipse.jetty.client.HttpRequest.abort(HttpRequest.java:748)
    at org.eclipse.jetty.client.HttpDestination.abort(HttpDestination.java:443)
    at org.eclipse.jetty.client.HttpDestination.failed(HttpDestination.java:223)
    at org.eclipse.jetty.client.AbstractConnectionPool$1.failed(AbstractConnectionPool.java:122)
    at org.eclipse.jetty.util.Promise$Wrapper.failed(Promise.java:136)
    at org.eclipse.jetty.client.HttpClient$1$1.failed(HttpClient.java:589)
    at org.eclipse.jetty.client.AbstractHttpClientTransport.connectFailed(AbstractHttpClientTransport.java:154)
    at org.eclipse.jetty.client.AbstractHttpClientTransport$ClientSelectorManager.connectionFailed(AbstractHttpClientTransport.java:199)
    at org.eclipse.jetty.io.ManagedSelector$Connect.failed(ManagedSelector.java:659)
    at org.eclipse.jetty.io.ManagedSelector$Connect.access$1300(ManagedSelector.java:626)
    at org.eclipse.jetty.io.ManagedSelector.processConnect(ManagedSelector.java:380)
    at org.eclipse.jetty.io.ManagedSelector.access$900(ManagedSelector.java:61)
    at org.eclipse.jetty.io.ManagedSelector$SelectorProducer.processSelected(ManagedSelector.java:282)
    at org.eclipse.jetty.io.ManagedSelector$SelectorProducer.produce(ManagedSelector.java:177)
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:211)
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:126)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:673)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:591)
    at java.base/java.lang.Thread.run(Thread.java:844)
    Caused by: java.net.ConnectException: Connection refused: no further information
    at java.base/sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
    at org.eclipse.jetty.io.SelectorManager.doFinishConnect(SelectorManager.java:320)
    at org.eclipse.jetty.io.ManagedSelector.processConnect(ManagedSelector.java:350)
    ... 8 more
    java.net.ConnectException: Connection refused: no further information
    at java.base/sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
    at org.eclipse.jetty.io.SelectorManager.doFinishConnect(SelectorManager.java:320)
    at org.eclipse.jetty.io.ManagedSelector.processConnect(ManagedSelector.java:350)
    at org.eclipse.jetty.io.ManagedSelector.access$900(ManagedSelector.java:61)
    at org.eclipse.jetty.io.ManagedSelector$SelectorProducer.processSelected(ManagedSelector.java:282)
    at org.eclipse.jetty.io.ManagedSelector$SelectorProducer.produce(ManagedSelector.java:177)
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:211)
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:126)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:673)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:591)
    at java.base/java.lang.Thread.run(Thread.java:844)
    org.eclipse.jetty.websocket.api.UpgradeException: 0 null
    WebSocket Closed: Connection refused: no further information
    at org.eclipse.jetty.websocket.client.WebSocketUpgradeRequest.onComplete(WebSocketUpgradeRequest.java:520)
    at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:193)
    at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:185)
    at org.eclipse.jetty.client.HttpExchange.notifyFailureComplete(HttpExchange.java:269)
    at org.eclipse.jetty.client.HttpExchange.abort(HttpExchange.java:240)
    at org.eclipse.jetty.client.HttpConversation.abort(HttpConversation.java:141)
    at org.eclipse.jetty.client.HttpRequest.abort(HttpRequest.java:748)
    at org.eclipse.jetty.client.HttpDestination.abort(HttpDestination.java:443)
    at org.eclipse.jetty.client.HttpDestination.failed(HttpDestination.java:223)
    at org.eclipse.jetty.client.AbstractConnectionPool$1.failed(AbstractConnectionPool.java:122)
    at org.eclipse.jetty.util.Promise$Wrapper.failed(Promise.java:136)
    at org.eclipse.jetty.client.HttpClient$1$1.failed(HttpClient.java:589)
    at org.eclipse.jetty.client.AbstractHttpClientTransport.connectFailed(AbstractHttpClientTransport.java:154)
    at org.eclipse.jetty.client.AbstractHttpClientTransport$ClientSelectorManager.connectionFailed(AbstractHttpClientTransport.java:199)
    at org.eclipse.jetty.io.ManagedSelector$Connect.failed(ManagedSelector.java:659)
    at org.eclipse.jetty.io.ManagedSelector$Connect.access$1300(ManagedSelector.java:626)
    at org.eclipse.jetty.io.ManagedSelector.processConnect(ManagedSelector.java:380)
    at org.eclipse.jetty.io.ManagedSelector.access$900(ManagedSelector.java:61)
    at org.eclipse.jetty.io.ManagedSelector$SelectorProducer.processSelected(ManagedSelector.java:282)
    at org.eclipse.jetty.io.ManagedSelector$SelectorProducer.produce(ManagedSelector.java:177)
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:211)
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:126)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:673)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:591)
    at java.base/java.lang.Thread.run(Thread.java:844)
    java.util.concurrent.ExecutionException: java.net.ConnectException: Connection refused: no further information
    at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395)
    at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1999)
    at anywhersoftware.b4j.objects.WebSocketClientWrapper.Close(WebSocketClientWrapper.java:76)
    at anywhersoftware.b4j.objects.WebSocketClientWrapper$WSHandler.onWebSocketError(WebSocketClientWrapper.java:118)
    at org.eclipse.jetty.websocket.common.events.JettyListenerEventDriver.onError(JettyListenerEventDriver.java:112)
    at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.incomingError(AbstractEventDriver.java:96)
    at org.eclipse.jetty.websocket.client.WebSocketUpgradeRequest.handleException(WebSocketUpgradeRequest.java:526)
    at org.eclipse.jetty.websocket.client.WebSocketUpgradeRequest.onComplete(WebSocketUpgradeRequest.java:520)
    at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:193)
    at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:185)
    at org.eclipse.jetty.client.HttpExchange.notifyFailureComplete(HttpExchange.java:269)
    at org.eclipse.jetty.client.HttpExchange.abort(HttpExchange.java:240)
    at org.eclipse.jetty.client.HttpConversation.abort(HttpConversation.java:141)
    at org.eclipse.jetty.client.HttpRequest.abort(HttpRequest.java:748)
    at org.eclipse.jetty.client.HttpDestination.abort(HttpDestination.java:443)
    at org.eclipse.jetty.client.HttpDestination.failed(HttpDestination.java:223)
    at org.eclipse.jetty.client.AbstractConnectionPool$1.failed(AbstractConnectionPool.java:122)
    at org.eclipse.jetty.util.Promise$Wrapper.failed(Promise.java:136)
    at org.eclipse.jetty.client.HttpClient$1$1.failed(HttpClient.java:589)
    at org.eclipse.jetty.client.AbstractHttpClientTransport.connectFailed(AbstractHttpClientTransport.java:154)
    at org.eclipse.jetty.client.AbstractHttpClientTransport$ClientSelectorManager.connectionFailed(AbstractHttpClientTransport.java:199)
    at org.eclipse.jetty.io.ManagedSelector$Connect.failed(ManagedSelector.java:659)
    at org.eclipse.jetty.io.ManagedSelector$Connect.access$1300(ManagedSelector.java:626)
    at org.eclipse.jetty.io.ManagedSelector.processConnect(ManagedSelector.java:380)
    at org.eclipse.jetty.io.ManagedSelector.access$900(ManagedSelector.java:61)
    at org.eclipse.jetty.io.ManagedSelector$SelectorProducer.processSelected(ManagedSelector.java:282)
    at org.eclipse.jetty.io.ManagedSelector$SelectorProducer.produce(ManagedSelector.java:177)
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:211)
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:126)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:673)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:591)
    at java.base/java.lang.Thread.run(Thread.java:844)
    Caused by: java.net.ConnectException: Connection refused: no further information
    at java.base/sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
    at org.eclipse.jetty.io.SelectorManager.doFinishConnect(SelectorManager.java:320)
    at org.eclipse.jetty.io.ManagedSelector.processConnect(ManagedSelector.java:350)
    ... 8 more
     
  18. Erel

    Erel Administrator Staff Member Licensed User

    Very difficult to read this post with all these endless logs. You should use code tags or any other tags you like so the logs will be scrollable.

    The B4J project is a client, not a server.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice