我们有一个webstart应用程序,在启动后使用EJB连接到jboss服务器。我们最近将此服务器迁移到jboss5并更新了连接到它的webstart应用程序。现在我们遇到了一个问题。在我们的开发人员计算机上,运行webstarts应用程序没有问题。它的启动和连接也没有问题。但是在质量保证测试人员的机器上他们根本不会运行,它只是说无法启动(或类似的东西)。 在细节部分,exceptin在找不到jboss-main-client.jar和jnlp之间有所不同。但是被包装的例外显示了这一点:
java.io.IOException
at com.sun.deploy.cache.CacheEntry$9.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.deploy.cache.CacheEntry.writeFileToDisk(Unknown Source)
at com.sun.deploy.cache.Cache.downloadResourceToTempFile(Unknown Source)
at com.sun.deploy.cache.Cache.downloadResourceToCache(Unknown Source)
at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
at com.sun.javaws.LaunchDownload$DownloadTask.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
我们首先认为它可能是一个签名问题,但它不会在我们的本地开发机器上运行。然后是人的访问权限的问题(这是我的理论),但为什么之前的版本工作?我们运行1.6 B18到B24和XP,Vista和Windows 7的混合物。我完全难过,有什么想法吗?
答案 0 :(得分:1)
您可以尝试在Java控制台中启用跟踪级别,在那里您将找到详细的例外。可能它是原生的。
答案 1 :(得分:0)
我在JDK来源找到了它。
CacheEntry.java,第9个PrivilegedExceptionAction.run:
public Object run() throws IOException {
JarFile jar = null;
RandomAccessFile raf = null;
//reset lengths as they will be updated
//and they could be stale (e.g. if we are upgrading from old index file)
section2Length = 0;
section3Length = 0;
section4Length = 0;
section4Pre15Length = 0;
section4CertsLength = 0;
section4SignersLength = 0;
section5Length = 0;
reducedManifestLength = 0;
reducedManifest2Length = 0;
try {
raf = openLockIndexFile("rw", false);
// output index file contents to disk
//mandatory header first (will write it again later on)
byte header[] = prepareHeader();
raf.write(header);
ByteArrayOutputStream bout = new ByteArrayOutputStream(1000);
DataOutputStream out = new DataOutputStream(bout);
out.writeUTF(getVersion() != null ? getVersion() : "");
out.writeUTF(getURL());
out.writeUTF(getNamespaceID());
// write out resource codebase ip address if available
InetAddress ina = null;
// get the ip address of the resource codebase
String codebase = "";
if (url != null && url.equals("") == false) {
URL u = new URL(url);
String host = u.getHost();
ina = Cache.getHostIP(host);
if (ina != null) {
codebase = ina.getHostAddress();
}
}
out.writeUTF(codebase);
// write out HTTP/HTTPS header if available
writeHeaders(out);
out.close();
bout.close();
section2Length = bout.size();
raf.write(bout.toByteArray());
if (incomplete == 0) {
// save sections 3 and 4 (JAR only)
if (isJarFile(url)) {
jar = new JarFile(new File(filename));
CachedManifest manifest = new CachedManifest(jar);
//will update section3Length and section4Length internally
writeManifest(raf, jar, manifest, contentType, dd);
manifest.postprocess(); //need to do this explicilty
updateManifestRefs(manifest);
jar.close();
}
// this entry just got downloaded, so mark it as update check done
DownloadEngine.addToUpdateCheckDoneList(url);
// add this entry to the cleanup thread loaded resource list
Cache.addToCleanupThreadLoadedResourceList(url);
setBusy(0);
setIncomplete(0);
updateBlacklistValidation();
updateTrustedLibrariesValidation();
doUpdateHeader(raf);
//whenether this is jar or not we do not need to try read
//manifest or certificates again
doneReadManifest = true;
doneReadCerts = true;
doneReadSigners = true;
}
} catch (Exception e) {
Trace.ignoredException(e);
// close file before trying to delete them
// set raf/jar to null after closing, so they won't be closed
// again in the finally block
if (raf != null) {
raf.close();
raf = null;
}
if (jar != null) {
jar.close();
jar = null;
}
Cache.removeCacheEntry(CacheEntry.this);
if (e instanceof JARSigningException) {
throw (JARSigningException) e;
}
if (e instanceof java.util.zip.ZipException) {
throw new JARSigningException(new URL(url), version,
JARSigningException.BAD_SIGNING, e);
}
throw new IOException(e.getMessage());
} finally {
if (raf != null) {
raf.close();
}
if (jar != null) {
jar.close();
}
Cache.cleanup();
}
return null;
}
}
我认为你没有看到真正的错误,因为IOException没有包装它。 在Java控制台中记录了原因异常,我认为它是可见的。 但如果不是这样,我建议你从http://download.java.net/openjdk/jdk6/获取OpenJDK源并尝试调试这个类(CacheEntry.java:1681)。遗憾的是,JDK是在没有调试信息的情况下构建的,但您可以在方法中设置断点并使用调试器查看对象属性。
答案 2 :(得分:0)
这不是一个真正的答案,但我发现它是Java的缓存问题。进入并删除缓存后,问题就解决了。由于某种原因,也等待第二天的帮助。
答案 3 :(得分:0)
问题可能是由于用户在不同的Windows机器上工作时造成的 用户配置文件存储在服务器上 - 用户缓存位于本地计算机上;如果他 转到另一台机器,webstart应用程序可能安装在不同的缓存文件夹中。使用javaws的-system标志可能有帮助
答案 4 :(得分:0)
好的......一旦引入了Java 1.7r51,我们遇到了同样的问题。 我让用户通过Java控制台清除缓存。 我还让他们将网站地址“https:// ....”添加到“安全”标签下的“例外”部分。 用户启动了一个新的浏览器会话并连接到该站点没有问题。