JBoss 部署抛出“java.util.zip.ZipException:打开 zip 文件时出错”在 Linux 上?
我在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是由 Linux/Unix 操作系统中的“打开文件描述符数量限制”引起的。默认值为 1024。
您可以使用以下方法检查默认值:
要增加打开的文件描述符的数量(例如,增加到 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:
To increase the number of open file descriptors (say, to 2048):
Check the man page of ulimit for more details.
您可以增加打开文件的数量限制,
如果您
临时更改了该值,则在重新启动后重置
您最好更改它
并通过替换 jboss 用户名来添加这些行
,然后
添加
重新启动服务器并检查限制
you can increase the number of open files limit
if you do
the value is changed temporarily, it is reset after reboot
you better change it by
and add these lines by replacing the jboss user name
after that
and add
restart the server and check the limits