eclipse JPA:没有为项目指定连接

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/21102063/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 22:00:14  来源:igfitidea点击:

JPA : No connection specified for the project

eclipsejpa

提问by Mr_and_Mrs_D

I followed the following lesson step by step:

我一步一步地学习了以下课程:

http://www.mastertheboss.com/jboss-datasource/h2-database-tutorial

http://www.mastertheboss.com/jboss-datasource/h2-database-tutorial

I chose the database to be persisted in a file.

我选择将数据库保存在文件中。

But I receive the following error under "Markers" :

但是我在“标记”下收到以下错误:

No connection specified for the project. No data-specific validation will be performed

没有为项目指定连接。不会执行特定于数据的验证

What might be the problem?

可能是什么问题?

采纳答案by Vinayak Pingale

The "No connection specified for project. No database-specific validation will be performed" Eclipse Markeris related to JPA.

没有为项目指定连接。不会执行特定于数据库的验证Eclipse 标记与 JPA 相关。

You can perform one of the following things to eliminate this marker:

您可以执行以下操作之一来消除此标记:

1.Add the required datatools.

1.添加所需的数据工具。

2.Disable the JPA validator on Project PropertiesValidation.

2.在Project Properties→上禁用 JPA 验证器Validation

回答by Mr_and_Mrs_D

Right Click on the project > Properties > JPA. There you can define a connection (follow the wizard).

右键单击项目 > 属性 > JPA。您可以在那里定义连接(按照向导操作)。

回答by Amine Aouffen

If your connection is managed by the Application Server, you can ignore this message by going to Project-> Properties-> JPA-> Errors / Warnings:

如果您的连接由应用程序服务器管理,您可以通过转到Project-> Properties-> JPA->忽略此消息Errors / Warnings

  • Check Enable Project Specific Settings.
  • Under Projecttree set No connection specified for projectto Ignore.
  • 检查Enable Project Specific Settings
  • Project树下设置No connection specified for projectIgnore