0

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)
....
Kaushalya
  • 1,009
  • 1
  • 10
  • 10
  • 2
    Answering your own question is fine (even encouraged), but we do ask that you follow the same Question/Answer format as usual. That is, move the answer part down to a separate Answer. Thanks, and Welcome! – Bill the Lizard Apr 10 '10 at 14:35
  • Separated the question and the answer as 'Bill the Lizard' suggested. Thanks for the comment! – Kaushalya Apr 12 '10 at 04:20

2 Answers2

1

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.

Kaushalya
  • 1,009
  • 1
  • 10
  • 10
0

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
tuku
  • 415
  • 5
  • 12