JBoss 部署抛出“java.util.zip.ZipException:打开 zip 文件时出错”在 Linux 上?

发布于 2024-08-28 00:59:03 字数 1083 浏览 8 评论 0原文

我在 JBoss 上部署了一个大型 EAR(包含超过 1024 个 jar/war),在 Linux 上运行 Java 6 >,部署过程抛出以下异常:

java.lang.RuntimeException: java.util.zip.ZipException: error in opening zip file)
    at org.jboss.deployment.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:53)
    at org.jboss.deployment.MainDeployer.init(MainDeployer.java:901)
    at org.jboss.deployment.MainDeployer.init(MainDeployer.java:895)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:809)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
....
Caused by: java.lang.RuntimeException: java.util.zip.ZipException: error in opening zip file
at org.jboss.util.file.JarArchiveBrowser.<init>(JarArchiveBrowser.java:74)
at org.jboss.util.file.FileProtocolArchiveBrowserFactory.create(FileProtocolArchiveBrowserFactory.java:48)
at org.jboss.util.file.ArchiveBrowser.getBrowser(ArchiveBrowser.java:57)
at org.jboss.ejb3.EJB3Deployer.hasEjbAnnotation(EJB3Deployer.java:213)
....

I deployed a large EAR (contained more than ~1024 jars/wars) on JBoss running with Java 6 on Linux, and the deployment process cried throwing the following exception:

java.lang.RuntimeException: java.util.zip.ZipException: error in opening zip file)
    at org.jboss.deployment.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:53)
    at org.jboss.deployment.MainDeployer.init(MainDeployer.java:901)
    at org.jboss.deployment.MainDeployer.init(MainDeployer.java:895)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:809)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
....
Caused by: java.lang.RuntimeException: java.util.zip.ZipException: error in opening zip file
at org.jboss.util.file.JarArchiveBrowser.<init>(JarArchiveBrowser.java:74)
at org.jboss.util.file.FileProtocolArchiveBrowserFactory.create(FileProtocolArchiveBrowserFactory.java:48)
at org.jboss.util.file.ArchiveBrowser.getBrowser(ArchiveBrowser.java:57)
at org.jboss.ejb3.EJB3Deployer.hasEjbAnnotation(EJB3Deployer.java:213)
....

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

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

发布评论

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

评论(2

美人如玉 2024-09-04 00:59:03

这是由 Linux/Unix 操作系统中的“打开文件描述符数量限制”引起的。默认值为 1024。

您可以使用以下方法检查默认值:

ulimit -n

要增加打开的文件描述符的数量(例如,增加到 2048):

ulimit -n 2048

检查 ulimit 手册页 了解更多详细信息。

This was caused by the 'limit of number of open file descriptors' in Linux/Unix operating systems. The default is 1024.

You can check the default value using:

ulimit -n

To increase the number of open file descriptors (say, to 2048):

ulimit -n 2048

Check the man page of ulimit for more details.

虚拟世界 2024-09-04 00:59:03

您可以增加打开文件的数量限制,

如果您

ulimit -n 2048

临时更改了该值,则在重新启动后重置
您最好更改它

sudo vi /etc/security/limits.conf

并通过替换 jboss 用户名来添加这些行

user  soft  nofile 9000
user  hard  nofile 65000

,然后

sudo vi /etc/pam.d/common-session

添加

session required pam_limits.so

重新启动服务器并检查限制

ulimit -n

you can increase the number of open files limit

if you do

ulimit -n 2048

the value is changed temporarily, it is reset after reboot
you better change it by

sudo vi /etc/security/limits.conf

and add these lines by replacing the jboss user name

user  soft  nofile 9000
user  hard  nofile 65000

after that

sudo vi /etc/pam.d/common-session

and add

session required pam_limits.so

restart the server and check the limits

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