u011073464
u011073464
采纳率0%
2016-05-13 15:41

关于安卓开发,连接tomcat抛出exception

5

初学者,自己写的安卓程序,用json连接tomcat,mysql数据库,结果运行时候抛出异常,求帮助!
下面是抛出的异常, 在控制台打印的结果显示除了方括号以外根本没有信息返回
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
at com.mysql.jdbc.ResultSetImpl.findColumn(ResultSetImpl.java:1093)
at com.mysql.jdbc.ResultSetImpl.getString(ResultSetImpl.java:5488)
at utils.DBManager.getAdvertList(DBManager.java:155)
at dao.AdvertDao.getAdvertList(AdvertDao.java:25)
at action.UsersAction.doPost(UsersAction.java:65)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2500)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2489)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:744)

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

6条回答

  • liang061145 Sylar.Liang 5年前

    是程序执行中报错,还是启动程序就报错。。。但不管怎么说,你这应该就是sql有问题。

    点赞 评论 复制链接分享
  • donggua3694857 GrayHJX 5年前

    at utils.DBManager.getAdvertList(DBManager.java:155)
    后台程序有错,是不是sql语句没对。你尝试下打印你的sql语句

    点赞 评论 复制链接分享
  • rui888 兔子托尼啊 5年前

    应该你异常没贴全吧

    at utils.DBManager.getAdvertList(DBManager.java:155)
    at dao.AdvertDao.getAdvertList(AdvertDao.java:25)
    at action.UsersAction.doPost(UsersAction.java:65)
    看看你的代码

    点赞 评论 复制链接分享
  • u012377333 一枪尽骚丶魂 5年前

    看下你这个里面怎么写的呀

    
     at utils.DBManager.getAdvertList(DBManager.java:155)
    at dao.AdvertDao.getAdvertList(AdvertDao.java:25)
    at action.UsersAction.doPost(UsersAction.java:65)
    
    

    问题是在这个地方出现的,确认一下你调用sql语句的地方,你是使用什么连接mysql的呢?

    点赞 评论 复制链接分享
  • l_vaule l_vaule 5年前

    人家都把异常信息具体的告诉你了。

    点赞 评论 复制链接分享
  • qq_28042463 Emiya_Zero 5年前

    是不是sql语句错误

    点赞 评论 复制链接分享

相关推荐