javafxgluon-mobilehessian

Gluon with Hessian is not working on iPhone


Hi i have a Gluon Application. It runs on Desktop and deploys (now) to my iPhone.

I am now trying to use Hessian which works on Desktop too. But calling:

HessianProxyFactory factory = new HessianProxyFactory();

fails on iPhone with

java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
... 
at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:100785616)
    at com.sun.glass.ui.View.handleMouseEvent(View.java:100785616)
    at com.sun.glass.ui.View.notifyMouse(View.java:100785616)
    at org.robovm.apple.uikit.UIApplication.main(UIApplication.java:100785616)
    at org.robovm.apple.uikit.UIApplication.main(UIApplication.java:100785616)
    at org.javafxports.jfxmobile.ios.BasicLauncher.main(BasicLauncher.java:100785616)
Caused by: java.lang.NoClassDefFoundError: javax.naming.spi.ObjectFactory
    at java.lang.VMClassLoader.findClassInClasspathForLoader(VMClassLoader.java:86494256)
    at java.lang.PathClassLoader.findClass(PathClassLoader.java:86494256)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:86494256)
    at

Part of my gradle:

dependencies {

    compile 'com.gluonhq:charm:4.1.0'
    compile 'com.airhacks:afterburner.mfx:1.6.3'

    compileNoRetrolambda 'com.caucho:hessian:4.0.7'
    compileNoRetrolambda 'com.google.code.gson:gson:2.3.1'
    compileNoRetrolambda 'org.apache.poi:poi:3.9'
}

jfxmobile {
    downConfig {
        version '3.0.0'
        plugins 'display', 'lifecycle', 'statusbar', 'storage', 'connectivity'
    }

    android {
        manifest = 'src/android/AndroidManifest.xml'
    }
    ios {

        infoPList = file('src/ios/Default-Info.plist')
        forceLinkClasses = [
            'com.caucho.**.*', 
            'com.woanna.**.*', 
            'com.gluonhq.**.*', 
            'io.datafx.**.*', 
            'javax.annotations.**.*', 
            'javax.inject.**.*', 
            'javax.json.**.*', 
            'javax.naming.**.*', 
            'org.glassfish.json.**.*', 
            'com.google.code.gson.**.*', 
            'org.apache.poi.**.*'
        ]
    }
}

Any help is appreciated. Thank you.


Solution

  • i followed the post which José mentioned above. Using a different/smaller hessian library solved this issue so far..

    Post