The type org.springframework.beans.BeansException cannot be resolved. It is indirectly referenced fr
2015-10-17 11:01
2291 查看
The
type org.springframework.beans.BeansException cannot be resolved. It is indirectly referenced from required .class files
up vote1down votefavorite | Hi am facing issue with below error in eclipse please help to resolve this issue. Error message The type org.springframework.beans.BeansException cannot be resolved. It is indirectly referenced from required .class files I imported the jar file (org.springframework.context-3.0.4.RELEASE) even then am facing this issue. see below code( where am getting issue at line ApplicationContext appCtx = new ClassPathXmlApplicationContext("applicationContext.xml");) package com.csp.test.document; import static org.junit.Assert.*; import org.junit.Test; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import com.csp.model.Document; import com.csp.service.DocumentService; public class DocumentTest { @Test public void testGetDocument() { ApplicationContext appCtx = new ClassPathXmlApplicationContext( "applicationContext.xml"); DocumentService documentService = (DocumentService) appCtx .getBean("documentService"); Document doc = documentService.getDocument(1); String status = null; if (doc != null) { status = documentService.saveDocument(doc); } else { System.out.println("error in retreiving document"); } assertEquals("Success Status", "SUCCESS", status); } } java javascript eclipse spring swing
| ||
add a comment |
2 Answers
activeoldestvotesup vote4down voteaccepted | If you aren't using maven (or any other dependency management tool, for that matter), you should addspring-contextdependencies manually, which are spring-beans, spring-core, spring-aopand spring-expression, of course each of them have their own dependencies either (Transitive Dependency). By the way, BeansExceptionis part of spring-beansmodule
| ||||||||
a comment |
up vote1down vote | May be you are missing org.springframework.beans-3.0.4.RELEASE jar
|
相关文章推荐
- 浅析Java入门教程之字符常量
- java 中变量存储位置的区别
- java 基础知识
- 浅析JAVA中Str类型与in类型t之间转换
- Java虚拟机中栈,栈帧,局部变量表的概念和特征。
- JAVA下的json构造和解析工具
- 谈谈java虚拟机中的参数。
- 安卓Eclipse如何快速修改工程名及包名
- 谈谈Java技术优化的相关信息
- Java中的Unix时间转换
- 韩顺平.循序渐进学.java.从入门到精通(二)
- 浅谈在JAVA中使用接口引用实现类
- eclipse mat插件本地安装
- java作业3
- java.sql.SQLException: ORA-00911: 无效字符 解决方案
- 浅谈Java虚拟机的工作模式Client和Server。
- java——static
- 分享java类的扫描代码
- java中两个double类型数据的大小
- spring 配置文件