myeclipse有什么问题?
我导入了一个包含 spring + hibernate + struts2 的项目,遇到以下问题:
描述 资源路径 位置类型 找不到类“org.apache.commons.dbcp.BasicDataSource”
applicationContext.xml /Struts2Example/src/main/java 第 10 行
Spring Bean 问题 类“org.springframework.orm.hibernate3.LocalSessionFactoryBean”不 找到 applicationContext.xml /Struts2Example/src/main/java 行 21 Spring Beans问题
我尝试将Spring 3.0 Persistence Core库包含到构建路径中,当我在java编辑器中键入“org.springframework.orm.hibernate3.LocalSessionFactoryBean”时,可以找到这个类,那么这里有什么问题?为什么xml文件找不到类?
提前致谢 !
I imported a project include spring + hibernate + struts2, and I got the following problems:
Description Resource Path Location Type
Class 'org.apache.commons.dbcp.BasicDataSource' not found
applicationContext.xml /Struts2Example/src/main/java line 10
Spring Beans Problem
Class 'org.springframework.orm.hibernate3.LocalSessionFactoryBean' not
found applicationContext.xml /Struts2Example/src/main/java line
21 Spring Beans Problem
I have tried to include Spring 3.0 Persistence Core library into build path, and when I type "org.springframework.orm.hibernate3.LocalSessionFactoryBean" in java editor, this class can be found, so what's the problem here ? Why the xml file can not find the class ?
Thanks in advance !
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
添加Spring 3.0 Persistence JDBC Libraries(右键单击项目,转到Build Path->Add Libraries...,然后选择MyEclipse Libraries类型,最后选择上面提到的Spring库)。这应该会为您提供 BasicDataSource 类。 LocalSessionFactoryBean 类应该位于构建路径上的一个库中,即 Spring 3.0 Persistence Core Libraries。您能否展开容器并确认 org.springframework.orm JAR 是容器的一部分?
如果您仍然遇到问题,最好在 MyEclipse 论坛上提出问题(www.myeclipseide.com,然后单击底部的“支持论坛”链接)。如果您没有登录,则可以轻松设置 - 单击注册链接 - ...它是免费的。
Add the Spring 3.0 Persistence JDBC Libraries (right click on the project, go to Build Path->Add Libraries..., then select MyEclipse Libraries type, finally select the Spring libraries mentioned above). That should get you the BasicDataSource class. The LocalSessionFactoryBean class should be in a library already on the build path, the Spring 3.0 Persistence Core Libraries. Could you expand the container and confirm that the org.springframework.orm JAR is part of the container?
If you still have problems, it is best to raise them on the MyEclipse forums (www.myeclipseide.com then click on the Support Forums link at the bottom) If you don't have a login, it's easy to set one up - click the Register link - ... it's free.