java.lang.RuntimeException:错误:无法恢复损坏的缓存条目

发布于 2024-09-10 14:34:09 字数 418 浏览 3 评论 0原文

我刚刚收到一位用户发来的错误消息。 (IE8、Java 1.6.20)。它来自一个小程序,该小程序接收来自 Javascript 的指令并在客户端上执行某些进程。

RangeError
java.lang.RuntimeException: ERROR: Failed to recover corrupt cache entry
at com.sun.deploy.cache.CacheEntry.recover
at com.sun.deploy.cache.CacheEntry.getSignerMap
at com.sun.deploy.cache.CachedJarFile.getSignerMap
at com.sun.deploy.cache.CachedJarFile.access$100
....

有什么想法可能导致这种情况吗?

I just had this error message from one of my users. (IE8, Java 1.6.20 ). It is from an applet which receives instructions from Javascript and executes certain processes on the client.

RangeError
java.lang.RuntimeException: ERROR: Failed to recover corrupt cache entry
at com.sun.deploy.cache.CacheEntry.recover
at com.sun.deploy.cache.CacheEntry.getSignerMap
at com.sun.deploy.cache.CachedJarFile.getSignerMap
at com.sun.deploy.cache.CachedJarFile.access$100
....

Any iddeas what could be causing this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

别再吹冷风 2024-09-17 14:34:09

可能是此错误。如果是这样,解决方法似乎是 清除 java 缓存 并再试一次。

It might be this bug. If so the workaround would appear to be to clear the java cache and try again.

我很OK 2024-09-17 14:34:09

我在 java1.8_0.31 遇到过这个问题,到目前为止我发现的唯一解决方法是将打包的 jar (pack.gz) 与你的 jar 放在同一目录中。当跟踪 servlet 时,我看到,

JnlpDownloadServlet(3): Request: /MyWeb/signed.jnlp
JnlpDownloadServlet(3): User-Agent: JNLP/1.7.0 javaws/11.31.2.13 (<internal>) Java/1.8.0_31
JnlpDownloadServlet(4): DownloadRequest[path=/signed.jnlp encoding=gzip isPlatformRequest=false]
JnlpDownloadServlet(4): Basic Protocol lookup
JnlpDownloadServlet(4): JnlpResource: JnlpResource[WAR Path: /signed.jnlp lastModified=Wed Feb 11 09:13:42 EET 2015]]
JnlpDownloadServlet(3): Resource returned: /signed.jnlp
JnlpDownloadServlet(4): SupportQuery in Href: true
JnlpDownloadServlet(4): lastModified: 1423638822000 Wed Feb 11 09:13:42 EET 2015
JnlpDownloadServlet(3): Request: /MyWeb/GUIJars/signed/main.jar?version-id=1.101
JnlpDownloadServlet(3): User-Agent: JNLP/1.7.0 javaws/11.31.2.13 (<internal>) Java/1.8.0_31
JnlpDownloadServlet(4): DownloadRequest[path=/GUIJars/signed/main.jar encoding=pack200-gzip,gzip query=version-id=1.101 version=1.101 isPlatformRequest=false]
JnlpDownloadServlet(4): Version-based/Extension based lookup
JnlpDownloadServlet(4): JnlpResource: JnlpResource[WAR Path: /GUIJars/signed/main__V1.101.jar versionId=1.101 name=main.jar lastModified=Fri Feb 13 16:28:36 EET 2015] returnVersionId=1.101]
JnlpDownloadServlet(3): Resource returned: /GUIJars/signed/main__V1.101.jar
JnlpDownloadServlet(4): Real resource returned: JnlpResource[WAR Path: /GUIJars/signed/main__V1.101.jar versionId=1.101 name=main.jar lastModified=Fri Feb 13 16:28:36 EET 2015] returnVersionId=1.101]

在客户端,当跟踪日志显示时,

network: ResponseCode for http://mydomain.com.tr/MyWeb/GUIJars/signed/main.jar?version-id=1.101 : 200
network: Encoding for http://mydomain.com.tr/MyWeb/GUIJars/signed/main.jar?version-id=1.101 : gzip
network: Server response: (length: -1, lastModified: Fri Feb 13 16:28:36 EET 2015, downloadVersion: 1.101, mimeType: application/java-archive)
network: Created version ID: 1.101
network: Created version ID: 1.101
network: Created version ID: 1.101
network: Cache entry not found [url: http://mydomain.com.tr/MyWeb/GUIJars/signed/main.jar, version: 1.101]
network: Downloading resource: http://mydomain.com.tr/MyWeb/GUIJars/signed/main.jar?version-id=1.101
    Content-Length: -1
    Content-Encoding: gzip
network: Wrote URL http://mydomain.com.tr/MyWeb/GUIJars/signed/main.jar?version-id=1.101 to File C:\myCache\MyWeb\6.0\33\5a0dab21-647c684d-1.101--temp
network: Disconnect connection to http://mydomain.com.tr/MyWeb/GUIJars/signed/main.jar?version-id=1.101
network: Cache: Enable a new CacheEntry: http://mydomain.com.tr/MyWeb/GUIJars/signed/main.jar
network: Downloaded http://mydomain.com.tr/MyWeb/GUIJars/signed/main.jar: C:\myCache\MyWeb\6.0\33\5a0dab21-647c684d-1.101-
cache: Adding MemoryCache entry: http://mydomain.com.tr/MyWeb/GUIJars/signed/main.jar
java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(Unknown Source)
    at java.util.zip.ZipFile.<init>(Unknown Source)
    at java.util.jar.JarFile.<init>(Unknown Source)
    at java.util.jar.JarFile.<init>(Unknown Source)
    at com.sun.deploy.security.EnhancedJarVerifier.validate(Unknown Source)
    at com.sun.deploy.cache.CacheEntry.getJarSigningData(Unknown Source)
    at com.sun.deploy.cache.CacheEntry.getCodeSigners(Unknown Source)
    at com.sun.deploy.ref.CodeRef.getCodeSigners(Unknown Source)
    at com.sun.deploy.security.ruleset.RuleId.contains(Unknown Source)
    at com.sun.deploy.security.ruleset.DRSHelper.findRule(Unknown Source)
    at com.sun.deploy.security.ruleset.DeploymentRuleSet.getDRS(Unknown Source)
    at com.sun.deploy.security.ruleset.DeploymentRuleSet.findDRS(Unknown Source)
    at com.sun.javaws.jnl.LaunchDesc.getMainDeploymentRuleSet(Unknown Source)
    at com.sun.javaws.jnl.LaunchDesc.getMatchImpl(Unknown Source)
    at com.sun.javaws.jnl.LaunchDesc.getJREMatcher(Unknown Source)
    at com.sun.javaws.Launcher.prepareLaunchFile(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)
cache: Trying to recover cache entry for http://mydomain.com.tr/MyWeb/GUIJars/signed/main.jar
cache: MemoryCache: removed entry http://mydomain.com.tr/MyWeb/GUIJars/signed/main.jar
network: Remove cache entry: http://mydomain.com.tr/MyWeb/GUIJars/signed/main.jar
network: Cache entry not found [url: http://mydomain.com.tr/MyWeb/GUIJars/signed/main.jar, version: 1.101]
java.lang.RuntimeException: ERROR: Recovery got null entry
    at com.sun.deploy.cache.CacheEntry.recover(Unknown Source)
    at com.sun.deploy.cache.CacheEntry.getJarSigningData(Unknown Source)
    at com.sun.deploy.cache.CacheEntry.getCodeSigners(Unknown Source)
    at com.sun.deploy.ref.CodeRef.getCodeSigners(Unknown Source)
    at com.sun.deploy.security.ruleset.RuleId.contains(Unknown Source)
    at com.sun.deploy.security.ruleset.DRSHelper.findRule(Unknown Source)
    at com.sun.deploy.security.ruleset.DeploymentRuleSet.getDRS(Unknown Source)
    at com.sun.deploy.security.ruleset.DeploymentRuleSet.findDRS(Unknown Source)
    at com.sun.javaws.jnl.LaunchDesc.getMainDeploymentRuleSet(Unknown Source)
    at com.sun.javaws.jnl.LaunchDesc.getMatchImpl(Unknown Source)
    at com.sun.javaws.jnl.LaunchDesc.getJREMatcher(Unknown Source)
    at com.sun.javaws.Launcher.prepareLaunchFile(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) 

客户端将纯 jar 文件表现为打包和 gzip 压缩的 jar。也许需要检查 HTTP 标头以了解客户端这样做的原因。

I have experienced this problem at java1.8_0.31 and Only workaround I found so far that put packed jars (pack.gz) to same directory with your jar(s). When tracing the servlet i see that

JnlpDownloadServlet(3): Request: /MyWeb/signed.jnlp
JnlpDownloadServlet(3): User-Agent: JNLP/1.7.0 javaws/11.31.2.13 (<internal>) Java/1.8.0_31
JnlpDownloadServlet(4): DownloadRequest[path=/signed.jnlp encoding=gzip isPlatformRequest=false]
JnlpDownloadServlet(4): Basic Protocol lookup
JnlpDownloadServlet(4): JnlpResource: JnlpResource[WAR Path: /signed.jnlp lastModified=Wed Feb 11 09:13:42 EET 2015]]
JnlpDownloadServlet(3): Resource returned: /signed.jnlp
JnlpDownloadServlet(4): SupportQuery in Href: true
JnlpDownloadServlet(4): lastModified: 1423638822000 Wed Feb 11 09:13:42 EET 2015
JnlpDownloadServlet(3): Request: /MyWeb/GUIJars/signed/main.jar?version-id=1.101
JnlpDownloadServlet(3): User-Agent: JNLP/1.7.0 javaws/11.31.2.13 (<internal>) Java/1.8.0_31
JnlpDownloadServlet(4): DownloadRequest[path=/GUIJars/signed/main.jar encoding=pack200-gzip,gzip query=version-id=1.101 version=1.101 isPlatformRequest=false]
JnlpDownloadServlet(4): Version-based/Extension based lookup
JnlpDownloadServlet(4): JnlpResource: JnlpResource[WAR Path: /GUIJars/signed/main__V1.101.jar versionId=1.101 name=main.jar lastModified=Fri Feb 13 16:28:36 EET 2015] returnVersionId=1.101]
JnlpDownloadServlet(3): Resource returned: /GUIJars/signed/main__V1.101.jar
JnlpDownloadServlet(4): Real resource returned: JnlpResource[WAR Path: /GUIJars/signed/main__V1.101.jar versionId=1.101 name=main.jar lastModified=Fri Feb 13 16:28:36 EET 2015] returnVersionId=1.101]

And at client side when tracing log is shown that

network: ResponseCode for http://mydomain.com.tr/MyWeb/GUIJars/signed/main.jar?version-id=1.101 : 200
network: Encoding for http://mydomain.com.tr/MyWeb/GUIJars/signed/main.jar?version-id=1.101 : gzip
network: Server response: (length: -1, lastModified: Fri Feb 13 16:28:36 EET 2015, downloadVersion: 1.101, mimeType: application/java-archive)
network: Created version ID: 1.101
network: Created version ID: 1.101
network: Created version ID: 1.101
network: Cache entry not found [url: http://mydomain.com.tr/MyWeb/GUIJars/signed/main.jar, version: 1.101]
network: Downloading resource: http://mydomain.com.tr/MyWeb/GUIJars/signed/main.jar?version-id=1.101
    Content-Length: -1
    Content-Encoding: gzip
network: Wrote URL http://mydomain.com.tr/MyWeb/GUIJars/signed/main.jar?version-id=1.101 to File C:\myCache\MyWeb\6.0\33\5a0dab21-647c684d-1.101--temp
network: Disconnect connection to http://mydomain.com.tr/MyWeb/GUIJars/signed/main.jar?version-id=1.101
network: Cache: Enable a new CacheEntry: http://mydomain.com.tr/MyWeb/GUIJars/signed/main.jar
network: Downloaded http://mydomain.com.tr/MyWeb/GUIJars/signed/main.jar: C:\myCache\MyWeb\6.0\33\5a0dab21-647c684d-1.101-
cache: Adding MemoryCache entry: http://mydomain.com.tr/MyWeb/GUIJars/signed/main.jar
java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(Unknown Source)
    at java.util.zip.ZipFile.<init>(Unknown Source)
    at java.util.jar.JarFile.<init>(Unknown Source)
    at java.util.jar.JarFile.<init>(Unknown Source)
    at com.sun.deploy.security.EnhancedJarVerifier.validate(Unknown Source)
    at com.sun.deploy.cache.CacheEntry.getJarSigningData(Unknown Source)
    at com.sun.deploy.cache.CacheEntry.getCodeSigners(Unknown Source)
    at com.sun.deploy.ref.CodeRef.getCodeSigners(Unknown Source)
    at com.sun.deploy.security.ruleset.RuleId.contains(Unknown Source)
    at com.sun.deploy.security.ruleset.DRSHelper.findRule(Unknown Source)
    at com.sun.deploy.security.ruleset.DeploymentRuleSet.getDRS(Unknown Source)
    at com.sun.deploy.security.ruleset.DeploymentRuleSet.findDRS(Unknown Source)
    at com.sun.javaws.jnl.LaunchDesc.getMainDeploymentRuleSet(Unknown Source)
    at com.sun.javaws.jnl.LaunchDesc.getMatchImpl(Unknown Source)
    at com.sun.javaws.jnl.LaunchDesc.getJREMatcher(Unknown Source)
    at com.sun.javaws.Launcher.prepareLaunchFile(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)
cache: Trying to recover cache entry for http://mydomain.com.tr/MyWeb/GUIJars/signed/main.jar
cache: MemoryCache: removed entry http://mydomain.com.tr/MyWeb/GUIJars/signed/main.jar
network: Remove cache entry: http://mydomain.com.tr/MyWeb/GUIJars/signed/main.jar
network: Cache entry not found [url: http://mydomain.com.tr/MyWeb/GUIJars/signed/main.jar, version: 1.101]
java.lang.RuntimeException: ERROR: Recovery got null entry
    at com.sun.deploy.cache.CacheEntry.recover(Unknown Source)
    at com.sun.deploy.cache.CacheEntry.getJarSigningData(Unknown Source)
    at com.sun.deploy.cache.CacheEntry.getCodeSigners(Unknown Source)
    at com.sun.deploy.ref.CodeRef.getCodeSigners(Unknown Source)
    at com.sun.deploy.security.ruleset.RuleId.contains(Unknown Source)
    at com.sun.deploy.security.ruleset.DRSHelper.findRule(Unknown Source)
    at com.sun.deploy.security.ruleset.DeploymentRuleSet.getDRS(Unknown Source)
    at com.sun.deploy.security.ruleset.DeploymentRuleSet.findDRS(Unknown Source)
    at com.sun.javaws.jnl.LaunchDesc.getMainDeploymentRuleSet(Unknown Source)
    at com.sun.javaws.jnl.LaunchDesc.getMatchImpl(Unknown Source)
    at com.sun.javaws.jnl.LaunchDesc.getJREMatcher(Unknown Source)
    at com.sun.javaws.Launcher.prepareLaunchFile(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) 

Client behaves coming plain jar file as packed and gziped jar. Maybe need to examine HTTP Header to why client do that.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文