小程序无法从 jar 加载类
一些用户抱怨小程序不再工作,当他们查看 java 控制台时,他们会遇到 java.lang.noClassDefFoundError 并检查我的访问日志,我发现他们已经下载了包含该类的 jar 文件,然后发出 get对特定类别的请求。
不同的用户在不同的类别上休息。
有些用户很好。
任何可能导致此问题/解决此问题的想法。
我已检查以确保该文件位于其 java 缓存中,清除了缓存等。似乎没有任何方法可以修复它们。
如果他们访问了一个质量保证网站,它也会崩溃。
Some users are complaining that the applet no longer works, When they view the java console they are greeted with a java.lang.noClassDefFoundError and checking my access log's I see they have downloaded the jar file that contains the class, and then issue a get request for the particular class.
Different users break on different classes.
Some users are fine.
Any ideas what could cause this/fix this.
I have checked to make sure the file is in their java cache, cleared the cache etc. nothing seems to fix them.
If they hit a qa site it breaks as well.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
jar 在运输过程中被损坏,我们正在考虑从 oracle/bea 为服务器获取补丁。
看起来,如果连接太慢(调制解调器速度),weblogic 将通过发送 len=0 的数据包来表示传输结束。
网络将向 java 发出信号,表示下载成功完成,然后 java 失败并出现 java.lang.noClassDefFoundError。
The jar is getting corrupted in transit, We are looking at getting patches from oracle/bea for the server.
It appears that if a connection is too slow (Modem speeds) that weblogic will signal the end of a transfer by sending a packet with len=0.
The network will signal java saying the download completed successfully and then java fails with a java.lang.noClassDefFoundError.
如果类本身可以加载,但该类的某些依赖项不能加载,则可能会发生这种情况。 是否存在依赖的外部 JAR?
This can occur if the class itself can be loaded but some dependency of that class cannot be. Are there external JARs that are dependencies?
您确定 jar 文件包含所有必需的类吗? 在您最喜欢的 Zip 应用程序中打开它并仔细检查。 也许该罐子的最近版本被搞乱了并且里面没有所有东西。
Are you sure the jar file contains all the necessary classes? Open it up in your favorite Zip application and double check. Maybe a recent build of that jar got messed up and doesn't have everything in it.
我假设您已经通过措辞进行了一些更新。 某些用户很可能缓存了以前的 Jar 文件。
在实时配置中部署新的小程序版本时,我执行以下操作:
即使您按照此操作,用户仍然可能遇到问题,请要求他们一次尝试这些(按他们应该尝试的顺序列出):
I'm assuming that you have made some updates by your wording. It is highly likely that some users have a previous Jar file cached.
When deploying a new applet version in a live configuration I perform the following:
Even if you follow this the user may still have a problem, ask them to try these one at a time (listed in order they should try):