Eclipse JPA 项目更改事件处理程序(等待)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19649847/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Eclipse JPA Project Change Event Handler (waiting)
提问by Surendran Duraisamy
Why am I getting 'JPA Project Change Event Handler (waiting)', whenever I try to build my project.
为什么每次我尝试构建我的项目时都会收到“JPA 项目更改事件处理程序(等待)”。
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
我的工作区中有一些 JPA 项目,构建我的项目需要很多时间。它还导致 GC 超过限制,分配给 eclipse 的堆空间为 6GB
I'm currently using Kepler. This issue did not occur in Helios.
我目前正在使用开普勒。在 Helios 中未出现此问题。
There are some BugZilla entries for the above bug, but I can see them fixed. But not available in 4.3.1?
上述错误有一些 BugZilla 条目,但我可以看到它们已修复。但在 4.3.1 中不可用?
Any solutions/workarounds for the above issue?
上述问题的任何解决方案/解决方法?
Thanks
谢谢
回答by mwhs
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.
我遇到了同样的问题,我最终发现这似乎是DALI(Eclipse Java 持久性工具)中的一个已知错误,因为至少 eclipse 3.8 可能导致java 编辑器中的保存操作极其缓慢。
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.
由于这在 Kepler (20130614-0229) 中还没有完全解决,并且因为我的 Eclipse 中不需要 JPT/DALI,所以我最终手动删除了org.eclipse.jpt
功能和插件。
What I did was:
我所做的是:
1.) exit eclipse
1.) 退出日食
2.) go to my eclipse install directory
2.) 进入我的 eclipse 安装目录
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.
3.) 重新启动日食。
After startup and on first use eclipse may warn you that you need to reconfigure your content-assist. Do this in your preferences dialog.
启动后和第一次使用 eclipse 可能会警告您需要重新配置 content-assist。在您的首选项对话框中执行此操作。
Done.
完毕。
After uninstalling DALI/JPT my eclipse feels good again. No more blocked UI and waiting for seconds when saving a file.
卸载 DALI/JPT 后,我的 eclipse 感觉又好了。保存文件时不再阻塞 UI 并等待几秒钟。
回答by GMsoF
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.
不知道为什么,我的Neon Eclipse 还是有这个问题,好像很多人说的Mars 版本没有修复。
I found that using command is too troublesome, I delete the plugin away via the Eclipse Installation Manager.
我发现使用命令太麻烦,我通过Eclipse安装管理器删除了插件。
Neon: [Help > Installation Details > Installed Software]
Neon:[帮助 > 安装详细信息 > 已安装的软件]
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.
只需选择插件“Dali Java Persistence Tools -JPA Support”并点击“卸载”即可。请注意我下面的屏幕没有那个,因为我已经卸载了。
回答by M46
I still have the same issue in Neon.2 My solution is to disable the JPA Configurator.
我在 Neon.2 中仍然有同样的问题我的解决方案是禁用 JPA 配置器。
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.
打开 Eclipse 首选项(不是项目首选项!)。转到 Maven --> Java EE 集成并禁用 JPA 配置器。我还禁用了 JAX-RS 配置器和 JSF 配置器。
From that point on the JPA Project Change Event Handler doesn't show up anymore.
从那时起,JPA 项目更改事件处理程序不再出现。
Restart Eclipse if the change does not take effect immediately.
如果更改没有立即生效,请重新启动 Eclipse。
回答by Anil Bharadia
I have disabled (unchecked) the JPA validator.
我已禁用(未选中)JPA 验证器。
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.
现在,每当我保存文件时,它只显示 JPA 项目更改事件处理程序的一项任务,而 JPA Java 更改事件处理程序只显示 2 或 3 个任务。
And most important, the UI Hang issue is resolved.
最重要的是,UI 挂起问题已解决。
Please refer following screen shot for the setting I have made :
请参阅以下屏幕截图以了解我所做的设置:
回答by dgolovin
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/uPortalproject wich was mentioned in https://bugs.eclipse.org/bugs/show_bug.cgi?id=386171and claims to have similar problems:
还有另一种方法可以禁用项目的 JPA 工具,不需要卸载 JPA 功能/插件。我在测试https://github.com/Jasig/uPortal至极被中提到的项目https://bugs.eclipse.org/bugs/show_bug.cgi?id=386171并声称有类似的问题:
- Switch to Eclipse Projects Explorer View to see the projects with JPA Facet Enabled (there should be "JPA Content" node);
- 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;
- Select "Project Facets" node in tree with categories;
- Clear JPA check box in project facets list and press OK.
- 切换到 Eclipse Projects Explorer View 以查看启用了 JPA Facet 的项目(应该有“JPA Content”节点);
- 选择具有“JPA Content”节点的感兴趣的项目,然后从上下文菜单中选择“属性”或按 Alt+Enter 以显示该项目的“属性”对话框;
- 在带有类别的树中选择“Project Facets”节点;
- 清除项目方面列表中的 JPA 复选框,然后按 OK。
After disabling JPA facet for uportal-war project form repository above I don't see any JPA related jobs in Eclipse Progress View.
在为上面的 upportal-war 项目表单存储库禁用 JPA facet 后,我在 Eclipse Progress View 中看不到任何与 JPA 相关的作业。
回答by zpangwin
minor correction to mwhs's answer for the windowsportion...
对 mwhs 对窗户部分的回答的小幅修正......
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.
移动命令不适用于 .\features 文件夹,因为...好吧,坦率地说,因为 Windows 被延迟了(您可以在文件上使用带有“移动”的通配符,但显然通配符 + 文件夹 == 忽略该命令)。无论如何,这应该可以替代他的答案中为第 2 步提供的 Windows 代码段。
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"
)
回答by Igor Masternoy
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.*
另外,如果您找不到 eclipse 目录。因为,我在 mac 上遇到了这样的问题,我们可以记住 eclipse 使用的是 OSGi,所以我们可以转到目标平台并禁用上面描述的功能/插件:org.eclipse.jpt.*
回答by Olard
The solution for eclipse photon seems to be:
日食光子的解决方案似乎是:
- open ./eclipse/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info
- delete the lines starting with org.eclipse.jpt (might work to only remove org.eclipse.jpt.jpa)
- 打开./eclipse/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info
- 删除以 org.eclipse.jpt 开头的行(可能只删除 org.eclipse.jpt.jpa)
回答by ha9u63ar
The issue seems to be resolved with the new Eclipse. The plugin isn't available with Java Enterprise suite.
新的 Eclipse 似乎解决了这个问题。该插件不适用于 Java Enterprise 套件。