Eclipse JPA Project Change Event Handler (waiting)

Why am I getting 'JPA Project Change Event Handler (waiting)', whenever I try to build my project.

I have some JPA projects in my workspace and It takes lot of time to build my project. It also leads to GC over limit with 6GB of heap space allocated to eclipse

I'm currently using Kepler. This issue did not occur in Helios.

There are some BugZilla entries for the above bug, but I can see them fixed. But not available in 4.3.1?

Any solutions/workarounds for the above issue?

Thanks


Solution 1:

I had the same problem and I ended up finding out that this seems to be a known bug in DALI (Eclipse Java Persistence Tools) since at least eclipse 3.8 which could cause the save action in the java editor to be extremly slow.

Since this hasn't been fully resolved in Kepler (20130614-0229) yet and because I don't need JPT/DALI in my eclipse I ended up manually removing the org.eclipse.jpt features and plugins.

What I did was:

1.) exit eclipse

2.) go to my eclipse install directory

cd eclipse

and execute these steps:

*nix:

mkdir disabled
mkdir disabled/features disabled/plugins

mv plugins/org.eclipse.jpt.* disabled/plugins
mv features/org.eclipse.jpt.* disabled/features

windows:

mkdir disabled
mkdir disabled\features 
mkdir disabled\plugins

move plugins\org.eclipse.jpt.* disabled\plugins
for /D /R %D in (features\org.eclipse.jpt.*) do move %D disabled\features

3.) Restart eclipse.

After startup and on first use eclipse may warn you that you need to reconfigure your content-assist. Do this in your preferences dialog.

Done.

After uninstalling DALI/JPT my eclipse feels good again. No more blocked UI and waiting for seconds when saving a file.

Solution 2:

Don't know why, my Neon Eclipse still having this issue, it doesn't seem to be fixed in Mars version as many people said.

I found that using command is too troublesome, I delete the plugin away via the Eclipse Installation Manager.

Neon: [Help > Installation Details > Installed Software]

Oxygen: [Preferences > Install/Update > Installed Software]

Just select the plugin "Dali Java Persistence Tools -JPA Support" and click "uninstall" will do. Please take note my screen below doesn't have that because I already uninstalled.

enter image description here

Solution 3:

I still have the same issue in Neon.2 My solution is to disable the JPA Configurator.

Open the Eclipse Preferences (not the project prefs!). Go to Maven --> Java EE Integration and disable the JPA Configurator. I also disabled the JAX-RS Configurator and the JSF Configurator.

From that point on the JPA Project Change Event Handler doesn't show up anymore.

Restart Eclipse if the change does not take effect immediately.

Solution 4:

I have disabled (unchecked) the JPA validator.

Now whenever I save the file, it shows only one task for JPA Project Change Event Handler and only 2 or 3 for JPA Java Change Event Handler.

And most important, the UI Hang issue is resolved.

Please refer following screen shot for the setting I have made :

enter image description here

Solution 5:

There is another way to disable JPA tools for the project, that doesn't require to uninstall JPA features/plug-ins. I tested on https://github.com/Jasig/uPortal project wich was mentioned in https://bugs.eclipse.org/bugs/show_bug.cgi?id=386171 and claims to have similar problems:

  1. Switch to Eclipse Projects Explorer View to see the projects with JPA Facet Enabled (there should be "JPA Content" node);
  2. Select the project of interest which has "JPA Content" node and select Properties from context menu or press Alt+Enter to show Properties dialog for the project;
  3. Select "Project Facets" node in tree with categories;
  4. Clear JPA check box in project facets list and press OK.

After disabling JPA facet for uportal-war project form repository above I don't see any JPA related jobs in Eclipse Progress View.