运用sqlite数据库在查询一张表的具体信息时,要通过外键从另外一张表查询分类信息,出现异常。
java.sql.SQLException:databaseislockedQuery:selectid,name,descriptionfromcategoriesPa...
java.sql.SQLException: database is locked Query: select id, name,description from categories Parameters: []
at org.apache.commons.dbutils.QueryRunner.rethrow(QueryRunner.java:540)
at org.apache.commons.dbutils.QueryRunner.query(QueryRunner.java:397)
at com.zoehoo.dao.impl.BaseDao.query(BaseDao.java:38)
at com.zoehoo.dao.impl.BookDaoImpl.getPageData(BookDaoImpl.java:123)
at com.zoehoo.service.BookService.getPage(BookService.java:60)
at com.zoehoo.controller.BookServlet.findAll(BookServlet.java:165)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.zoehoo.controller.BaseServlet.doGet(BaseServlet.java:24)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
java.lang.NullPointerException
at com.zoehoo.dao.impl.BookDaoImpl$MyResultSetHandler.handle(BookDaoImpl.java:77)
at org.apache.commons.dbutils.QueryRunner.query(QueryRunner.java:394)
at org.apache.commons.dbutils.QueryRunner.query(QueryRunner.java:486)
at com.zoehoo.dao.impl.BaseDao.query(BaseDao.java:38)
问大神该如何解决? 展开
at org.apache.commons.dbutils.QueryRunner.rethrow(QueryRunner.java:540)
at org.apache.commons.dbutils.QueryRunner.query(QueryRunner.java:397)
at com.zoehoo.dao.impl.BaseDao.query(BaseDao.java:38)
at com.zoehoo.dao.impl.BookDaoImpl.getPageData(BookDaoImpl.java:123)
at com.zoehoo.service.BookService.getPage(BookService.java:60)
at com.zoehoo.controller.BookServlet.findAll(BookServlet.java:165)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.zoehoo.controller.BaseServlet.doGet(BaseServlet.java:24)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
java.lang.NullPointerException
at com.zoehoo.dao.impl.BookDaoImpl$MyResultSetHandler.handle(BookDaoImpl.java:77)
at org.apache.commons.dbutils.QueryRunner.query(QueryRunner.java:394)
at org.apache.commons.dbutils.QueryRunner.query(QueryRunner.java:486)
at com.zoehoo.dao.impl.BaseDao.query(BaseDao.java:38)
问大神该如何解决? 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |