java - 严重: Unable to load the hibernate config properties file

标签 java junit testcase

嗨,我的 UI 项目中有一个测试类。它被终止并显示以下消息:

严重:无法加载 hibernate 配置属性文件

我正在研究 java、RAD 7.5、门户服务器 6.1。

任何帮助将不胜感激。

最佳答案

确保您的 hibernate.cfg.xml 文件位于类路径的根目录下。如果您从 JAR 运行,它应该在其中,前面没有任何路径。如果您使用 maven,它应该位于 src/main/resources/hibernate.cfg.xml 中。如果您需要进一步帮助,请发表评论。

关于java - 严重: Unable to load the hibernate config properties file,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24134571/

相关文章:

java - @Before 和 @After 不能在 Eclipse 2018-12 JAVA 上使用 JUnit 5

java - 使用 Junit 测试 Spring Boot 应用程序(需要 Autowiring 构造函数的类的测试方法)

java - 使用 null 字段 Autowiring Spring 单元测试对象

testing - 如何在测试人员之间分配测试用例分配?

java - 在父类(super class) ArrayList 中调用具有统一名称的子类方法

java - 是否有任何 Maven 阶段来运行 jar

java - 未找到源 : Adding the source attachment to view source code

java swing 获取所有可编辑的 jformattedtextfields 并计算?

java - Mockito 验证字符串集合

inheritance - Junit 规则、测试用例和继承 : Do they work together?