6 Replies Latest reply on Dec 4, 2012 11:02 PM by 817614

    Cant launch applicaton from Java Cache Viewer

      I am JNLP & JavaFX newbee. I have deployed and launched application successfully via web [jnlp]. I used FX ant tasks to build the deploy and used the html fragment generated to run the application within the web browser [IE8]. [Added fragment to jsp]. The web application is using Spring MVC and Spring security. When I open the javaws viewer, and try to start the application, it doesn't start and I see this error [assuming it is root cause]:
      basic: Relaunch because: [current UI toolkit does not match]
      Exception in thread "thread applet-com.xxxxx.aops.javafx.app.AopsApp-1" java.lang.NullPointerException
      at com.sun.deploy.cache.Cache.getCacheEntry(Unknown Source)
      at com.sun.deploy.cache.Cache.getCacheEntry(Unknown Source)
      at sun.plugin2.applet.viewer.JNLP2Viewer$1$3.appletJRERelaunch(Unknown Source)
      at sun.plugin2.applet.Plugin2Manager.fireAppletJRERelaunch(Unknown Source)
      at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)

      Not sure what the NPE is all about, but assume it is related to the "current UI toolkit does not match". I am using jdk/jre 1.7.07 javafx 2.2

        • 1. Re: Cant launch applicaton from Java Cache Viewer
          You might want to try the latest jdk7 release at http://jdk7.java.net/download.html
          • 2. Re: Cant launch applicaton from Java Cache Viewer
            Installed 1.7.10 and rebuilt [and made .10 java default]. The web start embedded in the jsp now just gets the spinning circle icon and does nothing. The only entry in the trace file is: Log started: Fri, 30 Nov 2012 08:44:33 -0600

            Going to try 1.7.9
            • 3. Re: Cant launch applicaton from Java Cache Viewer
              ahh.. should have mentioned that the one line from trace file was 'plugin....trace' not 'javaws...trace'. Also see this in jcp.trace ['jcp' is alias keystore, I think].

              java.io.FileNotFoundException: C:\Users\dcalvin\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\53\4f414575-3bd1f472 (The system cannot find the file specified)
                   at java.io.FileInputStream.open(Native Method)
                   at java.io.FileInputStream.<init>(Unknown Source)
                   at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
                   at com.sun.javaws.CacheUtil.getExcludedCacheEntries(Unknown Source)
              • 4. Re: Cant launch applicaton from Java Cache Viewer
                Well boys and girls..I spent Friday in jdk hell. I finally got the applicaton to launch from the web server [original working condition] by uninstalling jdk/jre's > 1.7.7 [after trying 32 bit 1.710, 17.09, 64 bit 1.7.09]. But still have my original problem - "current UI toolkit does not match'. Can someone who knows what this error is please respond? I assume it looking for specific tooklit in the dtjava script ..ie "toolkit='swing'".. tried different values [the default script generated doesn't specify a 'toolkit' and I don't know if this error  message is refering to the same 'toolkit' as specified in javascript arguement.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
                • 5. Re: Cant launch applicaton from Java Cache Viewer
                  okay.. after a little research, I find the NPE may be occuring because either the class LaunchDesc has either a missing "_originaURL" [returned by getSourceURL()] or _version [set by constructor]. This is doing 'relaunch' [see original post]. Maybe the good guys at Oracle can tell me what I am missing [like should I have javafx.properties in my class path?].
                  • 6. Re: Cant launch applicaton from Java Cache Viewer
                    The tracing is profuse and could be confusing. Don't pay attention to the "toolkit not match" message. It is normal output for the launching of java fx apps at this time.
                    Your NPE stack indicate this bug http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7191889. The bug typically happens to JNLP files without <jnlp href="some.jnlp"... attribute. If this is the case, try work-around by adding the attribute.