64

I have just upgraded to Eclipse Juno 4.2. I have a completely clean new workspace, but have imported projects that have previously been used in Eclipse 3.7 and therefore have some Eclipse metadata in them.

When moving to 4.2 I converted a project to use "Project Facets". The only Facet enabled is "Java".

However, I regularly get "JPA Java Change Event Handler (Waiting)" appearing in my progress view. I do have JPA annotated classes within the project, but I do not have the JPA facet enabled.

So...why am I getting these tasks being run by Eclipse?

Screenshot of eclipse progress window

Update: Have submitted bug to Eclipse and it is being looked at by the looks of it: https://bugs.eclipse.org/bugs/show_bug.cgi?id=386171

Kieran
  • 5,906
  • 3
  • 24
  • 34
  • 1
    Good question! I am having the same issue. Still investigating... – Jose Jul 24 '12 at 13:07
  • possible duplicate of [Eclipse Kepler JPA Project Change Event Handler (waiting)](http://stackoverflow.com/questions/19649847/eclipse-kepler-jpa-project-change-event-handler-waiting) – mwhs Mar 31 '14 at 12:18
  • Take a look at this question, it also shows how to disable the JPT causing the trouble: http://stackoverflow.com/questions/19649847/eclipse-kepler-jpa-project-change-event-handler-waiting/20142580 – mwhs Mar 31 '14 at 12:19

6 Answers6

21

Unfortunately, the JPA java completion proposals extension point is incorrectly forcing o.e.jpt.jpa.core plug-in activation. Once our plug-in is activated we start listening for java events and facet events, whether JPA faceted or not. In Juno these background threads were converted to the Eclipse Jobs framework. In Helios you would not have seen them in the Progress View, but the same problem existed.

Thanks for entering a bug against Dali https://bugs.eclipse.org/bugs/show_bug.cgi?id=386171 for this problem.

Update: The bug has been fixed for Juno SR1, thanks to JDT Text for their quick turn around on this Dali bug!

Update 2: This problem is still occurring for other use cases. In Juno SR2 there are 3 bugs being worked on that will help resolve this issue. Some of these have further fixes that will need to go in Kepler. See bugs:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=397778

https://bugs.eclipse.org/bugs/show_bug.cgi?id=397606

https://bugs.eclipse.org/bugs/show_bug.cgi?id=386393

Karen Butzke
  • 1,442
  • 12
  • 18
  • I see the bug has started to move through the process, thanks for that. – Kieran Aug 01 '12 at 08:33
  • and when will that fix become available, and is there any way to stop it from happening before SR1 arrives? – Oleg Mikheev Sep 24 '12 at 17:46
  • SR1 is arriving this Friday September 28th. Only way I can think of to stop it would be to not install the Dali Java Persistence Tools plugins – Karen Butzke Sep 24 '12 at 18:06
  • 6
    This bug is not fixed, and it does show up in the latest version of both Eclipse 3.x and 4.x (I'm using the latest STS builds). I've never used JPA, I have no provider, I have nothing JPA related enabled whatsoever, no project facets enabled, nothing. Yet I am plagued by this in Eclipse – Alex Jan 08 '13 at 16:12
  • Alex, I am currently working on trying to fix this further in SR2. 2 issues I am trying to resolve are that java refactorings and xml code assist are triggering the jpa plug-ins to load. Do you do either or both of those? I'm trying to figure out if there are other things that make our plug-ins load – Karen Butzke Jan 09 '13 at 17:03
  • @KarenButzke For what it's worth: I'm still seeing this issue on STS 3.2.0 built on Eclipse 4.2.2 - even though much less frequent. This issue - for me - happens most frequently when Eclipse builds a project after a large code update (from CVS, for instance). This queues up several hundreds JPA change event handling operations which take about 30 seconds to complete. – tmbrggmn May 06 '13 at 13:09
  • Definitely this bug is not fixed, on SR2 (Juno), it would be nice if the overall problematic status was properly reflected on the Eclipse BugZilla issue tracker (some of these issues are marked as fixed) and is somewhat misleading :(. Thanks for your time :) – javapapo Jun 06 '13 at 07:30
  • I have added a comment on https://bugs.eclipse.org/bugs/show_bug.cgi?id=386171, I think that the issue not yet resolved. At the time being my only way on working with Juno or Kepler(RC) is to disable the JPA Facet on the related project. I will try to provide more information to the team. – javapapo Jun 10 '13 at 06:27
  • Concur. Not fixed. I see various Dali version numbers in my updated Eclipse: Dali Common 1.2.2 Dali Eclipselink Common 1.2.1 Dali Eclipselink JPA Support 3.2.2 etc – Marc Jul 09 '13 at 18:20
  • 6
    Still not fixed in: Version: Kepler Service Release 1 Build id: 20130919-0819 – jonathan.cone Nov 01 '13 at 19:08
  • I am seeing this too a lot with the Kepler release 20130614-0229 (WTP). Is there a way to disable DALI? I don't need it. – mwhs Nov 19 '13 at 14:56
  • 4
    Still not fixed in latest Luna – peterh Oct 06 '14 at 16:04
  • 9
    Still not fixed in Mars – eztam Oct 05 '15 at 19:55
  • Still not fixed, everytime you save a file, the event handler is registered again, and again, and again. After a few hundred of file saves, the event is triggered hundred of times, slowing down Eclipse badly. – Guillaume F. Nov 19 '15 at 11:23
  • 7
    Not fixed in Eclipse Neon 4.6.1 using Spring STS 3.8.2 – Selaron Nov 15 '16 at 09:18
  • Getting lots of JPA Java change event handler (waiting) in eclipse photon 4.8.0 build id 20180619-1200 – user1821961 Jul 18 '18 at 13:35
16

I've experienced this behavior whenever I disabled the JPA Validator in Window => Preferences => Validation. Enabling it for both Build and Manual made the crazy loop disappear.

npe
  • 15,395
  • 1
  • 56
  • 55
  • 1
    I know it's been a while, but just to be sure, as for me (STS 3.6.1, which is based on Luna, using a Git repo outside of the Eclipse workspace) changing anything there has no effect: *disabling* caused this and *enabling* resolved it for you? – Arjan Sep 15 '14 at 15:00
  • 1
    I had this issue on a project using OpenJPA, maven-generated JPA classes, and "experimental annotation processing" set in Eclipse's maven settings. When JPA Validation was enabled, the project took ages to build, and when disabled it went in a crazy loop, validating JPA over and over - which meant the build never finishes. – npe Sep 16 '14 at 08:03
  • You mean uncheck the 2 options. – Eric Nov 08 '16 at 03:11
  • No, I meant exactly what I wrote. YMMV. – npe Nov 08 '16 at 06:13
6

I found (in Eclipse Neon where this still occurs) that removing all the groups in the JPA Validator worked well. Click on the box to the right of JPA Validator and remove all the included groups:

enter image description here

GlorianChris
  • 217
  • 4
  • 16
2

The drastic solution in my case was to uninstall "Dali JPA". That seemed to solve the issue for me.

Of course it is not the best solution. Try first to enable the validation as explained in NPE's anwser. Bug 386171 has people that report the same problem at May of 2015 so I must not be the only one.

I would be very happy to delete my answer if something better is found.

borjab
  • 11,149
  • 6
  • 71
  • 98
2
set eclipse_dir=D:\eclipse\release

mkdir %eclipse_dir%\disabled
mkdir %eclipse_dir%\disabled\features 
mkdir %eclipse_dir%\disabled\plugins

move %eclipse_dir%\plugins\org.eclipse.jpt.* disabled\plugins

for /f %%i in ('dir features\org.eclipse.jpt.*" /ad /b') do (
    move features\%%i" "%eclipse_dir%\disabled\features\%%i"
)
Sterling Archer
  • 22,070
  • 18
  • 81
  • 118
0

I had the same issue I had the same issue in eclipse 4.5.2 (mars 2). I've tried almost every answer from stackoverflow, tuned my eclipse settings (I thought maybe its a performance issue).

Problem stops after disabling JPA in Project Facets in every Project properties.

enter image description here

After this change Eclipse keeps yelling about JPA Event Handler but it doesn't take ages to finish save or clean, so it looks like its disabled (before changing this it took something about 10 minutes to finish, now its matter of seconds)

Hope that help someone to fix this problem.

enter image description here

jordiburgos
  • 5,964
  • 4
  • 46
  • 80
daredesm
  • 597
  • 2
  • 7
  • 22