Eclipse Dali JPA 错误:“控制台配置”“不存在”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11425932/
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 Dali JPA error : 'Console configuration "" does not exist'
提问by Dustin
I have looked everywhere and tried to get to the root of this error but am Having no luck. I have Eclipse STS with Dali JPA Tools installed. I have a project with a connected HSQLDB and entities. When I go to the JPA perspective I have this error in my error console :
我到处寻找并试图找到这个错误的根源,但我没有运气。我安装了带有 Dali JPA Tools 的 Eclipse STS。我有一个连接 HSQLDB 和实体的项目。当我转到 JPA 透视图时,我的错误控制台中出现此错误:
Console configuration "" does not exist.
Console configuration "" does not exist.
What does this mean?
这是什么意思?
Thanks.
谢谢。
回答by higuaro
I also had this problem once. Arises when you check-out a project from a source control repository and some of the configurations held by the project creator are not shared among team members. By chance, are you using HibernateJPA as the JPA implementation? In that case, check the following:
我也遇到过这个问题。当您从源代码控制存储库签出项目并且项目创建者持有的某些配置未在团队成员之间共享时出现。碰巧,您是否使用 HibernateJPA 作为 JPA 实现?在这种情况下,请检查以下内容:
Go to your project Properties > Hibernate Settings
, once there, check the combobox below the "Default Hibernate Console Configuration"label and select a console configuration. If none console configuration exists, go to Run > Run Configurations ...
and under Hibernate Console Configuration
create a new Configuration, specify the project name, in the "Database connection:" combobox select "[JPA Project Configured Connection]", click Apply and return to the "Hibernate Settings" settings page of your project configuration.
转到您的项目Properties > Hibernate Settings
,在那里检查“默认休眠控制台配置”标签下方的组合框 并选择一个控制台配置。如果不存在控制台配置,则转到Run > Run Configurations ...
并在Hibernate Console Configuration
创建新配置下,指定项目名称,在“数据库连接:”组合框中选择“[JPA 项目配置的连接]”,单击应用并返回“休眠设置”设置页面您的项目配置。
Once everything is done, clean your project (maybe it has be done a couple of times before the error dissapears though, due to some eclipse issues), if the project doesn't refresh properly, restart Eclipse (yes, it's kind of extreme but sometimes it just works).
一切都完成后,清理您的项目(可能在错误消失之前已经完成了几次,但由于某些 Eclipse 问题),如果项目没有正确刷新,请重新启动 Eclipse(是的,这有点极端,但是有时它只是有效)。
If you're using Maven and the m2e plugin, right-click in your project and goto to Maven > Update Project Configuration...
and wait for the project to been refreshed.
如果您正在使用 Maven 和 m2e 插件,请右键单击您的项目并转到Maven > Update Project Configuration...
并等待项目刷新。
回答by feder
In case the Hibernate Console Configuration ist not shown, disable the Hibernate Support for the project and re-enable again.
如果未显示休眠控制台配置,请禁用项目的休眠支持并重新启用。
回答by K.Nicholas
Sometimes if there is no console configuration with the name of your project, and disabling and re-enabling hibernate support doesn't cause one to appear, you have to create one. This can be done with Run->Run Configurations
. However, if you get the error that "console configuration [name] already exists" when you try to create a new hibernate console configuration with the same name as your project, it might be because you have a Java Application
run configuration with that name. In that case, you need to delete the Java Application
run configuration first, then you can create the Hibernate
run configuration.
有时,如果没有带有项目名称的控制台配置,并且禁用和重新启用休眠支持不会导致出现一个,则必须创建一个。这可以通过Run->Run Configurations
. 但是,如果您在尝试创建与项目同名的新休眠控制台配置时收到“控制台配置 [名称] 已存在”的错误消息,则可能是因为您有一个Java Application
使用该名称的运行配置。在这种情况下,您需要先删除Java Application
运行配置,然后才能创建Hibernate
运行配置。