Exception: Java gateway process exited before sending the driver its port number

版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/YHP_DANIEL/article/details/82468637

最近在运行python程序时,出现Exception: Java gateway process exited before sending the driver its port number错误,可以说是费了一个晚上才弄好的,上网查资料,发现这类错误及解决方法很多,但是感觉都是分散的,最主要的是对于本人来说效果几乎没有,所以,就总结了一套流程:
首先下载安装jdk,和jre,我的是1.7.0_80版本然后配置环境变量:官网:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
这里写图片描述
右键点击我的电脑,点击属性,进入此页面中


在用户变量和系统变量新建都可以,我的在用户变量中
!
创建JAVA_HOME

在变量值中写入你安装的路径
,在用户变量中如果有path,则在path中添加:
path = %JAVA_HOME%\bin,如果没有则创建,注意,JAVA_HOME和path在同一个变量中,也就是要么都在用户变量中,要么都在系统变量中。
看是否配置成功,打开cmd,输入java -version如出现和我一样的界面,则配置成功,当然不要高兴太早,后面还有呢,下面安装和解压spark:
这里是我已经下载好的
1、下载官网:http://spark.apache.org/
  spark-1.6.0-bin-hadoop2.4\python\lib下py4j-0.9-src以及pyspark压缩目录解压得到py4j和pyspark目录,
2、 pycharm中选中file菜单下setting子菜单

这里写图片描述
3、 setting中点击”add content root to the module”,在窗口设置python的lib目录” spark-1.6.0-bin-hadoop2.4\python\lib”!
这里写图片描述
4、添加完看看是否正确,在项目下lib是否存在
这里写图片描述
5、Enviroment Variables
这里写图片描述
what!!!发生了什么?
原来没有配置pycharm中的环境变量,我们继续上图:
这里写图片描述
在当前项目下配置环境变量
这里写图片描述

添加以下内容,点击OK
PYSPARK_PYTHON=D:\python3.5.4\python3.5
PYTHONUNBUFFERED=1
SPARK_HOME=E:\spark-1.6.0-bin-hadoop2.4
说明:
1、PYSPARK_PYTHON=添加的是你的python所在路径
2、PYTHONUNBUFFERED=1
3、SPARK_HOME=是解压spark-1.6.0-bin-hadoop2.4.tgz后文件所在的路径,
OK,此时你会见证奇迹的时刻到了,运行项目,运行成功,那就恭喜你,如果此时还会报错:Exception: Java gateway process exited before sending the driver its port number,关机重启电脑,本人就是属于后者,一切配置完成,还是报错,重启电脑就会OK!

展开阅读全文

Child process exited successfully.

10-30

[Sat Oct 01 04:08:33 2011] [error] [client IP地址] File does not exist: D:/xampp/htdocs/adminrn[Sat Oct 01 14:50:18 2011] [error] [client IP地址] PHP Notice: Undefined index: HTTP_HOST in D:\\xampp\\htdocs\\index.php on line 7rn[Sat Oct 01 16:54:40 2011] [error] [client IP地址] client denied by server configuration: D:/xampp/htdocs/xampp/rn[Mon Oct 03 10:00:34 2011] [error] [client 194.72.238.62] PHP Notice: Undefined index: HTTP_HOST in D:\\xampp\\htdocs\\index.php on line 7rn[Mon Oct 03 21:30:57 2011] [error] [client IP地址] File does not exist: D:/xampp/htdocs/adminrn[Tue Oct 04 13:09:11 2011] [error] [client 60.190.42.18] File does not exist: D:/xampp/htdocs/adminrn[Thu Oct 06 04:02:15 2011] [error] [client 116.27.145.9] File does not exist: D:/xampp/htdocs/systemrn[Thu Oct 06 04:02:51 2011] [error] [client 116.27.145.9] File does not exist: D:/xampp/htdocs/deploymentmanagerrn[Thu Oct 06 04:07:20 2011] [error] [client IP地址] File does not exist: D:/xampp/htdocs/adminrn[Thu Oct 06 04:53:54 2011] [error] [client IP地址] File does not exist: D:/xampp/htdocs/adminrn[Thu Oct 06 23:00:35 2011] [error] [client IP地址] File does not exist: D:/xampp/htdocs/adminrn[Fri Oct 07 09:31:07 2011] [error] [client 180.186.74.13] File does not exist: D:/xampp/htdocs/adminrn[Fri Oct 07 12:15:55 2011] [error] [client 203.159.16.151] File does not exist: D:/xampp/htdocs/adminrn[Sat Oct 08 03:16:21 2011] [error] [client 31.210.72.42] File does not exist: D:/xampp/htdocs/adminrn[Sat Oct 08 04:08:09 2011] [error] [client IP地址] File does not exist: D:/xampp/htdocs/adminrn[Sat Oct 08 06:33:29 2011] [error] [client IP地址] PHP Notice: Undefined index: HTTP_HOST in D:\\xampp\\htdocs\\index.php on line 7rn[Sat Oct 08 06:50:06 2011] [error] [client IP地址] File does not exist: D:/xampp/htdocs/adminrn[Sun Oct 09 04:13:14 2011] [error] [client 50.97.216.138] File does not exist: D:/xampp/htdocs/adminrn[Mon Oct 10 06:25:04 2011] [error] [client 194.72.238.62] PHP Notice: Undefined index: HTTP_HOST in D:\\xampp\\htdocs\\index.php on line 7rn[Tue Oct 11 04:16:50 2011] [error] [client 123.30.50.113] File does not exist: D:/xampp/htdocs/adminrn[Wed Oct 12 03:32:53 2011] [error] [client 72.34.229.72] File does not exist: D:/xampp/htdocs/adminrn[Wed Oct 12 07:15:36 2011] [error] [client 122.155.8.180] File does not exist: D:/xampp/htdocs/adminrn[Wed Oct 12 07:55:00 2011] [error] [client IP地址] File does not exist: D:/xampp/htdocs/adminrn[Wed Oct 12 10:22:19 2011] [error] [client IP地址] File does not exist: D:/xampp/htdocs/adminrn[Thu Oct 13 08:36:05 2011] [error] [client IP地址] File does not exist: D:/xampp/htdocs/mailrn[Sat Oct 15 12:18:55 2011] [error] [client 109.231.236.45] File does not exist: D:/xampp/htdocs/adminrn[Tue Oct 18 00:40:28 2011] [error] [client 123.30.50.113] File does not exist: D:/xampp/htdocs/adminrn[Tue Oct 18 11:30:38 2011] [error] [client 85.17.201.17] File does not exist: D:/xampp/htdocs/mailrn[Wed Oct 19 21:17:20 2011] [error] [client 46.166.143.215] File does not exist: D:/xampp/htdocs/adminrn[Wed Oct 19 23:27:06 2011] [error] [client 109.123.110.115] File does not exist: D:/xampp/htdocs/adminrn[Thu Oct 20 03:36:52 2011] [error] [client IP地址] File does not exist: D:/xampp/htdocs/adminrn[Fri Oct 21 01:10:28 2011] [error] [client IP地址] client denied by server configuration: D:/xampp/phpMyAdmin/scripts/setup.phprn[Fri Oct 21 01:10:28 2011] [error] [client IP地址] File does not exist: D:/xampp/htdocs/pmarn[Fri Oct 21 01:10:28 2011] [error] [client IP地址] File does not exist: D:/xampp/htdocs/mysqlrn[Fri Oct 21 01:10:28 2011] [error] [client IP地址] File does not exist: D:/xampp/htdocs/scriptsrn[Fri Oct 21 01:10:28 2011] [error] [client IP地址] client denied by server configuration: D:/xampp/htdocs/phpMyAdminrn[Fri Oct 21 01:10:29 2011] [error] [client IP地址] client denied by server configuration: D:/xampp/phpMyAdmin/scripts/setup.php, referer: 60.12.156.29rn[Fri Oct 21 01:10:30 2011] [error] [client IP地址] File does not exist: D:/xampp/htdocs/mysql, referer: 60.12.156.29rn[Fri Oct 21 01:10:30 2011] [error] [client IP地址] File does not exist: D:/xampp/htdocs/scripts, referer: 60.12.156.29rn[Fri Oct 21 01:10:32 2011] [error] [client IP地址] client denied by server configuration: D:/xampp/htdocs/phpMyAdmin, referer: 60.12.156.29rn[Fri Oct 21 01:10:33 2011] [error] [client IP地址] File does not exist: D:/xampp/htdocs/pma, referer: 60.12.156.29rn[Fri Oct 21 08:47:45 2011] [error] [client IP地址] File does not exist: D:/xampp/htdocs/adminrn[Fri Oct 21 23:24:42 2011] [error] [client 178.79.189.167] File does not exist: D:/xampp/htdocs/adminrn[Sat Oct 22 00:14:58 2011] [error] [client IP地址] File does not exist: D:/xampp/htdocs/adminrn[Mon Oct 24 00:32:17 2011] [error] [client IP地址] File does not exist: D:/xampp/htdocs/adminrn[Mon Oct 24 10:15:10 2011] [error] [client 79.118.80.125] File does not exist: D:/xampp/htdocs/adminrn[Mon Oct 24 16:16:21 2011] [error] [client 174.120.217.75] File does not exist: D:/xampp/htdocs/adminrn[Tue Oct 25 00:33:37 2011] [error] [client IP地址] client denied by server configuration: D:/xampp/phpMyAdmin/scripts/setup.phprn[Tue Oct 25 00:33:37 2011] [error] [client IP地址] File does not exist: D:/xampp/htdocs/scriptsrn[Tue Oct 25 00:33:37 2011] [error] [client IP地址] File does not exist: D:/xampp/htdocs/mysqlrn[Tue Oct 25 00:33:37 2011] [error] [client IP地址] client denied by server configuration: D:/xampp/htdocs/phpMyAdminrn[Tue Oct 25 00:33:38 2011] [error] [client IP地址] File does not exist: D:/xampp/htdocs/pmarn[Tue Oct 25 00:33:38 2011] [error] [client IP地址] client denied by server configuration: D:/xampp/phpMyAdmin/scripts/setup.php, referer: 60.12.156.29rn[Tue Oct 25 00:33:39 2011] [error] [client IP地址] File does not exist: D:/xampp/htdocs/scripts, referer: 60.12.156.29rn[Tue Oct 25 00:33:39 2011] [error] [client IP地址] client denied by server configuration: D:/xampp/htdocs/phpMyAdmin, referer: 60.12.156.29rn[Tue Oct 25 00:33:39 2011] [error] [client IP地址] File does not exist: D:/xampp/htdocs/mysql, referer: 60.12.156.29rn[Tue Oct 25 00:33:40 2011] [error] [client IP地址] File does not exist: D:/xampp/htdocs/pma, referer: 60.12.156.29rn[Thu Oct 27 05:39:02 2011] [error] [client 218.149.84.37] File does not exist: D:/xampp/htdocs/adminrn[Sat Oct 29 21:03:36 2011] [error] [client 70.86.154.194] File does not exist: D:/xampp/htdocs/adminrn[Sun Oct 30 06:40:47 2011] [error] [client IP地址] File does not exist: D:/xampp/htdocs/adminrn[Sun Oct 30 08:56:03 2011] [error] [client 70.86.154.194] File does not exist: D:/xampp/htdocs/adminrn[Sun Oct 30 14:19:54 2011] [notice] Parent: Received shutdown signal -- Shutting down the server.rn[Sun Oct 30 14:19:55 2011] [notice] Child 5932: Exit event signaled. Child process is ending.rn[Sun Oct 30 14:19:56 2011] [notice] Child 5932: Released the start mutexrn[Sun Oct 30 14:19:57 2011] [notice] Child 5932: All worker threads have exited.rn[Sun Oct 30 14:19:59 2011] [notice] Child 5932: Child process is exitingrn[Sun Oct 30 14:20:04 2011] [notice] Parent: Child process exited successfully.rnrnrnrn问题就是这样的,然后就是网站打不开了,启动不了 tomcat apache 也打不开了,唉,真悲惨,求大家指点 论坛

严重: Exception sending context initialized

08-01

严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerrnorg.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Log4JCategoryLog does not implement Logrn at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:555)rn at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:289)rn at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:259)rn at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:390)rn at org.springframework.web.context.ContextLoader.(ContextLoader.java:139)rn at org.springframework.web.context.ContextLoaderListener.createContextLoader(ContextLoaderListener.java:57)rn at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:48)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)rn at org.apache.catalina.core.StandardService.start(StandardService.java:516)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:583)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:585)rn at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)rnCaused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Log4JCategoryLog does not implement Logrn at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:420)rn at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:548)rn ... 21 morernCaused by: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Log4JCategoryLog does not implement Logrn at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:416)rn ... 22 morernjava.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered?rn at org.springframework.web.context.support.WebApplicationContextUtils.getRequiredWebApplicationContext(WebApplicationContextUtils.java:86)rn at com.huateng.listener.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:18)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)rn at org.apache.catalina.core.StandardService.start(StandardService.java:516)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:583)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:585)rn at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)rnlog4j:ERROR setFile(null,true) call failed.rnjava.io.FileNotFoundException: 1 (拒绝访问。)rn at java.io.FileOutputStream.openAppend(Native Method)rn at java.io.FileOutputStream.(FileOutputStream.java:177)rn at java.io.FileOutputStream.(FileOutputStream.java:102)rn at org.apache.log4j.FileAppender.setFile(FileAppender.java:289)rn at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:163)rn at org.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAppender.java:215)rn at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:256)rn at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:220)rn at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:150)rn at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:163)rn at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:425)rn at org.apache.log4j.xml.DOMConfigurator.parseCategory(DOMConfigurator.java:345)rn at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:827)rn at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:712)rn at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:604)rn at org.apache.log4j.xml.DOMConfigurator.configure(DOMConfigurator.java:733)rn at as.huateng.listener.ASApplicationListener.initLog4j(ASApplicationListener.java:120)rn at as.huateng.listener.ASApplicationListener.init(ASApplicationListener.java:39)rn at com.huateng.listener.ApplicationListener.contextInitialized(ApplicationListener.java:13)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)rn at org.apache.catalina.core.StandardService.start(StandardService.java:516)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:583)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:585)rn at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)rnlog4j:ERROR Either File or DatePattern options are not set for appender [TxnModuleAppender].rn 论坛

连接mongodb 报错Exception sending message

05-18

[b]启动后报错,同样的代码在别人那里没有问题:[/b]rn[b]连接方式:[/b]rn[code=java]@SpringBootApplication(exclude = SessionAutoConfiguration.class, DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class,rn DataSourceTransactionManagerAutoConfiguration.class,MongoAutoConfiguration.class )rnpublic class App rn ...rnrnrn@Componentrnpublic class MongoDBHelper rnrn @Value("$mongoClient.uri")rn private String mongoClientUri;rnrn @Value("$dbName")rn private String databaseName;rnrn private static MongoClient mongoClient = null;rnrn public MongoDBHelper() rn rnrn @Beanrn public MongoClient getMongoClient() rn if (mongoClient == null) rn MongoClientURI uri = new MongoClientURI(mongoClientUri);rn mongoClient = new MongoClient(uri);rn rn return mongoClient;rn rnrn public MongoDatabase getMongoDataBase() rn MongoDatabase database = getMongoClient().getDatabase(databaseName);rn return database;rn rn[/code]rnrnrn[code=java]2018-05-18 10:57:06.412 INFO 60376 --- [ngodb.net:27017] org.mongodb.driver.cluster : Exception in monitor thread while connecting to server cluster0-shard-00-00-ta2km.mongodb.net:27017rncom.mongodb.MongoSocketWriteException: Exception sending messagern at com.mongodb.connection.InternalStreamConnection.translateWriteException(InternalStreamConnection.java:516) ~[mongodb-driver-core-3.6.0.jar:na]rn at com.mongodb.connection.InternalStreamConnection.sendMessage(InternalStreamConnection.java:404) ~[mongodb-driver-core-3.6.0.jar:na]rn at com.mongodb.connection.InternalStreamConnection.sendCommandMessage(InternalStreamConnection.java:269) ~[mongodb-driver-core-3.6.0.jar:na]rn at com.mongodb.connection.InternalStreamConnection.sendAndReceive(InternalStreamConnection.java:252) ~[mongodb-driver-core-3.6.0.jar:na]rn at com.mongodb.connection.CommandHelper.sendAndReceive(CommandHelper.java:84) ~[mongodb-driver-core-3.6.0.jar:na]rn at com.mongodb.connection.CommandHelper.executeCommand(CommandHelper.java:34) ~[mongodb-driver-core-3.6.0.jar:na]rn at com.mongodb.connection.InternalStreamConnectionInitializer.initializeConnectionDescription(InternalStreamConnectionInitializer.java:91) ~[mongodb-driver-core-3.6.0.jar:na]rn at com.mongodb.connection.InternalStreamConnectionInitializer.initialize(InternalStreamConnectionInitializer.java:51) ~[mongodb-driver-core-3.6.0.jar:na]rn at com.mongodb.connection.InternalStreamConnection.open(InternalStreamConnection.java:127) ~[mongodb-driver-core-3.6.0.jar:na]rn at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:114) ~[mongodb-driver-core-3.6.0.jar:na]rn at java.lang.Thread.run(Thread.java:745) [na:1.8.0_60]rnCaused by: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative names matching IP address 18.233.144.95 foundrn at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) ~[na:1.8.0_60]rn at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949) ~[na:1.8.0_60]rn at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302) ~[na:1.8.0_60]rn at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296) ~[na:1.8.0_60]rn at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1506) ~[na:1.8.0_60]rn at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216) ~[na:1.8.0_60]rn at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979) ~[na:1.8.0_60]rn at sun.security.ssl.Handshaker.process_record(Handshaker.java:914) ~[na:1.8.0_60]rn at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062) ~[na:1.8.0_60]rn at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375) ~[na:1.8.0_60]rn at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:747) ~[na:1.8.0_60]rn at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:123) ~[na:1.8.0_60]rn at com.mongodb.connection.SocketStream.write(SocketStream.java:74) ~[mongodb-driver-core-3.6.0.jar:na]rn at com.mongodb.connection.InternalStreamConnection.sendMessage(InternalStreamConnection.java:401) ~[mongodb-driver-core-3.6.0.jar:na]rn ... 9 common frames omittedrnCaused by: java.security.cert.CertificateException: No subject alternative names matching IP address 18.233.144.95 foundrn at sun.security.util.HostnameChecker.matchIP(HostnameChecker.java:167) ~[na:1.8.0_60]rn at sun.security.util.HostnameChecker.match(HostnameChecker.java:93) ~[na:1.8.0_60]rn at sun.security.ssl.X509TrustManagerImpl.checkIdentity(X509TrustManagerImpl.java:455) ~[na:1.8.0_60]rn at sun.security.ssl.X509TrustManagerImpl.checkIdentity(X509TrustManagerImpl.java:436) ~[na:1.8.0_60]rn at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:200) ~[na:1.8.0_60]rn at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124) ~[na:1.8.0_60]rn at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1488) ~[na:1.8.0_60]rn ... 18 common frames omittedrn2018-05-18 10:57:06.412 INFO 60376 --- [ngodb.net:27017] org.mongodb.driver.cluster : Exception in monitor thread while connecting to server cluster0-shard-00-01-ta2km.mongodb.net:27017rncom.mongodb.MongoSocketWriteException: Exception sending messagern at com.mongodb.connection.InternalStreamConnection.translateWriteException(InternalStreamConnection.java:516) ~[mongodb-driver-core-3.6.0.jar:na]rn at com.mongodb.connection.InternalStreamConnection.sendMessage(InternalStreamConnection.java:404) ~[mongodb-driver-core-3.6.0.jar:na]rn at com.mongodb.connection.InternalStreamConnection.sendCommandMessage(InternalStreamConnection.java:269) ~[mongodb-driver-core-3.6.0.jar:na]rn at com.mongodb.connection.InternalStreamConnection.sendAndReceive(InternalStreamConnection.java:252) ~[mongodb-driver-core-3.6.0.jar:na]rn at com.mongodb.connection.CommandHelper.sendAndReceive(CommandHelper.java:84) ~[mongodb-driver-core-3.6.0.jar:na]rn at com.mongodb.connection.CommandHelper.executeCommand(CommandHelper.java:34) ~[mongodb-driver-core-3.6.0.jar:na]rn at com.mongodb.connection.InternalStreamConnectionInitializer.initializeConnectionDescription(InternalStreamConnectionInitializer.java:91) ~[mongodb-driver-core-3.6.0.jar:na]rn at com.mongodb.connection.InternalStreamConnectionInitializer.initialize(InternalStreamConnectionInitializer.java:51) ~[mongodb-driver-core-3.6.0.jar:na]rn at com.mongodb.connection.InternalStreamConnection.open(InternalStreamConnection.java:127) ~[mongodb-driver-core-3.6.0.jar:na]rn at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:114) ~[mongodb-driver-core-3.6.0.jar:na]rn at java.lang.Thread.run(Thread.java:745) [na:1.8.0_60]rnCaused by: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative names matching IP address 18.233.195.78 foundrn at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) ~[na:1.8.0_60]rn at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949) ~[na:1.8.0_60]rn at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302) ~[na:1.8.0_60]rn at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296) ~[na:1.8.0_60]rn at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1506) ~[na:1.8.0_60]rn at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216) ~[na:1.8.0_60]rn at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979) ~[na:1.8.0_60]rn at sun.security.ssl.Handshaker.process_record(Handshaker.java:914) ~[na:1.8.0_60]rn at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062) ~[na:1.8.0_60]rn at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375) ~[na:1.8.0_60]rn at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:747) ~[na:1.8.0_60]rn at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:123) ~[na:1.8.0_60]rn at com.mongodb.connection.SocketStream.write(SocketStream.java:74) ~[mongodb-driver-core-3.6.0.jar:na]rn at com.mongodb.connection.InternalStreamConnection.sendMessage(InternalStreamConnection.java:401) ~[mongodb-driver-core-3.6.0.jar:na]rn ... 9 common frames omittedrnCaused by: java.security.cert.CertificateException: No subject alternative names matching IP address 18.233.195.78 foundrn at sun.security.util.HostnameChecker.matchIP(HostnameChecker.java:167) ~[na:1.8.0_60]rn at sun.security.util.HostnameChecker.match(HostnameChecker.java:93) ~[na:1.8.0_60]rn at sun.security.ssl.X509TrustManagerImpl.checkIdentity(X509TrustManagerImpl.java:455) ~[na:1.8.0_60]rn at sun.security.ssl.X509TrustManagerImpl.checkIdentity(X509TrustManagerImpl.java:436) ~[na:1.8.0_60]rn at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:200) ~[na:1.8.0_60]rn at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124) ~[na:1.8.0_60]rn at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1488) ~[na:1.8.0_60]rn ... 18 common frames omitted[/code] 论坛

严重: Exception sending context initialized event

09-18

试了好多办法求帮助n严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenernorg.springframework.beans.factory.BeanDefinitionStoreException: Line 9 in XML document from class path resource [applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException: Document root element "beans", must match DOCTYPE root "null".norg.xml.sax.SAXParseException; lineNumber: 9; columnNumber: 4; Document root element "beans", must match DOCTYPE root "null".n at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)n at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)n at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:222)n at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:173)n at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:148)n at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:126)n at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:142)n at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:126)n at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)n at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)n at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:269)n at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:134)n at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)n at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)n at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)n at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)n at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)n at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)n at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)n at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)n at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)n at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1247)n at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1898)n at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)n at java.util.concurrent.FutureTask.run(FutureTask.java:262)n at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)n at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)n at java.lang.Thread.run(Thread.java:745)nnnapplicationContext.xmln```n nn n n n n n n n n n n n n n n n n n nnn```nn 问答

Tomcat部署工程时报错: Exception sending context...

09-01

工程师SVN上检出的,按理说应该是没有问题的,怎么会发生如下错误。nTomcat启动部署工程时报错:nnn```n 信息: Deploying web application directory D:\apache-tomcat-7.0.30\webapps\MCn九月 01, 2016 8:43:42 上午 org.apache.catalina.core.ApplicationContext logn信息: No Spring WebApplicationInitializer types detected on classpathn九月 01, 2016 8:43:42 上午 org.apache.catalina.core.ApplicationContext logn信息: Initializing Spring root WebApplicationContextn九月 01, 2016 8:43:45 上午 org.apache.catalina.core.StandardContext listenerStartn严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenernorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mcServiceHsf' defined in file [D:\apache-tomcat-7.0.30\webapps\MC\WEB-INF\classes\com\inspur\gcloud\ext\service\impl\MessageCenterServiceImpl.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.inspur.gcloud.ext.service.impl.MessageCenterServiceImpl]: Constructor threw exception; nested exception is java.lang.ExceptionInInitializerErrorn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1013)n at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:959)n at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:490)n at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)n at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)n at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)n at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)n at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)n at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)n at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)n at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)n at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389)n at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)n at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)n at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791)n at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)n at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)n at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)n at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)n at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)n at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1100)n at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1618)n at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)n at java.util.concurrent.FutureTask.run(FutureTask.java:262)n at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)n at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)n at java.lang.Thread.run(Thread.java:745)nCaused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.inspur.gcloud.ext.service.impl.MessageCenterServiceImpl]: Constructor threw exception; nested exception is java.lang.ExceptionInInitializerErrorn at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163)n at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87)n at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1006)n ... 26 morenCaused by: java.lang.ExceptionInInitializerErrorn at com.inspur.gcloud.ext.service.impl.MessageCenterServiceImpl.(MessageCenterServiceImpl.java:43)n at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)n at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)n at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)n at java.lang.reflect.Constructor.newInstance(Constructor.java:526)n at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:148)n ... 28 morenCaused by: com.inspur.hsf.service.rpc.RpcException: 没有找到可用服务,服务:logCenter.primaryServicen at com.inspur.hsf.service.cluster.impl.AvailableClusterInvoker.doInvoke(AvailableClusterInvoker.java:88)n at com.inspur.hsf.service.cluster.impl.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:222)n at com.inspur.hsf.service.rpc.transcation.humanredo.StoreFailureInvoker.invoke(StoreFailureInvoker.java:34)n at com.inspur.hsf.service.rpc.proxy.jdk.JdkProxyFactory$1.invoke(JdkProxyFactory.java:82)n at com.sun.proxy.$Proxy8.isModuleExistByCode(Unknown Source)n at com.inspur.gcloud.logcenter.primary.core.PrimaryManager.init(PrimaryManager.java:29)n at com.inspur.gcloud.logcenter.util.GCloudLogUtil.(GCloudLogUtil.java:26)n at com.inspur.gcloud.logcenter.util.GCloudLogUtil.getInstance(GCloudLogUtil.java:62)n at com.inspur.gcloud.mc.common.util.McLoggerUtil.(McLoggerUtil.java:28)n at com.inspur.gcloud.mc.common.util.McLoggerUtil.(McLoggerUtil.java:30)n ... 34 moren```nn 问答

没有更多推荐了,返回首页