167

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

8
  • 1
    I am seeing this in Luna too.
    – Dave
    Oct 13, 2014 at 19:09
  • 1
    It's happening to me in Mars 2 as well
    – JuanN
    Aug 8, 2016 at 8:52
  • 2
    On the same machine, hapening in Neon but not in Mars for me... Oct 5, 2016 at 15:46
  • 1
    Happening in Neon.2, and not even using JPA.
    – Ed Randall
    Aug 12, 2017 at 7:21
  • 3
    Its there in 2020-03 too Mar 24, 2020 at 6:21

11 Answers 11

176

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.

19
  • 10
    On a side note: the eclipse team should probably try to open a discussion on the amount of included and not deselectable features/project included in a release. And it should maybe discuss ways to disable packaged features (such as JPT).
    – mwhs
    Mar 31, 2014 at 8:38
  • 2
    Same problem with 'JPA Project Change Event Handler' stalling Eclipse Luna Build 4.4.0. @mwhs solution works with Luna as well if you don't need the JPA tools (install JBoss Hibernate Tools instead, which are far more powerful anyway, if you're working with Hibernate) Sep 4, 2014 at 12:20
  • 3
    Nice find! Unfortunately, the DALI bug is closed since 2012-08-29, but 2 years later I still had the same problems in Luna/STS 3.6.1 (with a Git repo outside of the workspace). I did not try your solution, as I also kept running into Remote System Explorer slowdowns (even though I tried to disable that), so in the end I just installed a vanilla Eclipse for Java (not even JEE), added JST Server Adapters & extensions, m2e-wtp, and AspectJ Development Tools using download.eclipse.org/tools/ajdt/44/dev/update. Lightning fast, finally.
    – Arjan
    Sep 15, 2014 at 19:03
  • 11
    I forgot to mention that the command move features\org.eclipse.jpt.* disabled\features did not work for me (on Win7 x64) and I had to manage those manually. I suspect this is because this contains folders instead of files and... well, let's just say that after you've written enough windows batch scripts, you'll probably start to question if the language was in fact designed by an experimental Microsoft team composed entirely of illiterate drunken chimpanzees with severe ADHD. Or you may just wonder why OOTB Unix support wasn't added to the command prompt with the NTFS versions of Windows.
    – zpangwin
    Jan 13, 2015 at 22:21
  • 3
    Amazingly enough, this problem still persists in eclipse oxygen (september 2017), and your solution did the trick for me. Oct 16, 2017 at 9:43
78

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

2
  • 6
    I also removed "EclipseLink JPA Support" as well
    – Venu
    Mar 31, 2017 at 18:10
  • This solution worked for me, for a period... then after months open again Eclipse and it still boring me with this... I uninstalled all DALI plugins (months ago), and in the beginning was working, but now looks like this have no effects anymore... Feb 14 at 10:09
41

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.

3
  • Great, thanks, I was still seeing this issue in Photon 4.8.0 on Mac and this is the only proposed solution that works for me.
    – otter606
    Aug 27, 2018 at 8:19
  • This worked for me. Oct 30, 2021 at 5:53
  • Didnt work for me in Eclipse 2020
    – coderzzz18
    Jan 11, 2022 at 14:04
27

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

3
  • 11
    Amazing - I have JPA Validation unchecked but I still get the JPA Change Event Handler!
    – Magick
    Mar 23, 2018 at 11:17
  • 2
    This worked for me. In fact, it's better to DISABLE ALL, and enable ONLY what's required. For example, if you're not working with 'web projects' you don't need any sort of jsp*, jsf*, html, etc. This has helped fine-tune validation for each module/project. Saving precious time - a lot.
    – RafiAlhamd
    Apr 6, 2020 at 6:39
  • 1
    Issue still exists in 2024 (Version: 2023-12 (4.30.0), Build id: 20231201-2043). This solution is the one working.
    – snuk182
    Mar 12 at 9:40
16

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.

2
  • 6
    This might work for some but for most people it won't work. I removed the JPA facet from all my projects but I still get a hung up environment. The reason might be related to Maven restoring JPA or something like that but the fact is that this doesn't work even after following these very logical steps.
    – Calabacin
    Oct 19, 2016 at 11:12
  • above solution worked for me in eclipse 2020-03. Thanks @dgolovin. Apr 24, 2020 at 8:16
9

Well this was initially asked 7 years ago....So let me give a very stable answer to it.

I am using eclipse 2021-09 (yes..the one just released few days ago)

TO TURN OFF JPA Project Change Event Handler (waiting)

  1. Make sure no instance of eclise is running. Do suspend the validations for JPA from windows > preference > Validations

  2. Go to [Installation directory]\eclipse\configuration\org.eclipse.equinox.simpleconfigurator

  3. Edit bundles.info using notepad++ or wordpad or notepad in such a way that

  4. You have to remove the lines that has org.[something].jpa (Sorry I don't remember exact name :P) and save the file.

  5. Launch the eclipse and there you go, you won't see those troublesome "JPA Project Change Event Handler (waiting)" message in your elipse's console.

4
  • if we do the 1st step is it also important to delete lines from bundles.info? @Akshay
    – coderzzz18
    Jan 11, 2022 at 7:50
  • Yes, that will work as 2-step deletion to ensure complete removal
    – Akshay
    Jan 12, 2022 at 15:06
  • I'm using Version: 2019-06 (4.12.0) and followed this step, looks like it's working!
    – Suresh
    Jul 4, 2022 at 7:23
  • Hello, where is "windows > preference > Validations" ? is not in Eclispe? but "Make sure no instance of eclise is running." .... so where is this menu/setting ? Feb 14 at 10:06
8

minor correction to mwhs's answer for the windows portion...

The move command does not work for the .\features folder because... well, frankly because Windows is retarded (you can use wildcards with 'move' on files, but apparently wildcards + folders == ignore the command). Anyway, this should work as an alternative to the windows snippet provided for step #2 in his answer.

as a batch file:

@echo off
set eclipse_dir=C:\eclipse_luna

mkdir disabled
mkdir disabled\features 
mkdir disabled\plugins

move plugins\org.eclipse.jpt.* disabled\plugins
for /f %%i in ('dir "%eclipse_dir%\features\org.eclipse.jpt.*" /ad /b') do (
    move "%eclipse_dir%\features\%%i" "%eclipse_dir%\disabled\features\%%i"
)
2

Also, if you cannot find your eclipse dir. Because, I had such problem on mac we can remember that eclipse is using OSGi, so we can go to Target Platform and disable features/plugins that were described above: org.eclipse.jpt.* enter image description here

2

The solution for eclipse photon seems to be:

  1. open ./eclipse/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info
  2. delete the lines starting with org.eclipse.jpt (might work to only remove org.eclipse.jpt.jpa)
-2

The issue seems to be resolved with the new Eclipse. The plugin isn't available with Java Enterprise suite.

1
  • 3
    I'm still experiencing this problem with Eclipse Version: 2020-12 (4.18.0).
    – aventurin
    Jan 26, 2021 at 17:43
-5

It works for me. Eclipse 2021-09. You have to delete all lines containing jpa.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.