2 qq 30749917 qq_30749917 于 2016.03.25 16:44 提问

Java的框架SSH整合的项目,项目启动时总是会报一个莫名其妙的错误? 50C

Unable to load configuration. - [unknown location]

Caused by: Unable to load configuration. - [unknown location]

Caused by: Unable to load jar:file:/D:/mars-workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/vvvvvvvvvvv/WEB-INF/lib/struts2-spring-plugin-2.3.15.3.jar!/struts-plugin.xml - [unknown location]

Caused by: Connection timed out: connect - [unknown location]

Caused by: java.net.ConnectException: Connection timed out: connect

个人分析应该不是jar包冲突的问题,因为项目以前是可以正常运行的,以前出过一次这样的问题,但是放了两天之后再运行又可以正常运行了。。。。现在又出现了这样的问题,百度上有人说是因为查询次数太多导致无法查询,但是如代码所示,无论是在junit测试类中还是在spring容器刚刚初始化完成利用监听器立即查询所有权限的功能,均可以正常访问到数据库,所以应该也不是c3p0数据库连接池的原因,整的我现在也不知道到底是什么问题。。求指教。

5个回答

qq_30749917
qq_30749917   2016.03.25 16:45

以下整个的错误信息:
以下是整个的异常信息:

三月 25, 2016 4:28:04 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:vvvvvvvvvvv' did not find a matching property.
三月 25, 2016 4:28:04 下午 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\Java\jdk1.7.0_07\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;D:/Java/jdk1.7.0_07/bin/../jre/bin/server;D:/Java/jdk1.7.0_07/bin/../jre/bin;D:/Java/jdk1.7.0_07/bin/../jre/lib/amd64;D:\Java\jdk1.7.0_07\bin;C:\ProgramData\Oracle\Java\javapath;D:\apache-tomcat-6.0.16\bin;D:\oracle\product\10.2.0\client_1\bin;D:\oracle\product\10.2.0\db_1\bin;C:\Program Files\Broadcom\Broadcom 802.11 Network Adapter;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;D:\Mysql\bin;F:\SDKs\android-sdk\platform-tools;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;D:\Rational\common;C:\Program Files (x86)\Windows Live\Shared;D:\eclipse-mars1\eclipse;;.
三月 25, 2016 4:28:04 下午 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8989
三月 25, 2016 4:28:04 下午 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 417 ms
三月 25, 2016 4:28:04 下午 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
三月 25, 2016 4:28:04 下午 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.16
三月 25, 2016 4:28:05 下午 org.apache.catalina.core.StandardContext addApplicationListener
INFO: The listener "org.springframework.web.context.ContextLoaderListener" is already configured for this context. The duplicate definition has been ignored.
三月 25, 2016 4:28:05 下午 org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Hibernate:
select
right0_.ID as ID1_3_,
right0_.RIGHTNAME as RIGHTNAM2_3_,
right0_.RIGHTURL as RIGHTURL3_3_,
right0_.RIGHTDESC as RIGHTDES4_3_,
right0_.RIGHTCODE as RIGHTCOD5_3_,
right0_.RIGHTPOS as RIGHTPOS6_3_,
right0_.COMMON as COMMON7_3_
from
RIGHTS right0_
三月 25, 2016 4:28:29 下午 org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter struts2
Unable to load configuration. - [unknown location]
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:428)
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:275)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:108)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3709)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4356)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
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:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: Unable to load configuration. - [unknown location]
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:69)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:371)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:415)
... 20 more
Caused by: Unable to load jar:file:/D:/mars-workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/vvvvvvvvvvv/WEB-INF/lib/struts2-spring-plugin-2.3.15.3.jar!/struts-plugin.xml - [unknown location]
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:909)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:154)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:121)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:179)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)
... 22 more
Caused by: Connection timed out: connect - [unknown location]
at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:115)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:904)
... 26 more
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:69)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:157)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
at java.net.Socket.connect(Socket.java:579)
at java.net.Socket.connect(Socket.java:528)
at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:378)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:473)
at sun.net.www.http.HttpClient.(HttpClient.java:203)
at sun.net.www.http.HttpClient.New(HttpClient.java:290)
at sun.net.www.http.HttpClient.New(HttpClient.java:306)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:995)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:931)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:849)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1299)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:632)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1270)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:1237)
at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:260)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dispatch(XMLDocumentScannerImpl.java:1153)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next(XMLDocumentScannerImpl.java:1049)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:962)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:489)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:302)
at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:113)
... 27 more

三月 25, 2016 4:28:29 下午 org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
三月 25, 2016 4:28:29 下午 org.apache.catalina.core.StandardContext start
SEVERE: Context [/vvvvvvvvvvv] startup failed due to previous errors
三月 25, 2016 4:28:29 下午 org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
三月 25, 2016 4:28:30 下午 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8989
三月 25, 2016 4:28:30 下午 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
三月 25, 2016 4:28:30 下午 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/23 config=null
三月 25, 2016 4:28:30 下午 org.apache.catalina.startup.Catalina start
INFO: Server startup in 25280 ms

danielinbiti
danielinbiti   Ds   Rxr 2016.03.25 16:50
qq_30749917
qq_30749917 应该不是这个问题,我用的struts2包是2.3.15的,而且这篇博客中说的jar包我已经全部加入了,而且这个项目以前是可以正常运行的。这个错误是突然出现的。
一年多之前 回复
rui888
rui888   Ds   Rxr 2016.03.25 18:03

比如数据连接池 有的 连接没有释放。

qq_30749917
qq_30749917 一开始我也以为是这样的问题,但是我用junit测试类可以正常打印c3p0的链接阿,在IOC容器初始化之前我还用hibernate加载了所有的权限放到了servletContext中,debug的时候也没出错且sql语句正常打印,会是连接池没有释放链接的行为吗?
一年多之前 回复
StressedOut
StressedOut   2016.03.25 21:35

首先,如果是启动时出错,要么是配置问题,要么是服务器问题,要么是数据库问题,优先考虑前者,一点一点按照ssh项目启动逻辑找问题,其次是服务器中的部署项目是不是出问题了,移除并重新部署,最后也是可能性最小的,重启数据库

nijiayy
nijiayy   2016.03.26 15:27

从你的log上看,最开始的报错不是这个吗?Caused by: Unable to load jar:file:/D:/mars-workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/vvvvvvvvvvv/WEB-INF/lib/struts2-spring-plugin-2.3.15.3.jar!/struts-plugin.xml - [unknown location]那就应该是你的那个jar包的问题吧。。。你换一个低版本的struts2-spring-plugin.jar呢?我目前用的2.3.8版本的,至少是配置上没有问题。。。

nijiayy
nijiayy 回复qq_30749917: 我觉得应该和ip没有关系吧==
一年多之前 回复
qq_30749917
qq_30749917 真的不是配置的问题,昨天实在没办法了去实验室去找人解决,结果连上实验室的wifi之后,突然就好了。。。正常运行!但是昨天晚上回来之后又变这样了。。!!!!!!太坑了有没有!!这是不是和IP有原因啊 ?????
一年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!