- 浏览: 103004 次
- 性别:
- 来自: 北京
最新评论
-
garrickjubiao:
Thanks
jquery新浪短链接 短网址生成代码 -
gcfight:
本文第34992次浏览good job !thanks 4 s ...
《Java编程思想第四版》(Thinking in Java (4th Edition))完整中文版下载 -
dhy9836:
一言惊醒梦中人啊,就是这个问题!!!
java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContextAw -
simon_1:
图片挂了。
Myeclipse8.5GA优化笔记,附图 -
avajworm:
好像什么都没说...............
Myeclipse8.5GA优化笔记,附图
java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContextAw
- 博客分类:
- java
最近整理了struts常用的jar包和配置文件,新建项目习惯性的把整个文件夹拷贝进去,启动tomcat报如下错误:
Unable to load configuration. - bean - jar:file:/D:/WIN7/apache-tomcat-6.0.26/webapps/DoAjax/WEB-INF/lib/struts2-spring-plugin-2.1.8.1.jar!/struts-plugin.xml:29:132 at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58) at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:374) at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:418) at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69) at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422) at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3838) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4488) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:785) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:519) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:581) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) Caused by: Unable to load bean: type:com.opensymphony.xwork2.ObjectFactory class:org.apache.struts2.spring.StrutsSpringObjectFactory - bean - jar:file:/D:/WIN7/apache-tomcat-6.0.26/webapps/DoAjax/WEB-INF/lib/struts2-spring-plugin-2.1.8.1.jar!/struts-plugin.xml:29:132 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:221) at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:101) at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:169) at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55) ... 31 more Caused by: java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContextAware at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:621) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2527) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1010) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1483) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:621) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2527) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1010) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1483) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361) at com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:138) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:192) ... 34 more Caused by: java.lang.ClassNotFoundException: org.springframework.context.ApplicationContextAware at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1516) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) ... 51 more 2010-5-16 23:44:47 org.apache.catalina.core.StandardContext filterStart 严重: Exception starting filter struts2 Unable to load configuration. - bean - jar:file:/D:/WIN7/apache-tomcat-6.0.26/webapps/DoAjax/WEB-INF/lib/struts2-spring-plugin-2.1.8.1.jar!/struts-plugin.xml:29:132 at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:431) at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69) at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422) at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3838) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4488) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:785) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:519) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:581) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) Caused by: Unable to load configuration. - bean - jar:file:/D:/WIN7/apache-tomcat-6.0.26/webapps/DoAjax/WEB-INF/lib/struts2-spring-plugin-2.1.8.1.jar!/struts-plugin.xml:29:132 at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58) at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:374) at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:418) ... 29 more Caused by: Unable to load bean: type:com.opensymphony.xwork2.ObjectFactory class:org.apache.struts2.spring.StrutsSpringObjectFactory - bean - jar:file:/D:/WIN7/apache-tomcat-6.0.26/webapps/DoAjax/WEB-INF/lib/struts2-spring-plugin-2.1.8.1.jar!/struts-plugin.xml:29:132 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:221) at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:101) at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:169) at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55) ... 31 more Caused by: java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContextAware at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:621) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2527) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1010) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1483) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:621) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2527) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1010) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1483) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361) at com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:138) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:192) ... 34 more Caused by: java.lang.ClassNotFoundException: org.springframework.context.ApplicationContextAware at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1516) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) ... 51 more 2010-5-16 23:44:47 org.apache.catalina.core.StandardContext start 严重: Error filterStart 2010-5-16 23:44:47 org.apache.catalina.core.StandardContext start 严重: Context [/DoAjax] startup failed due to previous errors
关键是这行"java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContextAware",让我很是困惑,没用到spring框架出找不到spring类的问题,仔细检查配置文件和jar包,发现没有用到的插件包struts2-spring-plugin-2.1.8.1.jar在lib目录里,去掉一切正常.
添加此jar包启动服务时会自动寻找spring监听器和配置文件,没有用到spring框架还是不要引入的好,免得麻烦.
发表评论
-
控制字符串显示长度,超出范围用…代替,鼠标上移显示详情
2011-04-21 16:19 2074<html> <body> ... -
网络中断自动关机
2011-04-12 22:59 0import java.io.BufferedReader; ... -
惠普大连java方向笔试题(部分)
2010-11-03 12:21 1588昨天去惠普面试带回来的笔试题,大部分都是考察基础知识.和大家分 ... -
关于org.hibernate.TransientObjectException
2010-04-21 21:51 1411今天利用ssh框架对oracle数据库进行更新操作时,报如下异 ... -
Myeclipse8.0/8.5丢失配置和默认workspace问题
2010-04-17 00:58 4985前些天新装的Myeclipse8.5,第一次打开时,选择了不再 ... -
关于"严重: Exception starting filter struts2"的解决
2010-04-11 23:14 1763tomcat加载运行struts2项目时,控制台报如下错误: ... -
Myeclipse8.5GA优化笔记,附图
2010-04-09 14:49 10676前两个月用的8.0ga版本, ... -
java写的电驴下载完成关机小程序
2010-04-09 14:47 1856经常用到电驴下载资料,一些http你根本找不到的资源,当然速度 ... -
Myeclipse8.5GA(正式版)下载.含注册机.
2010-04-09 14:46 5664Myeclipse8.5GA(正式版)下载.含注册机. ... -
自己写的Myeclipse7.5/8.0/8.5注册机下载
2010-04-09 14:43 4732上个月发过一个java类,关于Myeclipse注册的ja ... -
《Java编程思想第四版》(Thinking in Java (4th Edition))完整中文版下载
2010-04-09 14:40 13294电驴上的资源,下载回来看了觉得不错,书签都已经做好了,很方 ...
相关推荐
Exceptions sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory...
java.lang.NoClassDefFoundError: org/springframework/context/EnvironmentAware 1 2 继续加入 spring-context-4.x.x.RELEASE.jar 1 2 接着报错 java.lang.NoClassDefFoundError: org/springframework/core/env/...
在搭建spring项目时通常需要这些jar包 ... at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:70) 由于缺少依赖包 aspectjweaver-1.6.12.jar ...
`Exception in thread "main" java.lang.NoClassDefFoundError` 是Java编程中常见的一个运行时异常,通常发生在尝试运行一个Java程序时,如果JVM找不到在类路径(ClassPath)中定义的主要类(主类,即包含`public ...
根据提供的文件信息,我们可以归纳出一系列与Java及周边技术相关的知识点。下面将对这些知识点进行详细阐述: ### Java基础知识 1. **Java基础类型** - **boolean**: 用于存储逻辑值,即`true`或`false`。 - **...
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener - **原因**:这个异常表示Spring的核心库未被正确加载。 - **解决办法**: - 确认Spring框架的相关jar包已被添加至...
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error ...
1. **java.lang.NoClassDefFoundError:org/hibernate/context/CurrentSessionContext** 这个错误通常意味着在类路径(classpath)中缺少了必要的Hibernate库或其版本不兼容。原因为开发环境中的Hibernate版本为3.1...
5. jsf+spring+hibernate 严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory....
注: applicationContext.xml 配置bean信息所依赖的class路径要一致且大小写敏感,否则运行时会出现java.lang.NoClassDefFoundError (wrong name)。 https://blog.csdn.net/my_bkn/article/details/6875481
ERROR main org.springframework.web.context.ContextLoader - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in ...
- `java.lang.ClassNotFoundException:org.springframework.web.context.request.async.CallableProcessingInterceptor` 这些问题,可以通过添加或更新相应的Spring相关依赖来解决。 ### 常见的错误和解决方案 当...
同时,需要在Hibernate配置中指定`current_session_context_class`为`org.springframework.orm.hibernate4.SpringSessionContext`。 2. **缓存配置的改变** - Hibernate4中,缓存提供商由旧的类名改为`...
如果在运行时遇到`java.lang.NoClassDefFoundError:javax/transaction/UserTransaction`错误,可以引入jta.jar来解决这个问题。 在Quartz中,每个任务称为一个Job,它必须实现`org.quartz.Job`接口。这个接口只有一...
再者,如果在配置监听器时遇到`Error configuring application listener of class org.springframework.web.context.ContextLoaderListener`,可能是因为Eclipse在生成项目时遗漏了一些必要的Spring库。此时,应手动...
- `spring-context.jar`: 提供了应用上下文,它是Spring的核心,用于管理Bean的生命周期和依赖注入。 - `spring-webmvc.jar`: 包含了Spring MVC的相关实现,用于处理HTTP请求和响应。 - `spring-beans.jar`: 包含...
- `spring-context.jar`、`spring-beans.jar`、`spring-aop.jar`、`spring-jdbc.jar`、`spring-tx.jar`等:SSH中的S代表Spring,这是一个全面的应用框架,提供了AOP(面向切面编程)、DI(依赖注入)等功能,与...