欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  科技

consle总是停止出现后台报错的解决方法

程序员文章站 2022-07-05 22:56:05
问题描述:consle总是停止,后台会报错: ErrCode: 13102001 Message: cannot found datasource with name ''...

问题描述:consle总是停止,后台会报错:

ErrCode: 13102001
Message: cannot found datasource with name ''{0}'' .(the datasource with name 'sam' cannot get connection!)
at com.primeton.common.connection.impl.datasource.ext.UnconfirmedDataSource.getDataSource(UnconfirmedDataSource.java:75)
at com.primeton.common.connection.impl.datasource.ext.UnconfirmedDataSource.confirm(UnconfirmedDataSource.java:52)
at com.primeton.ext.common.connection.datasource.DataSourceCache.putDataSource(DataSourceCache.java:121)
at com.eos.common.connection.mbean.DataSourceConfigHandler.toLoad(DataSourceConfigHandler.java:123)
at com.eos.common.connection.mbean.DataSourceConfigHandler.toLoad(DataSourceConfigHandler.java:54)
at com.primeton.common.config.impl.ConfigurationHelper$1.doHandler(ConfigurationHelper.java:58)
at com.primeton.common.config.impl.ConfigurationHelper.handlerModule(ConfigurationHelper.java:123)
at com.primeton.common.config.impl.ConfigurationHelper.handlerModule(ConfigurationHelper.java:116)
at com.primeton.common.config.impl.ConfigurationHelper.doHandler(ConfigurationHelper.java:78)
at com.primeton.common.config.impl.ConfigurationHelper.initLoad(ConfigurationHelper.java:53)
at com.primeton.ext.common.config.startup.AppConfigStartupRuntimeListener.start(AppConfigStartupRuntimeListener.java:50)
at com.primeton.runtime.core.impl.RuntimeListenerManagerImpl.startListener(RuntimeListenerManagerImpl.java:43)
at com.primeton.ext.runtime.core.RuntimeManager.start(RuntimeManager.java:55)
at com.primeton.ext.runtime.core.RuntimeJ2EEHost.contextInitialized(RuntimeJ2EEHost.java:52)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3763)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:904)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:867)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
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:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Caused by: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (IO Error: The Network Adapter could not establish the connection)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:855)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
at com.primeton.ext.infra.connection.DataSourceWrapper.getAvailableConnectionIfNecessary(DataSourceWrapper.java:141)
at com.primeton.ext.infra.connection.DataSourceWrapper.getConnection(DataSourceWrapper.java:63)
at com.primeton.common.connection.impl.datasource.ext.UnconfirmedDataSource.getDataSource(UnconfirmedDataSource.java:71)
... 37 more
Caused by: java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:743)
at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:662)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:560)
at org.apache.tomcat.dbcp.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)
at org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:877)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:851)
... 41 more
Caused by: oracle.net.ns.NetException: The Network Adapter could not establish the connection
at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:470)
at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:506)
at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:595)
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:230)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1452)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:496)
... 48 more
Caused by: java.net.SocketTimeoutException: connect timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:161)
at oracle.net.nt.ConnOption.connect(ConnOption.java:159)
at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:428)
... 53 more

排查方向:首先检查数据库连接是否正常,并检查\apache-tomcat-5.5.20\webapps\governor\WEB-INF\_srv\config\user-config文件中数据库配置是否正确。