Eclipse Indigo 未找到 log4j.xml 和 hibernate.cfg.xml

发布于 2024-12-16 12:18:01 字数 1227 浏览 0 评论 0原文

我正在使用 Eclipse indigo (3.7),

我在“src”文件夹下添加了一个休眠配置文件和一个记录器配置文件。

应用程序运行,但是当我尝试打开服务器连接时,我得到:

log4j: Trying to find [log4j.xml] using context classloader     org.eclipse.core.runtime.internal.adaptor.ContextFinder@1787005.
log4j: Trying to find [log4j.xml] using     org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@183e895 class loader.
log4j: Trying to find [log4j.xml] using ClassLoader.getSystemResource().
log4j: Trying to find [log4j.properties] using context classloader org.eclipse.core.runtime.internal.adaptor.ContextFinder@1787005.
log4j: Trying to find [log4j.properties] using org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@183e895 class loader.
log4j: Trying to find [log4j.properties] using ClassLoader.getSystemResource().
log4j: Could not find resource: [null].
log4j:WARN No appenders could be found for logger (org.hibernate.cfg.annotations.Version).
log4j:WARN Please initialize the log4j system properly.
Hibernate Exception: hibernate.cfg.xml not found

我在具有相同结构的其他项目中没有问题。 这些应用程序是RCP(富客户端平台)。 我需要知道的是如何确保 Eclipse 正确地将“bin”和“source”文件夹添加到类路径中! 如果我从目录角度查看项目,我会看到“bin”文件夹下面的文件!

我认为由于第一个问题,hibernate 找不到配置文件!

有什么想法吗? 最好的问候

I'm using Eclipse indigo (3.7)

I added a hibernate config file and a logger config file, under "src" folder.

The application run but when I try to open the server connection I get:

log4j: Trying to find [log4j.xml] using context classloader     org.eclipse.core.runtime.internal.adaptor.ContextFinder@1787005.
log4j: Trying to find [log4j.xml] using     org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@183e895 class loader.
log4j: Trying to find [log4j.xml] using ClassLoader.getSystemResource().
log4j: Trying to find [log4j.properties] using context classloader org.eclipse.core.runtime.internal.adaptor.ContextFinder@1787005.
log4j: Trying to find [log4j.properties] using org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@183e895 class loader.
log4j: Trying to find [log4j.properties] using ClassLoader.getSystemResource().
log4j: Could not find resource: [null].
log4j:WARN No appenders could be found for logger (org.hibernate.cfg.annotations.Version).
log4j:WARN Please initialize the log4j system properly.
Hibernate Exception: hibernate.cfg.xml not found

I have no problems in other prject with the same structure.
The applications are RCP ( Rich Client Platform ).
What I need to know is how to make sure that Eclipse added correctly the "bin" and "source" folder to the classpath !!
If I look the project with the directory perspective I see the files below "bin" folder !!

I think that because of the first problem , hibernate could'nt find theri config file !

Any idea ?
Best Reagards

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文