连接oracle出现的错误!已经弄了两天了,还是没弄好,求高手解答!

我有一头小毛驴 发布于 2012/09/17 20:02
阅读 14K+
收藏 1

 Managed Threads: 3
 Active Threads: 3
 Active Tasks:
  com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1b22d99 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0)
  com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@cfad31 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2)
  com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@73a5d3 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1)
 Pending Tasks:
  com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@8be9ef
  com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1ab5dae
Pool thread stack traces:
 Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2,5,main]
  java.net.PlainSocketImpl.socketConnect(Native Method)
  java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
  java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
  java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
  java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
  java.net.Socket.connect(Socket.java:529)
  java.net.Socket.connect(Socket.java:478)
  java.net.Socket.<init>(Socket.java:375)
  java.net.Socket.<init>(Socket.java:189)
  oracle.net.nt.TcpNTAdapter.connect(Unknown Source)
  oracle.net.nt.ConnOption.connect(Unknown Source)
  oracle.net.nt.ConnStrategy.execute(Unknown Source)
  oracle.net.resolver.AddrResolution.resolveAndExecute(Unknown Source)
  oracle.net.ns.NSProtocol.establishConnection(Unknown Source)
  oracle.net.ns.NSProtocol.connect(Unknown Source)
  oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:843)
  oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:267)
  oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:413)
  oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:164)
  oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:34)
  oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:752)
  com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
  com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
  com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
  com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
  com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
  com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
  com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
  com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
 Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0,5,main]
  java.net.PlainSocketImpl.socketConnect(Native Method)
  java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
  java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
  java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
  java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
  java.net.Socket.connect(Socket.java:529)
  java.net.Socket.connect(Socket.java:478)
  java.net.Socket.<init>(Socket.java:375)
  java.net.Socket.<init>(Socket.java:189)
  oracle.net.nt.TcpNTAdapter.connect(Unknown Source)
  oracle.net.nt.ConnOption.connect(Unknown Source)
  oracle.net.nt.ConnStrategy.execute(Unknown Source)
  oracle.net.resolver.AddrResolution.resolveAndExecute(Unknown Source)
  oracle.net.ns.NSProtocol.establishConnection(Unknown Source)
  oracle.net.ns.NSProtocol.connect(Unknown Source)
  oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:843)
  oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:267)
  oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:413)
  oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:164)
  oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:34)
  oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:752)
  com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
  com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
  com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
  com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
  com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
  com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
  com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
  com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
 Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1,5,main]
  java.net.PlainSocketImpl.socketConnect(Native Method)
  java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
  java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
  java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
  java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
  java.net.Socket.connect(Socket.java:529)
  java.net.Socket.connect(Socket.java:478)
  java.net.Socket.<init>(Socket.java:375)
  java.net.Socket.<init>(Socket.java:189)
  oracle.net.nt.TcpNTAdapter.connect(Unknown Source)
  oracle.net.nt.ConnOption.connect(Unknown Source)
  oracle.net.nt.ConnStrategy.execute(Unknown Source)
  oracle.net.resolver.AddrResolution.resolveAndExecute(Unknown Source)
  oracle.net.ns.NSProtocol.establishConnection(Unknown Source)
  oracle.net.ns.NSProtocol.connect(Unknown Source)
  oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:843)
  oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:267)
  oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:413)
  oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:164)
  oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:34)
  oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:752)
  com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
  com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
  com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
  com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
  com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
  com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
  com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
  com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)


2012-09-17 20:01:31 [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2] WARN  com.mchange.v2.resourcepool.BasicResourcePool - com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@cfad31 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception:
java.sql.SQLException: Io 异常: The Network Adapter could not establish the connection
 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)
 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145)
 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:254)
 at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:386)
 at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:413)
 at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:164)
 at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:34)
 at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:752)
 at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
 at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
 at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
 at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
 at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
 at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
 at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
 at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
2012-09-17 20:01:31 [main] WARN  org.hibernate.engine.jdbc.internal.JdbcServicesImpl - HHH000342: Could not obtain connection to query metadata : Connections could not be acquired from the underlying database!
2012-09-17 20:01:31 [main] INFO  org.hibernate.dialect.Dialect - HHH000400: Using dialect: org.hibernate.dialect.Oracle10gDialect
2012-09-17 20:01:31 [main] INFO  org.hibernate.engine.jdbc.internal.LobCreatorBuilder - HHH000422: Disabling contextual LOB creation as connection was null
2012-09-17 20:01:31 [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1] WARN  com.mchange.v2.resourcepool.BasicResourcePool - com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@73a5d3 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception:
java.sql.SQLException: Io 异常: The Network Adapter could not establish the connection
 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)
 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145)
 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:254)
 at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:386)
 at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:413)
 at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:164)
 at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:34)
 at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:752)
 at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
 at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
 at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
 at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
 at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
 at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
 at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
 at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
2012-09-17 20:01:31 [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0] WARN  com.mchange.v2.resourcepool.BasicResourcePool - com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1b22d99 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception:
java.sql.SQLException: Io 异常: The Network Adapter could not establish the connection
 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)
 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145)
 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:254)
 at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:386)
 at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:413)
 at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:164)
 at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:34)
 at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:752)
 at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
 at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
 at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
 at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
 at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
 at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
 at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
 at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
2012-09-17 20:01:32 [main] INFO  org.hibernate.engine.transaction.internal.TransactionFactoryInitiator - HHH000399: Using default transaction strategy (direct JDBC transactions)
2012-09-17 20:01:32 [main] INFO  org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory - HHH000397: Using ASTQueryTranslatorFactory
2012-09-17 20:01:32 [main] WARN  net.sf.ehcache.config.ConfigurationFactory - No configuration found. Configuring ehcache from ehcache-failsafe.xml  found in the classpath: jar:file:/E:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/struts2spring3hibernate4/WEB-INF/lib/ehcache-core-2.4.3.jar!/ehcache-failsafe.xml
2012-09-17 20:01:32 [main] INFO  org.hibernate.validator.util.Version - Hibernate Validator 4.2.0.Final
2012-09-17 20:01:32 [main] WARN  org.hibernate.cache.ehcache.AbstractEhcacheRegionFactory - HHH020003: Could not find a specific ehcache configuration for cache named [cn.javass.demo.model.UserModel]; using defaults.
2012-09-17 20:01:32 [main] INFO  org.springframework.orm.hibernate4.HibernateTransactionManager - Using DataSource [com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 5, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 1hge15y8p1mum8up1hkphgw|15f157b, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> oracle.jdbc.driver.OracleDriver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 1hge15y8p1mum8up1hkphgw|15f157b, idleConnectionTestPeriod -> 0, initialPoolSize -> 5, jdbcUrl -> jdbc:oracle:thin:@localhost :1521:orcl, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 100, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 2, numHelperThreads -> 3, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> null, properties -> {user=******, password=******}, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ]] of Hibernate SessionFactory for HibernateTransactionManager
2012-09-17 20:01:32 [main] INFO  org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 67404 ms
2012-9-17 20:01:32 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring FrameworkServlet 'spring'
2012-09-17 20:01:32 [main] INFO  org.springframework.web.servlet.DispatcherServlet - FrameworkServlet 'spring': initialization started
2012-09-17 20:01:32 [main] INFO  org.springframework.web.context.support.XmlWebApplicationContext - Refreshing WebApplicationContext for namespace 'spring-servlet': startup date [Mon Sep 17 20:01:32 CST 2012]; parent: Root WebApplicationContext
2012-09-17 20:01:32 [main] INFO  org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [spring-servlet.xml]
2012-09-17 20:01:33 [main] INFO  org.springframework.beans.factory.support.DefaultListableBeanFactory - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1713b42: defining beans [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter#0,org.springframework.web.servlet.handler.MappedInterceptor#0,org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver#0,org.springframework.web.servlet.mvc.annotation.ResponseStatusExceptionResolver#0,org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver#0,org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping,org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter,org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter,validator,conversion-service,indexController,userController,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.web.servlet.config.viewControllerHandlerMapping,org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler#0,org.springframework.web.servlet.handler.SimpleUrlHandlerMapping#0,org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0,org.springframework.web.servlet.handler.SimpleUrlHandlerMapping#1,org.springframework.web.servlet.resource.ResourceHttpRequestHandler#1,org.springframework.web.servlet.handler.SimpleUrlHandlerMapping#2,org.springframework.web.servlet.resource.ResourceHttpRequestHandler#2,org.springframework.web.servlet.handler.SimpleUrlHandlerMapping#3,org.springframework.web.servlet.view.BeanNameViewResolver#0,org.springframework.web.servlet.view.ContentNegotiatingViewResolver#0,defaultViewResolver,defaultJsonView,multipartResolver,exceptionResolver,org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor#0]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@50a649
2012-09-17 20:01:33 [main] INFO  org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - Mapped "{[/index],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String cn.javass.demo.web.controller.IndexController.index(javax.servlet.http.HttpServletRequest)
2012-09-17 20:01:33 [main] INFO  org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - Mapped "{[/user/add],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String cn.javass.demo.web.controller.UserController.toAdd(org.springframework.ui.Model)
2012-09-17 20:01:33 [main] INFO  org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - Mapped "{[/user/{id}/update],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String cn.javass.demo.web.controller.UserController.toUpdate(org.springframework.ui.Model,java.lang.Integer)
2012-09-17 20:01:33 [main] INFO  org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - Mapped "{[/user/{id}/delete],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String cn.javass.demo.web.controller.UserController.toDelete(java.lang.Integer)
2012-09-17 20:01:33 [main] INFO  org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - Mapped "{[/user/add],methods=[POST],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String cn.javass.demo.web.controller.UserController.add(org.springframework.ui.Model,cn.javass.demo.model.UserModel,org.springframework.validation.BindingResult)
2012-09-17 20:01:33 [main] INFO  org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - Mapped "{[/user],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String cn.javass.demo.web.controller.UserController.list(javax.servlet.http.HttpServletRequest,org.springframework.ui.Model)
2012-09-17 20:01:33 [main] INFO  org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - Mapped "{[/user/{id}/delete],methods=[DELETE],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String cn.javass.demo.web.controller.UserController.delete(java.lang.Integer)
2012-09-17 20:01:33 [main] INFO  org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - Mapped "{[/user/query],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String cn.javass.demo.web.controller.UserController.query(javax.servlet.http.HttpServletRequest,org.springframework.ui.Model,cn.javass.demo.model.UserQueryModel)
2012-09-17 20:01:33 [main] INFO  org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - Mapped "{[/user/{id}/update],methods=[PUT],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String cn.javass.demo.web.controller.UserController.update(org.springframework.ui.Model,cn.javass.demo.model.UserModel,org.springframework.validation.BindingResult)
2012-09-17 20:01:33 [main] INFO  org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - Mapped "{[/user/success],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String cn.javass.demo.web.controller.UserController.success()
2012-09-17 20:01:33 [main] INFO  org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - Mapped "{[/user/{userId}/view],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String cn.javass.demo.web.controller.UserController.view(java.lang.Integer,javax.servlet.http.HttpServletRequest)
2012-09-17 20:01:33 [main] INFO  org.springframework.web.servlet.handler.SimpleUrlHandlerMapping - Root mapping to handler of type [class org.springframework.web.servlet.mvc.ParameterizableViewController]
2012-09-17 20:01:33 [main] INFO  org.springframework.web.servlet.handler.SimpleUrlHandlerMapping - Mapped URL path [/**] onto handler 'org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler#0'
2012-09-17 20:01:33 [main] INFO  org.springframework.web.servlet.handler.SimpleUrlHandlerMapping - Mapped URL path [/images/**] onto handler 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0'
2012-09-17 20:01:33 [main] INFO  org.springframework.web.servlet.handler.SimpleUrlHandlerMapping - Mapped URL path [/css/**] onto handler 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#1'
2012-09-17 20:01:33 [main] INFO  org.springframework.web.servlet.handler.SimpleUrlHandlerMapping - Mapped URL path [/js/**] onto handler 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#2'
2012-09-17 20:01:33 [main] INFO  org.springframework.web.servlet.DispatcherServlet - FrameworkServlet 'spring': initialization completed in 906 ms
2012-9-17 20:01:33 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2012-9-17 20:01:34 org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8009
2012-9-17 20:01:34 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/62  config=null
2012-9-17 20:01:34 org.apache.catalina.startup.Catalina start
信息: Server startup in 69122 ms
2012-09-17 20:01:36 [net.sf.ehcache.CacheManager@1b963c4] INFO  net.sf.ehcache.util.UpdateChecker - New update(s) found: 2.4.7 [http://www.terracotta.org/confluence/display/release/Release+Notes+Ehcache+Core+2.4]. Please check http://ehcache.org for the latest version.
2012-09-17 20:01:51 [Task-Thread-for-com.mchange.v2.async.ThreadPerTaskAsynchronousRunner@11f139b] WARN  com.mchange.v2.resourcepool.BasicResourcePool - com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@8be9ef -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception:
java.sql.SQLException: Io 异常: The Network Adapter could not establish the connection
 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)
 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145)
 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:254)
 at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:386)
 at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:413)
 at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:164)
 at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:34)
 at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:752)
 at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
 at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
 at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
 at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
 at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
 at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
 at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
 at com.mchange.v2.async.ThreadPerTaskAsynchronousRunner$TaskThread.run(ThreadPerTaskAsynchronousRunner.java:255)
2012-09-17 20:01:51 [Task-Thread-for-com.mchange.v2.async.ThreadPerTaskAsynchronousRunner@11f139b] WARN  com.mchange.v2.resourcepool.BasicResourcePool - com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1ab5dae -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception:
java.sql.SQLException: Io 异常: The Network Adapter could not establish the connection
 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)
 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145)
 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:254)
 at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:386)
 at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:413)
 at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:164)
 at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:34)
 at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:752)
 at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
 at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
 at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
 at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
 at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
 at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
 at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
 at com.mchange.v2.async.ThreadPerTaskAsynchronousRunner$TaskThread.run(ThreadPerTaskAsynchronousRunner.java:255)

加载中
0
loyal
loyal

你应该先试试jdbc的方法,直接连接.看看到底是数据库那边监听的问题还是你连接池配置的问题.

我有一头小毛驴
我有一头小毛驴
我先试一下!谢谢
0
Wentasy
Wentasy
您使用的是什么连接方式?
0
Wentasy
Wentasy

引用来自“Wentasy”的答案

您使用的是什么连接方式?
这个不困难啊。在applicationContext.xml里配置就可以了。
<!-- 创建sessionFactory 在<beans></beans>中加入-->
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource" />
</property>
<!-- 配置hibernate属性 -->
<property name="hibernateProperties">
<props>
<!-- 根据数据库配置相应的hibernate方言,各种数据库的方言不同 --> 
<prop key="hibernate.dialect">
     org.hibernate.dialect.OracleDialect
</prop>
<!-- 事务是否自动提交 -->
<prop key="hibernate.connection.autocommit">true</prop>
<!-- 显示sql语句 -->
<prop key="hibernate.show_sql">true</prop>
<!-- 解决提交乱码问题 -->
<prop key="connection.useUnicode">true</prop>
<prop key="connection.characterEncoding">UTF-8</prop>
<!-- 格式化sql语句 -->
<prop key="hibernate.format_sql">true</prop>
<prop key="hibernate.order_updates">true</prop>
<!-- 事务自动管理 -->
<prop key="hibernate.connection.release_mode">
after_transaction
</prop>
</props>
</property>
</bean>
0
我有一头小毛驴
我有一头小毛驴

引用来自“Wentasy”的答案

您使用的是什么连接方式?
thin
0
稻草鸟人
稻草鸟人
没仔细看报错,但是我觉得首先应该先telnet下oracle的端1521端口通不通。如果不通是不是考虑要开通下权限之类的,要是通的话估计就是你的配置问题了
0
我有一头小毛驴
我有一头小毛驴

引用来自“mars.ma”的答案

没仔细看报错,但是我觉得首先应该先telnet下oracle的端1521端口通不通。如果不通是不是考虑要开通下权限之类的,要是通的话估计就是你的配置问题了
端口肯定没问题的,配置我看过好多遍了,同事也看看了,疯了,网上各种方法都试了,谢谢了,我明天再试试
我有一头小毛驴
我有一头小毛驴
@mars.ma 我明天发出来,真的谢谢了
稻草鸟人
稻草鸟人
那你应该把配置发出来,大家才能一起看看,揣测下
0
我有一头小毛驴
我有一头小毛驴

引用来自“我有一头小毛驴”的答案

引用来自“mars.ma”的答案

没仔细看报错,但是我觉得首先应该先telnet下oracle的端1521端口通不通。如果不通是不是考虑要开通下权限之类的,要是通的话估计就是你的配置问题了
端口肯定没问题的,配置我看过好多遍了,同事也看看了,疯了,网上各种方法都试了,谢谢了,我明天再试试
 Managed Threads: 3 Active Threads: 3 Active Tasks: com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1cc5461 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0) com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1b7edd3 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1) com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@5ed853 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2) Pending Tasks: com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@cc5436 com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@acbd3a Pool thread stack traces: Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0,5,main] java.lang.Thread.sleep(Native Method) com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1805) com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547) Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1,5,main] java.lang.Thread.sleep(Native Method) com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1805) com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547) Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2,5,main] java.lang.Thread.sleep(Native Method) com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1805) com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)这是现在出现的错误
0
我有一头小毛驴
我有一头小毛驴

<!-- Hibernate SessionFactory -->
   <bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean" >
     <property name="dataSource" ref="dataSource"/>
     <property name="packagesToScan">
   <list>
    <value>cn.javass</value>
   </list>
  </property>
        <property name="hibernateProperties">
            <props>
                <prop key="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</prop>
                <prop key="hibernate.show_sql">true</prop>
                <prop key="hibernate.format_sql">true</prop>
                <prop key="hibernate.current_session_context_class">org.springframework.orm.hibernate4.SpringSessionContext</prop>
                <prop key="hibernate.query.substitutions">true 1, false 0</prop>
                <prop key="hibernate.default_batch_fetch_size">16</prop>
                <prop key="hibernate.max_fetch_depth">2</prop>
                <prop key="hibernate.generate_statistics">true</prop>
                <prop key="hibernate.bytecode.use_reflection_optimizer">true</prop>
               
                <prop key="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</prop>
                <prop key="hibernate.cache.use_query_cache">false</prop>
    <prop key="hibernate.cache.use_second_level_cache">true</prop>
                <prop key="hibernate.cache.use_structured_entries">true</prop>
             <prop key="hibernate.cache.region.factory_class">org.hibernate.cache.EhCacheRegionFactory</prop>
            </props>
        </property>
   </bean>

这是配置

0
風一樣的男子
風一樣的男子

关键是这句: java.sql.SQLException: Io 异常: The Network Adapter could not establish the connection

你的网络压根就连不上 DB,不信你用PL/SQL DEV或命令行连接看看

0
我有一头小毛驴
我有一头小毛驴

引用来自“風一樣的男子”的答案

关键是这句: java.sql.SQLException: Io 异常: The Network Adapter could not establish the connection

你的网络压根就连不上 DB,不信你用PL/SQL DEV或命令行连接看看

我试过了,可以的
返回顶部
顶部