Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener. ...nested exception is java.lang.NoSuchMethodError:
ssh 中,项目部署到服务器的时候,出现这样的奇葩的事情:
21-Oct-2017 11:27:15.953 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log No Spring WebApplicationInitializer types detected on classpath
21-Oct-2017 11:27:15.991 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log Initializing Spring root WebApplicationContext
21-Oct-2017 11:27:16.045 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.web.context.support.XmlWebApplicationContext]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.core.convert.converter.ConverterRegistry.addConverter(Ljava/lang/Class;Ljava/lang/Class;Lorg/springframework/core/convert/converter/Converter;)V
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:162)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:104)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:339)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:281)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4811)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5251)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1092)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1834)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.NoSuchMethodError: org.springframework.core.convert.converter.ConverterRegistry.addConverter(Ljava/lang/Class;Ljava/lang/Class;Lorg/springframework/core/convert/converter/Converter;)V
at org.springframework.core.convert.support.DefaultConversionService.addScalarConverters(DefaultConversionService.java:62)
at org.springframework.core.convert.support.DefaultConversionService.addDefaultConverters(DefaultConversionService.java:53)
at org.springframework.core.convert.support.DefaultConversionService.<init>(DefaultConversionService.java:42)
at org.springframework.core.env.AbstractPropertyResolver.<init>(AbstractPropertyResolver.java:44)
at org.springframework.core.env.PropertySourcesPropertyResolver.<init>(PropertySourcesPropertyResolver.java:42)
at org.springframework.core.env.AbstractEnvironment.<init>(AbstractEnvironment.java:101)
at org.springframework.core.env.StandardEnvironment.<init>(StandardEnvironment.java:54)
at org.springframework.web.context.support.StandardServletEnvironment.<init>(StandardServletEnvironment.java:43)
at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.createEnvironment(AbstractRefreshableWebApplicationContext.java:139)
at org.springframework.context.support.AbstractApplicationContext.<init>(AbstractApplicationContext.java:227)
at org.springframework.context.support.AbstractApplicationContext.<init>(AbstractApplicationContext.java:217)
at org.springframework.context.support.AbstractRefreshableApplicationContext.<init>(AbstractRefreshableApplicationContext.java:82)
at org.springframework.context.support.AbstractRefreshableConfigApplicationContext.<init>(AbstractRefreshableConfigApplicationContext.java:51)
at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.<init>(AbstractRefreshableWebApplicationContext.java:94)
at org.springframework.web.context.support.XmlWebApplicationContext.<init>(XmlWebApplicationContext.java:62)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147)
... 17 more 21-Oct-2017 11:27:45.646 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log Closing Spring root WebApplicationContext
21-Oct-2017 11:27:45.919 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
21-Oct-2017 11:27:45.919 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
上网查询,有人说是 环境变量 读取不一致问题等等。
下面是我处理的过程:
1.若你的项目所连接的是本地的数据库,请保证你安装的数据库 是可以运行本地访问,既在linux shell 中 可以mysql -uroot -p密码等进去,若不能,不经授权了远程登录还的,还请自行将数据的localhost方式登录的权限授权
如出现:#mysql -u root -p
提示”Access denied for user ‘root’@’localhost’ (using password: YES)”
可以:grant all privileges on . to ‘root’@’localhost’ identified by ‘mypassword’ with grant option;
grant all privileges on . to ‘root’@’118.192.91.xxx’ identified by ‘mypassword’ with grant option;
flush privileges;
查考:http://www.linuxidc.com/Linux/2015-04/116492.htm
2.确保你的环境 java 版本 和你工作的IDE编译环境一直, 说白了, 本地IDE编译 是用java7 , 在部署到 服务器Linux 也是 java 7
(ps: 上面的情况是 , 在本地跑程序是没有问题的, 已部署到linux服务器出现上面粘贴的问题,通过上面两个步骤,在常试,可以了,不报上面的错误了)
目前发现就这么多问题,分享与大家,若您也存在这样的问题,可以留言给我,希望可以帮助您!
Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener. ...nested exception is java.lang.NoSuchMethodError:的更多相关文章
- Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException:
严重: Exception sending context initialized event to listener instance of class org.springframework.we ...
- [key]严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener(Spring配置异常)
详细错误为: 严重: Exception sending context initialized event to listener instance of class org.springframe ...
- Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
严重: Exception sending context initialized event to listener instance of class org.springframework.we ...
- 严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
十月 30, 2019 11:12:35 下午 org.apache.catalina.core.StandardContext listenerStart 严重: Exception sending ...
- 严重: Exception sending context initialized event to listener instance of class org.springframework.we
2014-6-1 0:47:25 org.apache.catalina.core.AprLifecycleListener init 信息: The APR based Apache Tomcat ...
- 严重: Exception sending context initialized event to listener instance of class
问题描述:Exception sending context initialized event to listener instance of class org.springframework.w ...
- Exception sending context initialized event to listener instance of class
1.错误描述 严重:Exception sending context initialized event to listener instance of class org.springframew ...
- Exception sending context initialized event to listener instance of class ssm.blog.listener.InitBloggerData java.lang.NullPointerException at ssm.blog.listener.InitBloggerData.c
spring注入是分两部分执行的 首先是 先把需要注入的对象加载到spring容器 然后在把对象注入到具体需要注入的对象里面 这种就是配置和注解的注入 getbean方式其 ...
- 严重:Exception sending context initialized event to listener instance of class [myJava.MyServletContextListener] java.lang.NullPointerException
以上错误是我在自定义Servlet监听器时遇到的,首先大致介绍一下我要实现的功能(本人刚开始学,如有错误,请多多指正): 为了统计网站访问量,防止服务器重启后,原访问次数被清零,因此自定义监听器类,实 ...
随机推荐
- SD内存卡禁止写入只读怎么办?另类SPI模式修复坏卡
这几天很郁闷,买的32G TF卡老出问题,三星的标,不知道是不是正品,标称C10,且不说是不是真的三星和真的C10,反正测试一下容量倒是真的,价格么也比较亲民,好像是69块? 哎,可惜呀,好景不长 ...
- C#如何判断线程池中所有的线程是否已经完成(转)
其 实很简单用ThreadPool.RegisterWaitForSingleObject方法注册一个定时检查线程池的方法,在检查线程的方法内调用 ThreadPool.GetAvailableThr ...
- CSS-图像映射
图像映射是将一些区域变成热点,我们在网上获取搜索图片,图片上会有关于任务的简短信息介绍,还有一个接触更多的就是QQ空间的相册,浏览QQ空间照片鼠标滑动到人物头像的时候让你选择标记人物,都是将图片和内容 ...
- C#操作json类型数据
将对象序列化为 JavaScript 对象表示法 (JSON),并将 JSON 数据反序列化为对象. 此类不能继承. // msdn 例子: namespace SL_DataContractJson ...
- MFC中如何显示颜色选择对话框
其实很简单,使用MFC现有的类CColorDialog 即可实现 核心代码如下: void CCColorDialogView::OnGraphSetting() { CColorDialog m_s ...
- 大数据开发实战:Hadoop数据仓库开发实战
1.Hadoop数据仓库架构设计 如上图. ODS(Operation Data Store)层:ODS层通常也被称为准备区(Staging area),它们是后续数据仓库层(即基于Kimball维度 ...
- Managed C++ dll: #define _AFXDLL or do not use /MD[ d]?
[问题] Hello all I'm writing a managed C++ dll with will be acting as an intermediate between a lo ...
- ASP入门(十六)-ASP开发的规范
毋容置疑,在开发中遵守一套规范,将会有利于提高代码的可读性,较低后期维护成本. 文件存放目录规范 js 目录下存放着页面所使用的 JavaScript 脚本文件,因为我们可能用到第三方提供的免费的 J ...
- chrome浏览器直接编辑源码功能的开通办法 - Chrome Workspace
因为我看到网上有些文章的教程已经过时,特更新,此文章的步骤适用于chrome 或 chromium 30或31. 开启”开发者工具实验”(这翻译真心烂…): 在browser输入chrome://fl ...
- 查看oracle的sql语句历史记录和锁表的情况
查看oracle的sql语句历史记录和锁表的情况 (2012-01-04 20:59:59) 转载▼ 标签: 杂谈 分类: database 查询sql的历史记录 select * from v$sq ...