开发者社区> 问答> 正文

新人求解,关于javaWeb的点击注册的报错信息。 ?报错

从网上导入了一个简单的web项目,在注册功能提交时,转到UserService时,一直转圈圈,等了一分钟后跳出报错页面。。求解

展开
收起
爱吃鱼的程序员 2020-06-23 21:01:01 479 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    你这样提问题就好比问“为什么我在吃饭的时候找不到筷子啊?”

    可能是你的Tomcat服务器没启动

    可能是数据库连接不上.....你最好贴下异常信息吧

    HTTPStatus500-java.lang.reflect.InvocationTargetException

    typeExceptionreport

    messagejava.lang.reflect.InvocationTargetException

    descriptionTheserverencounteredaninternalerrorthatpreventeditfromfulfillingthisrequest.

    exception

    java.lang.RuntimeException:java.lang.reflect.InvocationTargetException
    cn.itcast.servlet.BaseServlet.service(BaseServlet.java:61)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    rootcause

    java.lang.reflect.InvocationTargetException
    sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    java.lang.reflect.Method.invoke(Method.java:606)
    cn.itcast.servlet.BaseServlet.service(BaseServlet.java:45)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    rootcause

    java.lang.RuntimeException:java.sql.SQLException:Connectionscouldnotbeacquiredfromtheunderlyingdatabase!
    cn.itcast.bookstore.user.dao.UserDao.findByUsername(UserDao.java:30)
    cn.itcast.bookstore.user.service.UserService.regist(UserService.java:21)
    cn.itcast.bookstore.user.web.servlet.UserServlet.regist(UserServlet.java:164)
    sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    java.lang.reflect.Method.invoke(Method.java:606)
    cn.itcast.servlet.BaseServlet.service(BaseServlet.java:45)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    rootcause

    java.sql.SQLException:Connectionscouldnotbeacquiredfromtheunderlyingdatabase!
    com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
    com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:615)
    com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128)
    cn.itcast.jdbc.JdbcUtils.getConnection(JdbcUtils.java:43)
    cn.itcast.jdbc.TxQueryRunner.query(TxQueryRunner.java:22)
    cn.itcast.bookstore.user.dao.UserDao.findByUsername(UserDao.java:28)
    cn.itcast.bookstore.user.service.UserService.regist(UserService.java:21)
    cn.itcast.bookstore.user.web.servlet.UserServlet.regist(UserServlet.java:164)
    sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    java.lang.reflect.Method.invoke(Method.java:606)
    cn.itcast.servlet.BaseServlet.service(BaseServlet.java:45)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    rootcause

    com.mchange.v2.resourcepool.CannotAcquireResourceException:AResourcePoolcouldnotacquirearesourcefromitsprimaryfactoryorsource.
    com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1406)
    com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:594)
    com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:514)
    com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutAndMarkConnectionInUse(C3P0PooledConnectionPool.java:681)
    com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:608)
    com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128)
    cn.itcast.jdbc.JdbcUtils.getConnection(JdbcUtils.java:43)
    cn.itcast.jdbc.TxQueryRunner.query(TxQueryRunner.java:22)
    cn.itcast.bookstore.user.dao.UserDao.findByUsername(UserDao.java:28)
    cn.itcast.bookstore.user.service.UserService.regist(UserService.java:21)
    cn.itcast.bookstore.user.web.servlet.UserServlet.regist(UserServlet.java:164)
    sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    java.lang.reflect.Method.invoke(Method.java:606)
    cn.itcast.servlet.BaseServlet.service(BaseServlet.java:45)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    noteThefullstacktraceoftherootcauseisavailableintheApacheTomcat/7.0.42logs.

    不好意思啊,刚才明明截图发异常了,回头看却没有了。。

    2020-06-23 21:01:20
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Spring Cloud Alibaba - 重新定义 Java Cloud-Native 立即下载
The Reactive Cloud Native Arch 立即下载
JAVA开发手册1.5.0 立即下载