Eclipse Indigo 未找到 log4j.xml 和 hibernate.cfg.xml
我正在使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论