Affichage des articles dont le libellé est eclipse. Afficher tous les articles
Affichage des articles dont le libellé est eclipse. Afficher tous les articles

samedi 7 décembre 2013

How to disable JavaScript Validation from Eclipse Project ?



  1. Right click your project
  2. Select Properties -> JavaScript -> Include Path
  3. Select Source tab. ( It looks identical to Java Build Path Source tab )
  4. Expand JavaScript source folder
  5. Highlight Excluded pattern
  6. Click Edit button
  7. Click Add button next to Exclusion patterns box.
  8. You may either type Ant-style wildcard pattern, or click Browse button to mention the JavaScript source by name.
The information about JavaScript source inclusion/exclusion is saved into .settings/.jsdtscope file. Do not forget to add it to your SCM.
Here is how configuration looks with jquery files removed from validation


lundi 22 juillet 2013

There are no resources that can be added or removed from the server

Some time would like to deploy an ear file to WAS (Web Application Server) as usual. But Eclipse fail to find your EAR and it show an alert like this :

 There are no resources that can be added or removed from the server   

the solution is that your project needs to have a Eclipse Dynamic Web Module facet. 

  1. right click on project and click properties
  2. Go to Project Facet and Select dynamic web module and click apply.
  3. go to tomcat and click add/remove

How to fix GC overhead limit exceeded in Eclipse


Eclipse will throw GC overhead limit exceeded error when it runs out of memory, normally while performing memory-consuming operations such as building workspace on big projects.

 An internal error occurred during: "Building workspace". GC overhead limit exceeded  
To fix this problem, you'll need to allocate more memory to your Eclipse instance. To do this, go to the Eclipse installation directory, and locate the eclipse.ini file.
To increase the memory allocation for your Eclipse instance, edit the number in the following lines accordingly.
 -Xms1024m   
 -Xmx2048m  
The number is the amount of memory, in Megabytes.
You can also increase the value of MaxPermSize, as the following:
 -XX:MaxPermSize=1024m  

Restart Eclipse for the changes to take effect.

mercredi 26 juin 2013

How do I increase the permgen size of Tomcat Server ?





  • Increase the Heap size from the catalina.sh file



Tomcat production server sometime will hit the following java.lang.OutOfMemoryError: PermGen space error.


java.lang.OutOfMemoryError: PermGen space
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)

you should increase the memory by make change in catalina.sh.

Cataline.sh is located at \tomcat folder\bin\catalina.sh
Assign following line to JAVA_OPTS variable and add it into catalina.sh file.
export CATALINA_OPTS="-Xms512m -Xmx1024m"
JAVA_OPTS="-Djava.awt.headless=true -Dfile.encoding=UTF-8 
-server -Xms2536m -Xmx2536m
-XX:NewSize=256m -XX:MaxNewSize=1024m -XX:PermSize=1536m 
-XX:MaxPermSize=1536m -XX:+DisableExplicitGC"

  • Increase the Heap size from the the Eclipse IDE


if you are using tomcat sever with eclipse you need to resolve this exception by modifying the tomcat arguments :
If you see java.lang.OutOfMemoryError: PermGen space errors, you need to increase the permanent generation space available to Eclipse.
PermGen is the permanent generation of objects in the VM (Class names, internalized strings, objects that will never get garbage-collected). An easy, if somewhat memory-hungry fix is to enlarge the maximum space for these objects by adding


  • double click on the tomcat server
  • Click to Open Launch Configuration

  • Choose the Arguments tab and add the following parameters
     -Xms1024m -Xmx1024m -XX:PermSize=1024m -XX:MaxPermSize=1024m





  • Be Careful !!!!
you have to be careful when increasing the heap size of your tomcat server and jvm.


 As you can see, if you allocate a large Java Heap (2 GB+) for a 32-bit JVM process, the native memory space capacity will be reduced automatically, opening the door for JVM native memory allocation failures.
you will get the following exception :OutOfMemoryError: unable to create new native thread


For a 64-bit JVM process, your main concern, from a JVM C-Heap perspective, is the capacity and availability of the OS physical, virtual and swap memory.
 What you will learn shortly is that this JVM problem is very often related to native memory depletion; either at the JVM process or OS level. For now please keep in mind that:



  • A 32-bit JVM process is in theory allowed to grow up to 4 GB (even much lower on some older 32-bit Windows versions).
  • For a 32-bit JVM process, the C-Heap is in a race with the Java Heap and PermGen space e.g. C-Heap capacity = 2-4 GB – Java Heap size (-Xms, -Xmx) – PermGen size (-XX:MaxPermSize)
  • A 64-bit JVM process is in theory allowed to use most of the OS virtual memory available or up to 16 EB (16 million TB)






samedi 15 juin 2013

An internal error occurred during: "Updating Maven Project”



This is all you need:
  1. Right-click on your project, select Maven -> Remove Maven Nature.
  2. Open you terminal, go to your project folder and do “mvn eclipse:clean”
  3. Right click on your Project and select “Configure -> Convert into Maven Project”
  4. mvn elcipse:eclipse
  5. Then in Eclipse, I right-clicked my project(s) and then Maven > Update Project