2011-05-10 34 views
2

我们有一个webstart应用程序,它在启动后使用EJB连接到jboss服务器。我们最近将此服务器迁移到jboss5并更新了连接到它的webstart应用程序。现在我们遇到了一个问题。在我们的开发者机器上,运行webstarts应用程序没有问题。它启动并连接,也没有问题。但是在QA测试机器上,他们根本不会运行,只是说无法启动(或类似的东西)。 在exceptin的细节部分中找不到jboss-main-client.jar和jnlp。但是包装的异常说明这一点:Webstart应用程序不会为所有用户启动

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的混合体。我完全难住,有什么想法?

回答

1

您可以尝试启用Java控制台中的跟踪级别,您将在那里找到详细的异常。可能它是本地的东西。

+0

我启用了跟踪级调试,但它没有用处,只给我:#### Java Web Start错误: ####无法加载资源:http:// /packaging /adminportal/lib/jboss-main-client.jar ...是的,我检查它是在那个位置和可访问性。 – Gerrie 2011-05-11 10:51:10

0

我在JDK源代码找到它。

CacheEntry.java,第九届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是在没有调试信息的情况下构建的,但是您可以在方法中设置断点并使用调试器查看对象属性。

0

这不是一个真正的答案,但我发现它与Java的缓存问题。一旦你进入并删除缓存,问题就解决了。由于某种原因也等到第二天帮忙。

0

该问题可能是由于用户在不同的Windows计算机上工作,当 用户配置文件存储在服务器上时 - 用户高速缓存驻留在本地计算机上;如果他 转到其他计算机上,webstart应用程序可能安装在不同的缓存文件夹中。使用javaws的-system标志可能有帮助

0

好的......我们遇到了同样的问题,一旦引入了Java 1.7r51。 我让用户通过Java控制台清除他们的缓存。 我也让他们将网站地址“https:// ....”添加到“安全”选项卡下的“例外”部分。 用户启动了一个新的浏览器会话并连接到该网站没有问题。

相关问题