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

ubuntu-阿里云下 Tomcat 应用无法连接数Mysql据库

程序员文章站 2022-05-12 09:52:39
...
ubuntumysqltomcat阿里云

1、程序没问题,在本机上调试无误,struts2 spting hibernate
2、在阿里云服务器上 配置了 JDK 1.7 + tomcat7 + mysql5.1 , OS:ubuntu64
3、将应用部署后,JSP 页面访问正常,只要涉及到连接数据库就会有如下提示

org.hibernate.exception.GenericJDBCException: Cannot open connection
org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114)
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52)
org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:449)
org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)
org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:142)
org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:85)
org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1354)
com.bfy.action.LoginAction.execute(LoginAction.java:89)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

。。。。。。。。。。。。

4、怀疑XML文件读取也有问题,去掉过滤器直接访问一些ACTION,提示没有对应的result
5、应用池内文件权限 均为 777
6、mysql数据库工作正常,应用 所使用的为root用户,不是权限问题