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

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

WBOY
WBOYOriginal
2016-06-06 09:42:001101browse

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用户,不是权限问题

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn