Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Jetty9 WebSocket Client - SessionFactory.createSession causes java.lang.NullPointerException

Joakim,

According to
http://stackoverflow.com/questions/8578441/can-the-android-sdk-work-with-jdk-1-7/9567402#9567402
The last comment says
>Starting from build tools 19, Android has full support for Java 1.7.
So you can set 1.7 as source and target for compilation.
Support for this is from Android studio 0.3.2.
Android kitkat has full support of JAVA 1.7 API, but most of language
feature from 1.7 you can use on the old androids too. Except "try with
resources".
<

and,  actually I use API version19 for build tool, and chose Java1.7
for JDK on my Android studio.
Java1.6 is already out of dev., and Jetty9 runs on 1.7(I noticed on
your article), so I switched.

My test is under:

MacOSX 10.9.1 (dev and host OS)
app Runs on GenymotionEmulator - Android 4.2.2 (Android Device)
Android studio 0.4.2 (IDE)
Android API version 19 for build tools (SDK) Targeting Android4.1+
Java 1.7 (JDK)
Jetty9.1.1 (websocket-api-9.1.1.v20140108.jar etc)


Here is my test code based on
http://www.eclipse.org/jetty/documentation/current/jetty-websocket-client-api.html

 just adding the
SimpleEchoClient.java code core
on after MainActivity.onCreate
and
SimpleEchoSocket.java with just package-name modification

//================================================
import org.eclipse.jetty.websocket.client.ClientUpgradeRequest;
import org.eclipse.jetty.websocket.client.WebSocketClient;
public class MainActivity extends Activity
{
    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        System.out.println("-------App Launched Java-----------------");

        String destUri = "ws://echo.websocket.org";
        WebSocketClient client = new WebSocketClient();
        SimpleEchoSocket socket = new SimpleEchoSocket();
        try {
            client.start();
            URI echoUri = new URI(destUri);
            ClientUpgradeRequest request = new ClientUpgradeRequest();
            client.connect(socket, echoUri, request);
            System.out.printf("Connecting to : %s%n", echoUri);
            socket.awaitClose(5, TimeUnit.SECONDS);
        } catch (Throwable t) {
            t.printStackTrace();
        } finally {
            try {
                client.stop();
            } catch (Exception e) {
                e.printStackTrace();
            }
        }

//................................................................

//============================================

Then here is the logcat on AndroidStudio

01-16 09:39:32.477    8581-8581/? I/System.out﹕ -------App Launched
Java-----------------
01-16 09:39:32.501    8581-8585/? D/dalvikvm﹕ GC_CONCURRENT freed
147K, 4% free 5420K/5604K, paused 1ms+1ms, total 4ms
01-16 09:39:32.517    8581-8585/? D/dalvikvm﹕ GC_CONCURRENT freed
222K, 5% free 5607K/5876K, paused 1ms+1ms, total 4ms
01-16 09:39:32.541    8581-8585/? D/dalvikvm﹕ GC_CONCURRENT freed
255K, 5% free 5778K/6068K, paused 2ms+1ms, total 16ms
01-16 09:39:32.561    8581-8585/? D/dalvikvm﹕ GC_CONCURRENT freed
171K, 4% free 5992K/6200K, paused 2ms+0ms, total 5ms
01-16 09:39:32.569    8581-8581/? I/System.out﹕ 09:39:32,506 |-WARN in
ch.qos.logback.classic.LoggerContext[default] - No config in SD card
01-16 09:39:32.569    8581-8581/? I/System.out﹕ 09:39:32,507 |-INFO in
ch.qos.logback.classic.LoggerContext[default] - Found resource
[AndroidManifest.xml] at
[jar:file:/data/app/com.example.app-1.apk!/AndroidManifest.xml]
01-16 09:39:32.569    8581-8581/? I/System.out﹕ 09:39:32,568 |-INFO in
ch.qos.logback.classic.LoggerContext[default] - Could NOT find
resource [assets/logback-test.xml]
01-16 09:39:32.569    8581-8581/? I/System.out﹕ 09:39:32,568 |-INFO in
ch.qos.logback.classic.LoggerContext[default] - Could NOT find
resource [assets/logback.xml]
01-16 09:39:32.569    8581-8581/? I/System.out﹕ 09:39:32,568 |-INFO in
ch.qos.logback.classic.LoggerContext[default] - Setting up default
configuration.
01-16 09:39:32.569    8581-8581/? D/org.eclipse.jetty.util.log﹕
Logging to Logger[org.eclipse.jetty.util.log] via
org.eclipse.jetty.util.log.Slf4jLog
01-16 09:39:32.577    8581-8585/? D/dalvikvm﹕ GC_CONCURRENT freed
304K, 6% free 6074K/6416K, paused 1ms+1ms, total 5ms
01-16 09:39:32.581    8581-8581/? D/dalvikvm﹕ GC_FOR_ALLOC freed 663K,
14% free 5687K/6592K, paused 4ms, total 4ms
01-16 09:39:32.597    8581-8585/? D/dalvikvm﹕ GC_CONCURRENT freed
217K, 12% free 5854K/6592K, paused 2ms+0ms, total 6ms
01-16 09:39:32.613    8581-8585/? D/dalvikvm﹕ GC_CONCURRENT freed
169K, 8% free 6069K/6592K, paused 1ms+0ms, total 5ms
01-16 09:39:32.617    8581-8581/?
D/org.eclipse.jetty.util.component.ContainerLifeCycle﹕
org.eclipse.jetty.websocket.client.WebSocketClient@533ef5d4 added
{null,POJO}
01-16 09:39:32.617    8581-8581/?
D/org.eclipse.jetty.util.component.ContainerLifeCycle﹕
org.eclipse.jetty.websocket.client.WebSocketClient@533ef5d4 added
{org.eclipse.jetty.io.MappedByteBufferPool@533c09bc,POJO}
01-16 09:39:32.617    8581-8581/?
D/org.eclipse.jetty.util.component.AbstractLifeCycle﹕ starting
org.eclipse.jetty.websocket.client.WebSocketClient@533ef5d4
01-16 09:39:32.617    8581-8581/?
D/org.eclipse.jetty.websocket.client.WebSocketClient﹕ Starting
org.eclipse.jetty.websocket.client.WebSocketClient@533ef5d4
01-16 09:39:32.617    8581-8581/?
D/org.eclipse.jetty.util.component.ContainerLifeCycle﹕
org.eclipse.jetty.websocket.client.WebSocketClient@533ef5d4 added
{org.eclipse.jetty.util.thread.ScheduledExecutorScheduler@533eeda4,AUTO}
01-16 09:39:32.617    8581-8581/?
D/org.eclipse.jetty.util.component.AbstractLifeCycle﹕ starting
org.eclipse.jetty.util.thread.ScheduledExecutorScheduler@533eeda4
01-16 09:39:32.617    8581-8581/?
D/org.eclipse.jetty.util.component.AbstractLifeCycle﹕ STARTED
org.eclipse.jetty.util.thread.ScheduledExecutorScheduler@533eeda4
01-16 09:39:32.621    8581-8581/?
D/org.eclipse.jetty.websocket.client.WebSocketClient﹕ Started
org.eclipse.jetty.websocket.client.WebSocketClient@533ef5d4
01-16 09:39:32.621    8581-8581/?
D/org.eclipse.jetty.util.component.AbstractLifeCycle﹕ STARTED
org.eclipse.jetty.websocket.client.WebSocketClient@533ef5d4
01-16 09:39:32.621    8581-8581/? W/dalvikvm﹕ VFY: unable to resolve
static field 1386 (UTF_8) in Ljava/nio/charset/StandardCharsets;
01-16 09:39:32.621    8581-8581/? D/dalvikvm﹕ VFY: replacing opcode
0x62 at 0x001b
01-16 09:39:32.621    8581-8581/? W/dalvikvm﹕ VFY: unable to resolve
static field 1383 (ISO_8859_1) in Ljava/nio/charset/StandardCharsets;
01-16 09:39:32.621    8581-8581/? D/dalvikvm﹕ VFY: replacing opcode
0x62 at 0x0002
01-16 09:39:32.621    8581-8581/? W/dalvikvm﹕ VFY: unable to resolve
static field 1383 (ISO_8859_1) in Ljava/nio/charset/StandardCharsets;
01-16 09:39:32.621    8581-8581/? D/dalvikvm﹕ VFY: replacing opcode
0x62 at 0x0002
01-16 09:39:32.621    8581-8581/? W/dalvikvm﹕ VFY: unable to resolve
static field 1386 (UTF_8) in Ljava/nio/charset/StandardCharsets;
01-16 09:39:32.621    8581-8581/? D/dalvikvm﹕ VFY: replacing opcode
0x62 at 0x001b
01-16 09:39:32.625    8581-8581/? W/dalvikvm﹕ VFY: unable to resolve
static field 1383 (ISO_8859_1) in Ljava/nio/charset/StandardCharsets;
01-16 09:39:32.625    8581-8581/? D/dalvikvm﹕ VFY: replacing opcode
0x62 at 0x0000
01-16 09:39:32.625    8581-8581/? W/dalvikvm﹕ VFY: unable to resolve
static field 1386 (UTF_8) in Ljava/nio/charset/StandardCharsets;
01-16 09:39:32.625    8581-8581/? D/dalvikvm﹕ VFY: replacing opcode
0x62 at 0x0000
01-16 09:39:32.625    8581-8581/? W/dalvikvm﹕ VFY: unable to resolve
static field 1386 (UTF_8) in Ljava/nio/charset/StandardCharsets;
01-16 09:39:32.625    8581-8581/? D/dalvikvm﹕ VFY: replacing opcode
0x62 at 0x0002
01-16 09:39:32.625    8581-8581/? I/dalvikvm﹕ DexOpt: unable to
optimize static field ref 0x0567 at 0x1f in
Lorg/eclipse/jetty/util/StringUtil;.<clinit>
01-16 09:39:32.625    8581-8581/? I/dalvikvm﹕ DexOpt: unable to
optimize static field ref 0x0569 at 0x23 in
Lorg/eclipse/jetty/util/StringUtil;.<clinit>
01-16 09:39:32.625    8581-8581/? I/dalvikvm﹕ DexOpt: unable to
optimize static field ref 0x0568 at 0x27 in
Lorg/eclipse/jetty/util/StringUtil;.<clinit>
01-16 09:39:32.625    8581-8581/? W/dalvikvm﹕ VFY: unable to resolve
static field 1383 (ISO_8859_1) in Ljava/nio/charset/StandardCharsets;
01-16 09:39:32.625    8581-8581/? D/dalvikvm﹕ VFY: replacing opcode
0x62 at 0x0002
01-16 09:39:32.625    8581-8581/? W/dalvikvm﹕ Exception
Ljava/lang/NoClassDefFoundError; thrown while initializing
Lorg/eclipse/jetty/util/StringUtil;
01-16 09:39:32.625    8581-8581/? W/System.err﹕
java.lang.ExceptionInInitializerError
01-16 09:39:32.625    8581-8581/? W/System.err﹕ at
org.eclipse.jetty.websocket.client.WebSocketClient.connect(WebSocketClient.java:146)
01-16 09:39:32.625    8581-8581/? W/System.err﹕ at
org.eclipse.jetty.websocket.client.WebSocketClient.connect(WebSocketClient.java:130)
01-16 09:39:32.625    8581-8581/? W/System.err﹕ at
com.example.app.MainActivity.onCreate(MainActivity.java:42)
01-16 09:39:32.625    8581-8581/? W/System.err﹕ at
android.app.Activity.performCreate(Activity.java:5104)
01-16 09:39:32.625    8581-8581/? W/System.err﹕ at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
01-16 09:39:32.625    8581-8581/? W/System.err﹕ at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
01-16 09:39:32.625    8581-8581/? W/System.err﹕ at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
01-16 09:39:32.625    8581-8581/? W/System.err﹕ at
android.app.ActivityThread.access$600(ActivityThread.java:141)
01-16 09:39:32.629    8581-8581/? W/System.err﹕ at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
01-16 09:39:32.629    8581-8581/? W/System.err﹕ at
android.os.Handler.dispatchMessage(Handler.java:99)
01-16 09:39:32.629    8581-8581/? W/System.err﹕ at
android.os.Looper.loop(Looper.java:137)
01-16 09:39:32.629    8581-8581/? W/System.err﹕ at
android.app.ActivityThread.main(ActivityThread.java:5041)
01-16 09:39:32.629    8581-8581/? W/System.err﹕ at
java.lang.reflect.Method.invokeNative(Native Method)
01-16 09:39:32.633    8581-8581/? W/System.err﹕ at
java.lang.reflect.Method.invoke(Method.java:511)
01-16 09:39:32.633    8581-8581/? W/System.err﹕ at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
01-16 09:39:32.633    8581-8581/? W/System.err﹕ at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
01-16 09:39:32.633    8581-8581/? W/System.err﹕ at
dalvik.system.NativeStart.main(Native Method)
01-16 09:39:32.633    8581-8581/? W/System.err﹕ Caused by:
java.lang.NoClassDefFoundError: java.nio.charset.StandardCharsets
01-16 09:39:32.633    8581-8581/? W/System.err﹕ at
org.eclipse.jetty.util.StringUtil.<clinit>(StringUtil.java:57)
01-16 09:39:32.633    8581-8581/? W/System.err﹕ ... 17 more
01-16 09:39:32.633    8581-8581/?
D/org.eclipse.jetty.util.component.AbstractLifeCycle﹕ stopping
org.eclipse.jetty.websocket.client.WebSocketClient@533ef5d4
01-16 09:39:32.633    8581-8581/?
D/org.eclipse.jetty.websocket.client.WebSocketClient﹕ Stopping
org.eclipse.jetty.websocket.client.WebSocketClient@533ef5d4
01-16 09:39:32.633    8581-8581/?
D/org.eclipse.jetty.util.component.AbstractLifeCycle﹕ stopping
org.eclipse.jetty.util.thread.ScheduledExecutorScheduler@533eeda4
01-16 09:39:32.633    8581-8581/?
D/org.eclipse.jetty.util.component.AbstractLifeCycle﹕ STOPPED
org.eclipse.jetty.util.thread.ScheduledExecutorScheduler@533eeda4
01-16 09:39:32.633    8581-8581/?
I/org.eclipse.jetty.websocket.client.WebSocketClient﹕ Stopped
org.eclipse.jetty.websocket.client.WebSocketClient@533ef5d4
01-16 09:39:32.633    8581-8581/?
D/org.eclipse.jetty.util.component.AbstractLifeCycle﹕ STOPPED
org.eclipse.jetty.websocket.client.WebSocketClient@533ef5d4
01-16 09:39:32.725    8581-8581/? D/libEGL﹕ loaded
/system/lib/egl/libEGL_emulation.so
0
.....................

I really hope you invenstigate it and give me a good feedback soon :)

Thanks!

Regards,

Ken

On Thu, Jan 16, 2014 at 9:19 AM, Joakim Erdfelt <joakim@xxxxxxxxxxx> wrote:
> Have not tested it with Android.
> I'm a bit surprised that Android supports Java 1.7 now.
> Last time I looked it didn't support that version of Java yet (i have a
> project for the weekend :-).
>
> Do you have anything more on the stacktrace for the
> ExceptionInInitializerError?
>
> --
> Joakim Erdfelt <joakim@xxxxxxxxxxx>
> webtide.com - intalio.com/jetty
> Expert advice, services and support from from the Jetty & CometD experts
> eclipse.org/jetty - cometd.org
>
>
> On Wed, Jan 15, 2014 at 4:31 PM, Ken OKABE <kenokabe@xxxxxxxxx> wrote:
>>
>> When I run the example
>>
>> http://www.eclipse.org/jetty/documentation/current/jetty-websocket-client-api.html
>>  on Android 4.2 emulator (with Java SDK 1.7),
>>
>> I've got an error :
>>  java.lang.ExceptionInInitializerError
>> on
>>  client.connect(socket, echoUri, request);
>>
>>
>> I'd like to confirm if Jetty9 works on Android with Java7.
>> I don't know the reason it's not working.
>>
>> Thanks.
>>
>> On Thu, Jan 16, 2014 at 6:41 AM, Ken OKABE <kenokabe@xxxxxxxxx> wrote:
>> > PS.
>> >
>> > http://download.eclipse.org/jetty/stable-9/apidocs/org/eclipse/jetty/websocket/client/ClientUpgradeRequest.html
>> >
>> > Allowing a generate from a UpgradeRequest
>> >
>> > String generate()
>> > String getKey()
>> > void setCookiesFrom(CookieStore cookieStore)
>> > void setRequestURI(URI uri)
>> >
>> > I guessed this is for 're-use' the instance with another URI or Cookie?
>> >
>> > If so, I think this value is not needed to such a  SimpleEchoClient
>> > example, and I also would omit it.
>> >
>> > Regards,
>> >
>> > Ken
>> >
>> > On Thu, Jan 16, 2014 at 6:33 AM, Ken OKABE <kenokabe@xxxxxxxxx> wrote:
>> >> Joakim,
>> >>
>> >> I found the example of files you provided is identical to
>> >>
>> >> http://www.eclipse.org/jetty/documentation/current/jetty-websocket-client-api.html
>> >> which is handy to overview in a single page, so just for future
>> >> reference.
>> >>
>> >> Everything seems clear to me except one thing.
>> >> In the simple example, I found
>> >>
>> >> ClientUpgradeRequest request = new ClientUpgradeRequest();
>> >> client.connect(socket, echoUri, request);
>> >>
>> >> and I could not find any information for what exactly the
>> >> ClientUpgradeRequest is.
>> >>
>> >> Referring to
>> >>
>> >>
>> >> http://download.eclipse.org/jetty/stable-9/apidocs/org/eclipse/jetty/websocket/client/WebSocketClient.html
>> >>
>> >> Future<Session> connect(Object websocket, URI toUri)
>> >> Future<Session> connect(Object websocket, URI toUri,
>> >> ClientUpgradeRequest request)
>> >>
>> >> You can omit ClientUpgradeRequest, and the example does not tweak this
>> >> value.
>> >>
>> >> Could you give me some pointer for what ClientUpgradeRequest is.
>> >>
>> >> Thanks again.
>> >>
>> >> Ken
>> >>
>> >> On Thu, Jan 16, 2014 at 6:07 AM, Joakim Erdfelt <joakim@xxxxxxxxxxx>
>> >> wrote:
>> >>> I need to write an update to that article.
>> >>>
>> >>> --
>> >>> Joakim Erdfelt <joakim@xxxxxxxxxxx>
>> >>> webtide.com - intalio.com/jetty
>> >>> Expert advice, services and support from from the Jetty & CometD
>> >>> experts
>> >>> eclipse.org/jetty - cometd.org
>> >>>
>> >>>
>> >>> On Wed, Jan 15, 2014 at 2:05 PM, Ken OKABE <kenokabe@xxxxxxxxx> wrote:
>> >>>>
>> >>>> Hi Joakim Erdfelt,
>> >>>>
>> >>>> Thanks to your advice, I understand.
>> >>>>
>> >>>> Probably, I can get through this issue since every factor seems
>> >>>> well-defined to me by your answer.
>> >>>>
>> >>>> During this research, I've read your article:
>> >>>>
>> >>>> http://webtide.intalio.com/2012/10/jetty-9-updated-websocket-api/
>> >>>>
>> >>>>
>> >>>> Regards,
>> >>>>
>> >>>> Ken
>> >>>>
>> >>>>
>> >>>>
>> >>>> On Thu, Jan 16, 2014 at 5:15 AM, Joakim Erdfelt <joakim@xxxxxxxxxxx>
>> >>>> wrote:
>> >>>> > see a simple example at
>> >>>> >
>> >>>> >
>> >>>> >
>> >>>> > http://git.eclipse.org/c/jetty/org.eclipse.jetty.project.git/tree/jetty-websocket/websocket-client/src/test/java/examples?id=jetty-9.1.1.v20140108
>> >>>> >
>> >>>> > There's no need to be mucking about with WebSocketSessionFactory,
>> >>>> > EventDriver, or LogicalConnection.
>> >>>> > Just keep it simple, use the socket you pass in as your
>> >>>> > communications
>> >>>> > channel.
>> >>>> > The Socket is configured by you to receive messages, and you use
>> >>>> > the
>> >>>> > session
>> >>>> > (obtained during socket open) to get information about the
>> >>>> > connection.
>> >>>> > Use the session.getRemote() to send messages.
>> >>>> >
>> >>>> >
>> >>>> > --
>> >>>> > Joakim Erdfelt <joakim@xxxxxxxxxxx>
>> >>>> > webtide.com - intalio.com/jetty
>> >>>> > Expert advice, services and support from from the Jetty & CometD
>> >>>> > experts
>> >>>> > eclipse.org/jetty - cometd.org
>> >>>> >
>> >>>> >
>> >>>> > On Wed, Jan 15, 2014 at 12:54 PM, Ken OKABE <kenokabe@xxxxxxxxx>
>> >>>> > wrote:
>> >>>> >>
>> >>>> >> Hi, I'm new to Jerry, and trying to implement WebSocket Client on
>> >>>> >> Jetty9.
>> >>>> >>
>> >>>> >> I saw an example on Jetty8.
>> >>>> >>
>> >>>> >> org.eclipse.jetty.websocket Class WebSocketClient
>> >>>> >>
>> >>>> >>
>> >>>> >>
>> >>>> >>
>> >>>> >> http://archive.eclipse.org/jetty/8.0.0.v20110901/apidocs/org/eclipse/jetty/websocket/WebSocketClient.html
>> >>>> >>
>> >>>> >> to create a new instance of WebSocketClient is :
>> >>>> >> //=====================================================
>> >>>> >>    WebSocketClientFactory factory = new WebSocketClientFactory();
>> >>>> >>    factory.start();
>> >>>> >>
>> >>>> >>    WebSocketClient client = factory.newWebSocketClient();
>> >>>> >>    // Configure the client
>> >>>> >>
>> >>>> >>    WebSocket.Connection connection = client.open(new
>> >>>> >> URI("ws://127.0.0.1:8080/"), new WebSocket.OnTextMessage()
>> >>>> >>    {
>> >>>> >>      public void onOpen(Connection connection)
>> >>>> >>      {
>> >>>> >>        // open notification
>> >>>> >>      }
>> >>>> >>
>> >>>> >>      public void onClose(int closeCode, String message)
>> >>>> >>      {
>> >>>> >>        // close notification
>> >>>> >>      }
>> >>>> >>
>> >>>> >>      public void onMessage(String data)
>> >>>> >>      {
>> >>>> >>        // handle incoming message
>> >>>> >>      }
>> >>>> >>    }).get(5, TimeUnit.SECONDS);
>> >>>> >>
>> >>>> >>    connection.sendMessage("Hello World");
>> >>>> >> //===========================================================
>> >>>> >>
>> >>>> >> However, I've never seen a document for Jetty9 for this.
>> >>>> >>
>> >>>> >> So far, referring to
>> >>>> >>
>> >>>> >>
>> >>>> >>
>> >>>> >> http://download.eclipse.org/jetty/9.1.0.v20131115/apidocs/org/eclipse/jetty/websocket/common/SessionFactory.html#createSession%28java.net.URI,%20org.eclipse.jetty.websocket.common.events.EventDriver,%20org.eclipse.jetty.websocket.common.LogicalConnection%29
>> >>>> >>
>> >>>> >> //----------------------------------------------
>> >>>> >> WebSocketSession createSession(URI requestURI,
>> >>>> >>                              EventDriver websocket,
>> >>>> >>                              LogicalConnection connection)
>> >>>> >> //----------------------------------------------
>> >>>> >>
>> >>>> >>  I've tried
>> >>>> >>
>> >>>> >> //===========================================================
>> >>>> >>          try
>> >>>> >>             {
>> >>>> >>                 WebSocketSession session =
>> >>>> >> factory.createSession(uri,
>> >>>> >> eventDriver, connection);
>> >>>> >>                 RemoteEndpoint ep = session.getRemote();
>> >>>> >>             }
>> >>>> >>          catch (Exception ex)
>> >>>> >>             {
>> >>>> >>                 System.out.println("=ERROR= " + ex);
>> >>>> >>                 //=ERROR= java.lang.NullPointerException
>> >>>> >>             }
>> >>>> >>
>> >>>> >>         private EventDriver eventDriver = new EventDriver()
>> >>>> >>         {
>> >>>> >>             @Override
>> >>>> >>             public WebSocketPolicy getPolicy()
>> >>>> >>             {
>> >>>> >>                 return null;
>> >>>> >>             }
>> >>>> >>
>> >>>> >>             //......................................
>> >>>> >>
>> >>>> >>             @Override
>> >>>> >>             public void incomingFrame(Frame frame)
>> >>>> >>             {
>> >>>> >>
>> >>>> >>             }
>> >>>> >>         };
>> >>>> >>
>> >>>> >>         private LogicalConnection connection = new
>> >>>> >> LogicalConnection()
>> >>>> >>         {
>> >>>> >>             @Override
>> >>>> >>             public void close()
>> >>>> >>             {
>> >>>> >>
>> >>>> >>             }
>> >>>> >>
>> >>>> >>             //...............................
>> >>>> >>
>> >>>> >>
>> >>>> >>             @Override
>> >>>> >>             public void resume()
>> >>>> >>             {
>> >>>> >>
>> >>>> >>             }
>> >>>> >>         };
>> >>>> >> //===========================================================
>> >>>> >>
>> >>>> >> but I've encounter  java.lang.NullPointerException
>> >>>> >>
>> >>>> >> How do we implement Jetty9 WebSocket Client ??
>> >>>> >>
>> >>>> >> Thanks for your advise.
>> >>>> >>
>> >>>> >> Ken
>> >>>> >> _______________________________________________
>> >>>> >> jetty-users mailing list
>> >>>> >> jetty-users@xxxxxxxxxxx
>> >>>> >> https://dev.eclipse.org/mailman/listinfo/jetty-users
>> >>>> >
>> >>>> >
>> >>>> >
>> >>>> > _______________________________________________
>> >>>> > jetty-users mailing list
>> >>>> > jetty-users@xxxxxxxxxxx
>> >>>> > https://dev.eclipse.org/mailman/listinfo/jetty-users
>> >>>> >
>> >>>> _______________________________________________
>> >>>> jetty-users mailing list
>> >>>> jetty-users@xxxxxxxxxxx
>> >>>> https://dev.eclipse.org/mailman/listinfo/jetty-users
>> >>>
>> >>>
>> >>>
>> >>> _______________________________________________
>> >>> jetty-users mailing list
>> >>> jetty-users@xxxxxxxxxxx
>> >>> https://dev.eclipse.org/mailman/listinfo/jetty-users
>> >>>
>> _______________________________________________
>> jetty-users mailing list
>> jetty-users@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/jetty-users
>
>
>
> _______________________________________________
> jetty-users mailing list
> jetty-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/jetty-users
>


Back to the top