Recherche dans le site/ Search this Blog:


Problem updating to MyEclipse 7.5 on Slackware Linux - Look at ulimit -n - Too many open files - struts-config.xml changes to run under java 6 Imprimer



We have updated from MyEclipse 5.1 to 7.5. Here a list of the problems we encountered. Click below to read more...



The first problem we have encountered is that nothing seemed to work properly ;-))

We found out that the main cause of our problems was related to the tremendous amount of files MyEclipse 7.5 opens compared to 5.1.

You can obtain a ball park figure by typing the following command, say your user name is "developer":

With MyEclipse 7.5 running:

developer@host:~$ lsof -u developer | grep -c ""
developer@host:~$ lsof | grep -c ""

With MyEclipse 7.5  NOT running:

developer@host:~$ lsof -u developer | grep -c ""
developer@host:~$ lsof | grep -c ""

On most Linux distributions, the default number of files a user can open within its shell is usually limited to 1024 while MyEclipse 7.1 opens a larger number of files than 1024 so MyEclipse 7.5 cannot access all the files it needs and this causes all sort of hard to pinpoint problems.


developer@host:~$ ulimit -n

Here is MyEclipse recommendation to fix this issue on most distributions:

And here is the way to fix this under the Slackware distribution:

cd /sbin

cp -p  initscript.sample initscript

edit initscript so it contains the following, we have chosen to raise the number of files from 1024 to16184, adjust the number at your convenience:

  export PATH

  ulimit -Hn 16184
  ulimit -Sn 16184

  # Execute the program.
  eval exec "$4"

Now ulimit -n retruns 16184 and everything works fine:

developer@host:~$ ulimit -n

NOTE: As far as we know, You need to reboot the machine for the ulimit change to take effect.


We then experienced a problem with Struts DynaActionForm deploying to servers running java 6. Everything worked fine with servers running on java 5 or lower.

We found out that the problem was in  struts-config.xml, we had form properties declared as:

<form-bean name="rechercheForm"
            <form-property name="searchTypes" type="[Ljava.lang.String;" />


 We had to replace those declarations with the following in order to run on all servers, including the ones using java 6:

<form-bean name="rechercheForm"
            <form-property name="searchTypes" type="java.lang.String[]" />


Everything runs fine now, we can deploy to servers running java 1.4, java 5 and java 6 by setting the appropriate compiler compatibility level by right clicking on the project->Properties->Java Compiler ! ;-))


Ajouter votre commentaire / Add your comment

Votre nom / Your name:
Sujet / Subject:
SPAM: Ne pas inclure de lien ou utiliser le stratagème suivant: " slash mapage.html"     Nous utilisons un filtre qui bloque les commentaires suspects avec une erreur 403. De même, du code de programmation ou sql peut provoquer des erreurs 403. Veuillez utiliser un lien vers votre code tel que: " slash jVNqLieD"    Merci!
SPAM: Do not include any links in your post or use the following construct: " slash mypage.html"    We are using a filter that denies suspicious posts with a 403 error. Programming language or SQL code may also cause a 403 error. Please provide a link to your code instead like: " slash jVNqLieD"    Thank you! :
  Lettres de vérification; lettres minuscules seulement, pas d
Retaper les lettres affichées / Word verification:
Mis à jour / Last updated ( lundi, 30 novembre 2009 06:58 )

Consultez TOUS nos fils d'actualité ici. / View ALL our newsfeed here.