Search code examples
androidjmsclassnotfoundexceptionkaazing

Kaazing websocket


EXCEPTION: java.lang.ClassNotFoundException: Didn't find class "com.kaazing.net.ws.impl.DefaultWebSocketFactory" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/vendor/lib, /data/cust/lib, /system/lib, /data/datalib]]

Using Android Studio and the demo activity

I have the jars set in the dependencies

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.google.android.gms:play-services:+'
    provided files('libs/com.kaazing.gateway.client.android.jar')
    provided files('libs/com.kaazing.gateway.jms.client.android.jar')
    provided files('libs/geronimo-jms_1.1_spec.jar')

}

--

 if (connectionFactory == null) {
            try {
-------->       connectionFactory = JmsConnectionFactory.createConnectionFactory();
                WebSocketFactory webSocketFactory = connectionFactory.getWebSocketFactory();
                webSocketFactory.setDefaultChallengeHandler(createChallengehandler());
            } catch (JMSException e) {
                e.printStackTrace();
                logMessage("EXCEPTION: " + e.getMessage());
            }
        }

Solution

  • Here are the steps we followed, and worked:

    1. Downloaded Android Studio 1.0
    2. Downloaded JMS 4.0.6 from Kaazing website
    3. Used Import Non-Android Studio project

    Import non-android studio project

    1. Pointed to the [GATEWAY_HOME]/demo/android/src/jms
    2. Ran the app on device