Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 466421 - Unable to cancel "Building JPA Project"
Summary: Unable to cancel "Building JPA Project"
Status: RESOLVED FIXED
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: JPA (show other bugs)
Version: 3.4   Edit
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Brian Vosburgh CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-05 08:32 EDT by Ivica Loncar CLA
Modified: 2019-02-06 18:09 EST (History)
5 users (show)

See Also:


Attachments
visualvm_profiler_output (34.88 KB, application/octet-stream)
2015-05-05 08:32 EDT, Ivica Loncar CLA
no flags Details
stacktrace (20.38 KB, application/octet-stream)
2015-05-05 08:39 EDT, Ivica Loncar CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ivica Loncar CLA 2015-05-05 08:32:42 EDT
Created attachment 253167 [details]
visualvm_profiler_output

I have JPA project set up using Eclipse Link provider and I cannot close workspace because JPA build cannot be cancelled.


It seems it gets stuck at the same place each time.


Please find output from jvisualvm CPU profiler attached to this ticket.
Comment 1 Ivica Loncar CLA 2015-05-05 08:35:48 EDT
  Eclipse IDE for Java EE Developers	4.4.2.20150219-0708	epp.package.jee	null

  Dali Java Persistence Tools - Common	1.4.1.v201410241959	org.eclipse.jpt.common.feature.feature.group	Eclipse Web Tools Platform

  Dali Java Persistence Tools - EclipseLink JPA Support	3.4.1.v201409111648	org.eclipse.jpt.jpa.eclipselink.feature.feature.group	Eclipse Web Tools Platform

  Dali Java Persistence Tools - JPA Support	3.4.1.v201410241959	org.eclipse.jpt.jpa.feature.feature.group	Eclipse Web Tools Platform
Comment 2 Ivica Loncar CLA 2015-05-05 08:39:54 EDT
Created attachment 253169 [details]
stacktrace

stacktrace - same project, new eclipse process
Comment 3 Ivica Loncar CLA 2015-05-05 08:52:57 EDT
I guess that the following TODO in AbstractJPAProject should be implemented?

> 	/**
>	 * Called by the {@link UpdateJobCommand#execute(IProgressMonitor)}.
>	 */
>	// TODO pass the monitor down
>	protected IStatus update(@SuppressWarnings("unused") IProgressMonitor monitor) {
>		this.contextRoot.update();
>		this.updateRootStructureNodes();
>		return Status.OK_STATUS;
>	}
Comment 4 Kevin Hooke CLA 2016-01-07 14:39:19 EST
Seems to occur when opening workspace containing a project with JPA facet the first time that day. The task does not cancel if you try to cancel it in the Progress View. Closing Eclipse while the task is cancelling just hangs indefinitely and you need to kill the Eclipse process. Restarting after killing it does not appear to restart the JPA builder again. Eclipse Luna 4.4.2 20150219-0600
Comment 5 Brian Vosburgh CLA 2016-01-13 15:28:23 EST
I have made a change for Neon that allows the user to cancel the "Building JPA Project" job.

But: The reason this job never stopped executing is because there is a bug in the Dali Update process that re-triggers itself indefinitely. The Update process is initially triggered by any change to Dali-related resources (e.g. an edit of an Entity's Java source file). The Update itself can trigger further Updates if it changes non-resource-related settings (e.g. an attribute's default mapping). The problematic project must have some odd configuration that causes this. It would be very helpful if you can figure out what it is in your project that is triggering this behavior. We have had this type of thing, very rarely, in the past (e.g. a Java inheritance loop, which is possible in source code, used to trigger ever-repeating Updates).
Comment 6 Richard Kennard CLA 2016-11-17 16:23:50 EST
Brian,

Thanks for your fix. This is still a problem for my project on Neon.

Have you raised a tracker for the Dali Update bug you mentioned? Could you paste a link here so I can track it?

Regards,

Richard.
Comment 7 Rajesh Gupta CLA 2019-02-06 18:09:56 EST
I was getting this same problem when the network proxy setting was set to dynamic. When I changed it to manual. That fixed the problem. I am using
Version: Photon (4.8)
Build id: I20180611-0500