0

I am building a app with javafx, I made everything and generated the jar, when I execute it by double-click it works but when I try by jnlp generate this error:

java.lang.RuntimeException: Problem in callAndWait()
at com.sun.deploy.uitoolkit.impl.fx.FXPluginToolkit$Caller.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$null$164(Unknown Source)
at com.sun.javafx.application.PlatformImpl$$Lambda$44/30410436.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$165(Unknown Source)
at com.sun.javafx.application.PlatformImpl$$Lambda$43/26578524.run(Unknown Source)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$141(Unknown Source)
at com.sun.glass.ui.win.WinApplication$$Lambda$35/1263764.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Caused by: java.lang.NoClassDefFoundError: javax/ws/rs/client/ClientBuilder
at ao.co.diplomas.gui.main.MainFX.<clinit>(MainFX.java:23)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at com.sun.javafx.applet.FXApplet2$1.call(Unknown Source)
... 11 more
Caused by: java.lang.ClassNotFoundException: javax.ws.rs.client.ClientBuilder
at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)
at sun.plugin2.applet.JNLP2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 18 more

JNLP

<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0" xmlns:jfx="http://javafx.com"  href="Sistem.jnlp"
    codebase="http://10.0.0.37:8080/Sistem/file"
    >
<information>
    <title>Sistem</title>
    <vendor>xxx</vendor>
    <icon kind="splash" href="../splash.png"/>
    <description>Sistem</description>
    <homepage href="http://10.0.0.37:8080/Sistem/index.xhtml"/>      
    <shortcut online="true" install="false">
        <desktop/>
        <menu submenu="xxx"/>
    </shortcut>
</information>
<resources>
    <jfx:javafx-runtime version="2.2+"
        href="http://javadl.sun.com/webapps/download/GetFile/javafx-latest/windows-i586/javafx2.jnlp" />
    <j2se version="1.7.0+" href="http://java.sun.com/products/autodl/j2se" java-vm-args="-Djava.net.preferIPv4Stack=true"/>

    <jar href="../file/Sistem.jar" download="lazy" main="true" />
</resources>
<security>
    <all-permissions />
</security>
<applet-desc width="800" height="600"
    main-class="com.javafx.main.NoJavaFXFallback" name="Sistem">
    <param name="requiredFXVersion" value="2.2+" />
</applet-desc>
<jfx:javafx-desc width="800" height="600" main-class="ao.co.Sistem.gui.main.MainFX" 
    name="MainFX" />
<update check="always" />

Somebody can help me?

thanks for all and forgive my english.

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
ljzf
  • 1
  • 2
  • Be sure to check the JNLP using JaNeLA, available at my [share drive](https://drive.google.com/drive/#folders/0B5B9wDXIGw9lUnJaUjA2cmlVRE0). Note that it will not correctly account for a Java-FX JNLP, but will still be handy for identifying a lot of potential errors. – Andrew Thompson Mar 03 '15 at 01:30
  • with JaNeLA I got this [code]Content type application/xml does not equal expected type of application/x-java-jnlp-file Problem fetching resource file:/C:/Users/ljoaquim/workspace/sedic/WebContent/file/sedic.jnlp. Invalid byte 2 of 3-byte UTF-8 sequence. – ljzf Mar 03 '15 at 14:14
  • 1
    And ..what is the 2nd of the 3 bytes? Post the content of the JNLP as an [edit to the question](http://stackoverflow.com/posts/28812125/edit) and use code formatting for it. – Andrew Thompson Mar 03 '15 at 14:26
  • Sorry I am new here and I don´t know well how it works, i tried format the text but i couldn´t. – ljzf Mar 03 '15 at 14:33
  • You don't seem to have tried editing the question.. Did you realize the 2nd link I gave is for doing that? – Andrew Thompson Mar 03 '15 at 15:32
  • Thanks @AndrewThompson and borjab. I think that finaly I got. Any ideia for my problem? I made some modifications and the log chance, I have included all jars in list that is specified in jnlp and signed all. – ljzf Mar 04 '15 at 15:07
  • That JNLP seems to have many problems to me. AFAIU it should not have both an `applet-desc` and an `jfx:javafx-desc`. Elements are out of order. It is missing closing elements. What software produced this mess? – Andrew Thompson Mar 04 '15 at 16:12

0 Answers0