我们有一个签名的Java应用程序,通过Java WebStart分发给客户端,但自1.8_031以来,我们有时会看到NPE。 使用 Java 1.8_031 或更早版本,该应用始终有效。 同一台机器有时可以运行应用程序,有时不运行。清除缓存不会影响这一点。
JNLP文件如下所示:
<?xml version="1.0" encoding="utf-8"?>
<!--
Java Webstart JNLP File for ESKORT Clearance Workbench Application
$Id: cwb.jnlp.template,v 1.26.2.9.2.1 2015/05/19 12:43:03 PB Exp $
-->
<jnlp codebase="http://T500-DASIM:6610/clearance" href="cwb.jnlp" spec="6.0+">
<information>
<title>ESKORT Clearance Workbench 4.0.0.33</title>
<vendor>Copyright © 2014 Intrasoft International Scandinavia A/S. All rights reserved.</vendor>
<homepage href="http://www.intrasoft-intl.com/eskort"/>
<description>ESKORT Clearance Workbench 4.0.0.33</description>
<description kind="short">Client application for modifying the ESKORT Clearance Risk Analysis Configuration.</description>
<icon href="conf/ClearanceWorkbench64.jpg"/>
<icon href="conf/ClearanceWorkbenchSplash.jpg" kind="splash"/>
<related-content href="http://www.intrasoft-intl.com/eskort"/>
<!--offline-allowed/-->
</information>
<update check="always"/>
<resources>
<j2se version="1.5+"/>
<jar download="eager" href="lib/clearance-workbench-4.0.jar" main="true"/>
<jar download="eager" href="lib/profiletestbed-client-4.0.jar" />
<jar download="eager" href="lib/profiletestbed-core-4.0.jar" />
<jar download="eager" href="lib/spring-richclient-core-1.1.0.jar" />
<jar download="eager" href="lib/spring-richclient-resources-1.1.0.jar" />
<jar download="eager" href="lib/spring-richclient-sandbox-1.1.0.jar" />
<jar download="eager" href="lib/spring-binding-1.0.5.jar" />
<jar download="eager" href="lib/looks-2.2.2.jar" />
<jar download="eager" href="lib/swingx-1.6.1.jar" />
<jar download="eager" href="lib/glazedlists_java15-1.8.0.jar" />
<jar download="eager" href="lib/forms-1.2.1.jar" />
<jar download="eager" href="lib/ebcj-4.0.jar" />
<jar download="eager" href="lib/all-i18n.jar" />
<jar download="eager" href="lib/jlfgr-1_0.jar" />
<jar download="eager" href="lib/swing-layout-1.0.jar" />
<jar download="eager" href="lib/jxlayer-3.0.4.jar" />
<jar download="eager" href="lib/spring.jar" />
<jar download="eager" href="lib/spring-webmvc.jar" />
<jar download="eager" href="lib/spring-security-core-2.0.4.jar" />
<jar download="eager" href="lib/commons-logging.jar" />
<jar download="eager" href="lib/commons-collections.jar" />
<jar download="eager" href="lib/commons-codec.jar" />
<!-- Setup configuration class -->
<property name="jnlp.com.wmdata.cscc.clearance.workbench.configuration_class" value="com.wmdata.cscc.clearance.workbench.core.ClearanceWorkbenchConfiguration_Standard"/>
<!-- Setup look and feel -->
<!-- Setup language etc... -->
<property name="jnlp.com.wmdata.cscc.i18n.language" value="en"/>
<property name="jnlp.com.wmdata.cscc.i18n.country" value="XX"/>
<property name="jnlp.com.wmdata.cscc.i18n.variant" value="imp_exp_man"/>
<!--
Disable the default 3-attempts login dialog.
Only enable this proerty if you supply your own LoginModule-Logic which
do NOT use the Intracom LoginDialog!
-->
<!--property name="cwb_standard.disable_login_dialog" value="yes please"/-->
<!-- Clear basic authentication header after login -->
<!--property name="cwb.service_manager.http_invoker.clearAuthenticationHeaderAfterLogin" value="true"/-->
<!--
Disable WebStart http login dialogue
The javaws.cfg.jauthenticator property must be set to "true" or "all" to
disable the built-in javaws HTTP authentication dialogue.
-->
<property name="javaws.cfg.jauthenticator" value="true"/>
</resources>
<application-desc main-class="com.wmdata.cscc.clearance.workbench.launcher.MainWebStart"/>
<security>
<all-permissions/>
</security>
</jnlp>
从跟踪文件中正确加载的应用程序之间的差异似乎与这些行无关:
basic: JREMatcher:
JREDesc: JREDesc[version 1.5+, versionType=0, secure=false, heap=-1--1, args=null, href=http://java.sun.com/products/autodl/j2se, null, null]
JREInfo: JREInfo for index 0:
platform is: 1.8
product is: 1.8.0_65
location is: http://java.sun.com/products/autodl/j2se
path is: C:\Program Files (x86)\Java\jre1.8.0_65\bin\javaw.exe
args is:
native platform is: Windows, x86 [ x86, 32bit ]
JavaFX runtime is: JavaFX 8.0.65 found at C:\Program Files (x86)\Java\jre1.8.0_65\
enabled is: true
registered is: true
system is: true
Init Heap: -1
Max Heap: 67108864
Satisfying: false, false
SatisfyingVersion: true
SatisfyingJVMArgs: false, false
SatisfyingSecure: false
Selected JVMParam: [JVMParameters: isSecure: true, args: "-Djnlp.com.wmdata.cscc.clearance.workbench.configuration_class=com.wmdata.cscc.clearance.workbench.core.ClearanceWorkbenchConfiguration_Standard" "-Djnlp.com.wmdata.cscc.i18n.language=en" "-Djnlp.com.wmdata.cscc.i18n.country=XX" "-Djnlp.com.wmdata.cscc.i18n.variant=imp_exp_man" "-Djavaws.cfg.jauthenticator=true"]
Running JVMParam: [JVMParameters: isSecure: true, args: "-Djnlp.com.wmdata.cscc.clearance.workbench.configuration_class=com.wmdata.cscc.clearance.workbench.core.Clearanc" "-Djnlp.com.wmdata.cscc.i18n.variant=imp_exp_man" "-Djavaws.cfg.jauthenticator=true" "&ref" ">ain" "#alse" "2ager" ";ref"]
..
cache: registerReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@99a51c64: 3
security: Rejecting argument with illegal chars: t‡€
security: Rejecting argument with illegal chars: w‡€
security: Rejecting argument with illegal chars: )@¨0Õ
security: Rejecting argument with illegal chars: r‡€
security: Rejecting argument with illegal chars: m‡€
security: Rejecting argument with illegal chars: h‡€
security: Rejecting argument with illegal chars: !?`Õ
security: Rejecting argument with illegal chars: k‡€
security: Rejecting argument with illegal chars: f‡€
security: Rejecting argument with illegal chars: ,¨ÀÕ
security: Rejecting argument with illegal chars: a‡€
security: Rejecting argument with illegal chars: ‡€
security: Rejecting argument with illegal chars: 0)x¨ØÕ
..
network: Created version ID: 1.7
basic: Launching new JRE version: JREInfo for index 0:
platform is: 1.8
product is: 1.8.0_65
location is: http://java.sun.com/products/autodl/j2se
path is: C:\Program Files (x86)\Java\jre1.8.0_65\bin\javaw.exe
args is:
native platform is: Windows, x86 [ x86, 32bit ]
JavaFX runtime is: JavaFX 8.0.65 found at C:\Program Files (x86)\Java\jre1.8.0_65\
enabled is: true
registered is: true
system is: true
basic: jvmParams: [JVMParameters: isSecure: true, args: "-Djnlp.com.wmdata.cscc.clearance.workbench.configuration_class=com.wmdata.cscc.clearance.workbench.core.ClearanceWorkbenchConfiguration_Standard" "-Djnlp.com.wmdata.cscc.i18n.language=en" "-Djnlp.com.wmdata.cscc.i18n.country=XX" "-Djnlp.com.wmdata.cscc.i18n.variant=imp_exp_man" "-Djavaws.cfg.jauthenticator=true"]
basic: cmd 0 : C:\Program Files (x86)\Java\jre1.8.0_65\bin\jp2launcher.exe
basic: cmd 1 : -Djnlp.com.wmdata.cscc.clearance.workbench.configuration_class=com.wmdata.cscc.clearance.workbench.core.Clearanc
basic: cmd 2 : -Djnlp.com.wmdata.cscc.i18n.variant=imp_exp_man
basic: cmd 3 : -Djavaws.cfg.jauthenticator=true
basic: cmd 4 : &ref
basic: cmd 5 : >ain
basic: cmd 6 : #alse
basic: cmd 7 : 2ager
basic: cmd 8 : ;ref
basic: cmd 9 : -Djnlp.com.wmdata.cscc.clearance.workbench.configuration_class=com.wmdata.cscc.clearance.workbench.core.ClearanceWorkbenchConfiguration_Standard
basic: cmd 10 : -Djnlp.com.wmdata.cscc.i18n.language=en
basic: cmd 11 : -Djnlp.com.wmdata.cscc.i18n.country=XX
basic: cmd 12 : -Xbootclasspath/a:C:\Program Files (x86)\Java\jre1.8.0_65\lib\javaws.jar;C:\Program Files (x86)\Java\jre1.8.0_65\lib\deploy.jar;C:\Program Files (x86)\Java\jre1.8.0_65\lib\plugin.jar
basic: cmd 13 : -classpath
basic: cmd 14 : C:\Program Files (x86)\Java\jre1.8.0_65\lib\deploy.jar
basic: cmd 15 : -Djnlpx.vmargs=LURqbmxwLmNvbS53bWRhdGEuY3NjYy5jbGVhcmFuY2Uud29ya2JlbmNoLmNvbmZpZ3VyYXRpb25fY2xhc3M9Y29tLndtZGF0YS5jc2NjLmNsZWFyYW5jZS53b3JrYmVuY2guY29yZS5DbGVhcmFuYwAtRGpubHAuY29tLndtZGF0YS5jc2NjLmkxOG4udmFyaWFudD1pbXBfZXhwX21hbgAtRGphdmF3cy5jZmcuamF1dGhlbnRpY2F0b3I9dHJ1ZQAmcmVmAD5haW4AI2Fsc2UAMmFnZXIAO3JlZgAtRGpubHAuY29tLndtZGF0YS5jc2NjLmNsZWFyYW5jZS53b3JrYmVuY2guY29uZmlndXJhdGlvbl9jbGFzcz1jb20ud21kYXRhLmNzY2MuY2xlYXJhbmNlLndvcmtiZW5jaC5jb3JlLkNsZWFyYW5jZVdvcmtiZW5jaENvbmZpZ3VyYXRpb25fU3RhbmRhcmQALURqbmxwLmNvbS53bWRhdGEuY3NjYy5pMThuLmxhbmd1YWdlPWVuAC1Eam5scC5jb20ud21kYXRhLmNzY2MuaTE4bi5jb3VudHJ5PVhYAA==
basic: cmd 16 : -Djnlpx.jvm=C:\Program Files (x86)\Java\jre1.8.0_65\bin\javaw.exe
basic: cmd 17 : -Djnlpx.splashport=49748
basic: cmd 18 : -Djnlpx.home=C:\Program Files (x86)\Java\jre1.8.0_65\bin
basic: cmd 19 : -Djnlpx.remove=false
basic: cmd 20 : -Djnlpx.offline=false
basic: cmd 21 : -Djnlpx.relaunch=true
basic: cmd 22 : -Djnlpx.session.data=C:\Users\dasim\AppData\Local\Temp\session5200992794202174532
basic: cmd 23 : -Djnlpx.heapsize=NULL,NULL
basic: cmd 24 : -Djava.security.policy=file:C:\Program Files (x86)\Java\jre1.8.0_65\lib\security\javaws.policy
basic: cmd 25 : -DtrustProxy=true
basic: cmd 26 : -Xverify:remote
basic: cmd 27 : -Djnlpx.origFilenameArg=C:\Users\dasim\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\9IOP4P8I\cwb.jnlp
basic: cmd 28 : -Dsun.awt.warmup=true
basic: cmd 29 : -Djava.security.manager
basic: cmd 30 : com.sun.javaws.Main
basic: cmd 31 : -secure
basic: cmd 32 : C:\Users\dasim\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\53\25f096b5-751b9e5c
preloader: Stop progressCheck thread queue.size()=0
network: Created version ID: 1.7
security: Main class is: &ref
Cannot use secure launcher with main class: &ref
在控制台上,错误如下所示:
java.lang.NullPointerException
at com.sun.javaws.JnlpxArgs.execProgram(Unknown Source)
at com.sun.javaws.Launcher.relaunch(Unknown Source)
at com.sun.javaws.Launcher.prepareResources(Unknown Source)
at com.sun.javaws.Launcher.prepareAllResources(Unknown Source)
at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
at com.sun.javaws.Launcher.launch(Unknown Source)
at com.sun.javaws.Main.launchApp(Unknown Source)
at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
at com.sun.javaws.Main.access$000(Unknown Source)
at com.sun.javaws.Main$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
(论证确实是乱码,但这种情况如何发生并不清楚。)
以下是应用程序正确启动时跟踪文件的相应级别的摘录:
basic: jvmParams: [JVMParameters: isSecure: true, args: "-Djnlp.com.wmdata.cscc.clearance.workbench.configuration_class=com.wmdata.cscc.clearance.workbench.core.ClearanceWorkbenchConfiguration_Standard" "-Djnlp.com.wmdata.cscc.i18n.language=en" "-Djnlp.com.wmdata.cscc.i18n.country=XX" "-Djnlp.com.wmdata.cscc.i18n.variant=imp_exp_man" "-Djavaws.cfg.jauthenticator=true"]
basic: cmd 0 : C:\Program Files (x86)\Java\jre1.8.0_65\bin\jp2launcher.exe
basic: cmd 1 : -Djnlp.com.wmdata.cscc.clearance.workbench.configuration_class=com.wmdata.cscc.clearance.workbench.core.Clearanc
basic: cmd 2 : -Djnlp.com.wmdata.cscc.i18n.variant=imp_exp_man
basic: cmd 3 : -Djavaws.cfg.jauthenticator=true
basic: cmd 4 : -Djnlp.com.wmdata.cscc.clearance.workbench.configuration_class=com.wmdata.cscc.clearance.workbench.core.ClearanceWorkbenchConfiguration_Standard
basic: cmd 5 : -Djnlp.com.wmdata.cscc.i18n.language=en
basic: cmd 6 : -Djnlp.com.wmdata.cscc.i18n.country=XX
basic: cmd 7 : -Xbootclasspath/a:C:\Program Files (x86)\Java\jre1.8.0_65\lib\javaws.jar;C:\Program Files (x86)\Java\jre1.8.0_65\lib\deploy.jar;C:\Program Files (x86)\Java\jre1.8.0_65\lib\plugin.jar
basic: cmd 8 : -classpath
basic: cmd 9 : C:\Program Files (x86)\Java\jre1.8.0_65\lib\deploy.jar
basic: cmd 10 : -Djnlpx.vmargs=LURqbmxwLmNvbS53bWRhdGEuY3NjYy5jbGVhcmFuY2Uud29ya2JlbmNoLmNvbmZpZ3VyYXRpb25fY2xhc3M9Y29tLndtZGF0YS5jc2NjLmNsZWFyYW5jZS53b3JrYmVuY2guY29yZS5DbGVhcmFuYwAtRGpubHAuY29tLndtZGF0YS5jc2NjLmkxOG4udmFyaWFudD1pbXBfZXhwX21hbgAtRGphdmF3cy5jZmcuamF1dGhlbnRpY2F0b3I9dHJ1ZQAtRGpubHAuY29tLndtZGF0YS5jc2NjLmNsZWFyYW5jZS53b3JrYmVuY2guY29uZmlndXJhdGlvbl9jbGFzcz1jb20ud21kYXRhLmNzY2MuY2xlYXJhbmNlLndvcmtiZW5jaC5jb3JlLkNsZWFyYW5jZVdvcmtiZW5jaENvbmZpZ3VyYXRpb25fU3RhbmRhcmQALURqbmxwLmNvbS53bWRhdGEuY3NjYy5pMThuLmxhbmd1YWdlPWVuAC1Eam5scC5jb20ud21kYXRhLmNzY2MuaTE4bi5jb3VudHJ5PVhYAA==
basic: cmd 11 : -Djnlpx.jvm=C:\Program Files (x86)\Java\jre1.8.0_65\bin\javaw.exe
basic: cmd 12 : -Djnlpx.splashport=57124
basic: cmd 13 : -Djnlpx.home=C:\Program Files (x86)\Java\jre1.8.0_65\bin
basic: cmd 14 : -Djnlpx.remove=false
basic: cmd 15 : -Djnlpx.offline=false
basic: cmd 16 : -Djnlpx.relaunch=true
basic: cmd 17 : -Djnlpx.session.data=C:\Users\dasim\AppData\Local\Temp\session6874989919459371828
basic: cmd 18 : -Djnlpx.heapsize=NULL,NULL
basic: cmd 19 : -Djava.security.policy=file:C:\Program Files (x86)\Java\jre1.8.0_65\lib\security\javaws.policy
basic: cmd 20 : -DtrustProxy=true
basic: cmd 21 : -Xverify:remote
basic: cmd 22 : -Djnlpx.origFilenameArg=C:\Users\dasim\AppData\Local\Temp\cwb-5.jnlp
basic: cmd 23 : -Dsun.awt.warmup=true
basic: cmd 24 : -Djava.security.manager
basic: cmd 25 : com.sun.javaws.Main
basic: cmd 26 : -secure
basic: cmd 27 : C:\Users\dasim\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\53\25f096b5-7062b012
我已经尝试重新打包JNLP文件,即使它已经符合标准,因为我们有其他应用程序jnlp文件可以正常工作,但没有成功。
任何意见都赞赏。