大侠们org.hibernate.exception.GenericJDBCException: Cannot open connection

org.hibernate.exception.GenericJDBCException: Cannot open connection
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException
(SQLStateConverter.java:103)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.j
ava:91)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelp
er.java:43)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelp
er.java:29)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager
.java:426)
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.
java:144)
at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:119)
at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:
57)
at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1326
)
at org.jbpm.persistence.db.DbPersistenceService.beginTransaction(DbPersi
stenceService.java:132)
at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistence
Service.java:124)
at org.jbpm.persistence.db.DbPersistenceService.getGraphSession(DbPersis
tenceService.java:345)
at org.jbpm.JbpmContext.getGraphSession(JbpmContext.java:571)
at com.taihe.workflow.appwork.MyAppListByType.performTask(MyAppListByTyp
e.java:41)
at com.taihe.workflow.action.BaseServlet.doGet(BaseServlet.java:25)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:188)
at com.taihe.base.filter.SSOFilter.doFilter(SSOFilter.java:33)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:188)
at com.taihe.base.filter.ChangeReqEncoding.doFilter(ChangeReqEncoding.ja
va:33)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:874)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p
rocessConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
int.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFol
lowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:689)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create Poolabl
eConnectionFactory (Io 异常: Invalid number format for port number)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDat
aSource.java:1225)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSo
urce.java:880)
at org.hibernate.connection.DatasourceConnectionProvider.getConnection(D
atasourceConnectionProvider.java:69)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager
.java:423)
... 32 more
Caused by: java.sql.SQLException: Io 异常: Invalid number format for port number

    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java

:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
:146)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
:255)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
at oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:
414)
at oracle.jdbc.driver.T4CConnection.(T4CConnection.java:165)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtensio
n.java:35)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
at org.apache.tomcat.dbcp.dbcp.DriverConnectionFactory.createConnection(
DriverConnectionFactory.java:38)
at org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(Pool
ableConnectionFactory.java:294)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.validateConnectionFactory
(BasicDataSource.java:1247)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDat
aSource.java:1221)
... 35 more
连接FTP服务器失败,请检查网络或FTP服务器参数设置!
连接FTP服务器失败,请检查网络或FTP服务器参数设置!
2011-08-03 12:26:59 [ERROR]-[com.portal.system.message.dao.MessageCenterDao.getW
arnMsg(MessageCenterDao.java:31)]Io 异常: Connection reset by peer: socket write
error
2011-08-03 12:26:59 [ERROR]-[com.portal.common.util.DBUtil.close(DBUtil.java
:133)]Already closed.

6个回答

应该是数据库链接的URL中端口配错了。
检查下数据库连接URL

[quote]连接FTP服务器失败,请检查网络或FTP服务器参数设置[/quote]
怎么还有FTP连接?
[quote]Io 异常: Invalid number format for port number[/quote]
端口不对?

[quote]Caused by: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create Poolabl
eConnectionFactory (Io 异常: Invalid number format for port number)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDat
aSource.java:1225) [/quote]

[color=red]
Invalid number format for port number[/color]

检查下你的 数据源或者链接池的配置! 数字

1.连接数据库的参数问题。检查ip,port,username,password等参数是否正确
2.连接数是否已满(一般这种情况发生的情况较少)

你的链接配置有问题

连接配置问题

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐