tipper258
Hey folks, anyone else crazy enough to try and build native images from java using graalvm?
The promise is immense, take your java code base and finally be able to run as a single executable, my app that uses the java lightstreamer client is 37k, no messing with jre's, great for a container .... but doesn't work.
Will spend some time trying to figure out if there's a way to make ls work in a native image but wanted to ask if anyone else is working on this?
Getting the following messages:
NO THREADEXECUTOR FACTORY CLASS AVAILABLE, SOMETHING WENT WRONG AT BUILD TIME, CONTACT LIGHTSTREAMER SUPPORT
NO HTTP PROVIDER CLASS AVAILABLE, SOMETHING WENT WRONG AT BUILD TIME, CONTACT LIGHTSTREAMER SUPPORT
Exception in thread "main" java.lang.NullPointerException
at com.lightstreamer.client.session.InternalConnectionOptions.<init>(InternalConnectionOptions.java:62)
at com.lightstreamer.client.LightstreamerClient.<init>(LightstreamerClient.java:136)
at xyz.arwhite.igflows.IGFlows.loggedIn(IGFlows.java:230)
at xyz.arwhite.igflows.IGFlows.go(IGFlows.java:314)
at xyz.arwhite.igflows.IGFlows.main(IGFlows.java:322)
Cheers
Alan
Alessandro.Carioni
Hello,
I don’t know how Graalvm works exactly but the error seems to be caused by a problem during the dynamic class loading of the thread executor and http provider. Indeed Lightstreamer client loads some classes by means of Class.forName.
You should check that the bundle made by Graalvm does contain the following classes:
• com.lightstreamer.client.transport.providers.netty.NettyHttpProviderFactory
• com.lightstreamer.client.transport.providers.oio.OIOHttpProviderFactory
• com.lightstreamer.client.transport.providers.netty.WebSocketProviderFactory
• com.lightstreamer.client.transport.providers.netty.NettyShutdownHook
• com.lightstreamer.client.platform_data.offline.JavaSEOfflineStatus
• com.lightstreamer.util.threads.DefaultExecutorFactory
and the following jars:
• io.netty:netty-codec-http:4.1.46.Final
• io.netty:netty-handler:4.1.46.Final
• io.netty:netty-handler-proxy:4.1.46.Final
• com.lightstreamer:ls-log-adapter-java:1.0.2