有在SAE上部署JAVA项目的吗? 求帮助

sliwey 2014-02-26 03:49:40
http://sliwey.sinaapp.com/web/front/index.jsp
这是我部署的项目地址

访问数据库时(即点击第二个菜单项)会出错
有人知道吗??

SSH框架版本如下
struts 2.3.15+spring 3.2.5+hibernate 4.2.8

本地一切正常
...全文
270 11 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
食仁魔法师 2014-05-19
  • 打赏
  • 举报
回复
晓风吹雾,我遇到是和你一样的问题,你的解决了没呢
sliwey 2014-02-26
  • 打赏
  • 举报
回复
引用 7 楼 defonds 的回复:
看看,玩省事,托管,现在遇见问题,叫天天不应叫地地不灵了吧。
菜鸟只能用这种的啊。。。
sliwey 2014-02-26
  • 打赏
  • 举报
回复
引用 8 楼 fangmingshijie 的回复:
你的数据库建在哪里?是建在sae上吗?
恩 是的 他有提供mysql服务
  • 打赏
  • 举报
回复
你的数据库建在哪里?是建在sae上吗?
Defonds 2014-02-26
  • 打赏
  • 举报
回复
看看,玩省事,托管,现在遇见问题,叫天天不应叫地地不灵了吧。
sliwey 2014-02-26
  • 打赏
  • 举报
回复
引用 3 楼 shnulaa 的回复:
mysql Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost. Communications link failure, then it means that the DB isn't reachable at all. This can have one or more of the following causes: IP address or hostname in JDBC URL is wrong. Hostname in JDBC URL is not recognized by local DNS server. Port number is missing or wrong in JDBC URL. DB server is down. DB server doesn't accept TCP/IP connections. DB server has run out of connections. Something in between Java and DB is blocking connections, e.g. a firewall or proxy. To solve the one or the other, follow the following advices: Verify and test them with ping. Refresh DNS or use IP address in JDBC URL instead. Verify it based on my.cnf of MySQL DB. Start the DB. Verify if mysqld is started without the --skip-networking option. Restart the DB and fix your code accordingly that it closes connections in finally. Disable firewall and/or configure firewall/proxy to allow/forward the port.
数据库不在本地 数据库地址我也能ping通
sliwey 2014-02-26
  • 打赏
  • 举报
回复
引用 4 楼 defonds 的回复:
[quote=引用 2 楼 u011559804 的回复:] [quote=引用 1 楼 defonds 的回复:] mysql 数据库连接超时了。 编辑 /etc/my.cnf(windows 下为 my.ini),将超时时间设置为 10 年,在 [mysqld] 后面加入: wait_timeout=315360000 然后重启 MySQL # service mysql restart 搞定。然后重启超时的 java 连接池程序吧。
数据库在SAE上啊。。不在本地 这个怎么改?[/quote]你们托管的? 嗨。那就联系他们的技术吧。[/quote] 我一个个人网站。。。根本没人理啊。。。
Defonds 2014-02-26
  • 打赏
  • 举报
回复
引用 2 楼 u011559804 的回复:
[quote=引用 1 楼 defonds 的回复:] mysql 数据库连接超时了。 编辑 /etc/my.cnf(windows 下为 my.ini),将超时时间设置为 10 年,在 [mysqld] 后面加入: wait_timeout=315360000 然后重启 MySQL # service mysql restart 搞定。然后重启超时的 java 连接池程序吧。
数据库在SAE上啊。。不在本地 这个怎么改?[/quote]你们托管的? 嗨。那就联系他们的技术吧。
晓风吹雾 2014-02-26
  • 打赏
  • 举报
回复
mysql Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost. Communications link failure, then it means that the DB isn't reachable at all. This can have one or more of the following causes: IP address or hostname in JDBC URL is wrong. Hostname in JDBC URL is not recognized by local DNS server. Port number is missing or wrong in JDBC URL. DB server is down. DB server doesn't accept TCP/IP connections. DB server has run out of connections. Something in between Java and DB is blocking connections, e.g. a firewall or proxy. To solve the one or the other, follow the following advices: Verify and test them with ping. Refresh DNS or use IP address in JDBC URL instead. Verify it based on my.cnf of MySQL DB. Start the DB. Verify if mysqld is started without the --skip-networking option. Restart the DB and fix your code accordingly that it closes connections in finally. Disable firewall and/or configure firewall/proxy to allow/forward the port.
sliwey 2014-02-26
  • 打赏
  • 举报
回复
引用 1 楼 defonds 的回复:
mysql 数据库连接超时了。 编辑 /etc/my.cnf(windows 下为 my.ini),将超时时间设置为 10 年,在 [mysqld] 后面加入: wait_timeout=315360000 然后重启 MySQL # service mysql restart 搞定。然后重启超时的 java 连接池程序吧。
数据库在SAE上啊。。不在本地 这个怎么改?
Defonds 2014-02-26
  • 打赏
  • 举报
回复
mysql 数据库连接超时了。 编辑 /etc/my.cnf(windows 下为 my.ini),将超时时间设置为 10 年,在 [mysqld] 后面加入: wait_timeout=315360000 然后重启 MySQL # service mysql restart 搞定。然后重启超时的 java 连接池程序吧。

81,122

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧