404 和505 错误,http://localhost:8080/seckill/可成功出现index页面,但http://localhost:8080/seckill/seckill和http://localhost:8080/seckill/seckill/list分别出现404个505错误

来源:4-1 基于bootstrap开发页面结构

Echo鑫

2016-11-04 18:28

http://img.mukewang.com/581c62400001724f18960932.jpg

### Error querying database.  Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: An attempt by a client to checkout a Connection has timed out.

### The error may exist in file [E:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\seckill\WEB-INF\classes\mapper\SeckillDao.xml]

### The error may involve org.seckill.dao.SeckillDao.queryAll

### The error occurred while executing a query

### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: An attempt by a client to checkout a Connection has timed out.] with root cause

com.mchange.v2.resourcepool.TimeoutException: A client timed out while waiting to acquire a resource from com.mchange.v2.resourcepool.BasicResourcePool@fff09ff -- timeout at awaitAvailable()

这是什么原因,http://localhost:8080/seckill/可成功出现index页面,但http://localhost:8080/seckill/seckill和http://localhost:8080/seckill/seckill/list分别出现404个505错误

写回答 关注

3回答

  • 慕粉113444471
    2017-03-02 14:27:42

    兄台,我也报跟你类似的错误,请问你是怎么解决的啊

    Echo鑫

    我的是链接数据库端口我弄错了,你检查下jdbc配置文件看看

    2017-03-02 18:48:53

    共 1 条回复 >

  • Echo鑫
    2016-11-13 16:31:22

    已解决,端口问题

  • 慕粉3846091
    2016-11-04 19:43:23

    SeckillDao.xml 看看这个或者mybatis配置文件是否有问题,404是代表页面没有找到。505是HTTP Version Not Supported是由于服务器对http1.1协议不支持或者支持不好,看看GET请求后面是否多加了空格。

    Echo鑫

    我这代码,基本全是按照视频里打的,并对照了老师的源代码,没错啊,不知道为什么就是出现不来页面,链接不到数据库。

    2016-11-05 11:14:28

    共 1 条回复 >

Java高并发秒杀API之web层

Java实现高并发秒杀API的第三门课,介绍Web层的设计和实现

66085 学习 · 395 问题

查看课程

相似问题