我用的是7.1版本,程序数据集连接的是mysql的数据库,查询的时候页面经常出现数据库连接不上的错误。跟踪发现DriverManager.getConnection(url, user, password);执行到这个语句的时候就走不下去了。 已知: 1,代码正常,不然应该一次都不出结果 2,数据库和网络都正常,没有断过。 请教一下各位高手这是什么缘故。 错误信息如下。报错的行数是执行SQL时因为连接数据库没连接上,所以connect是null造成的。 java.lang.NullPointerException at com.fr.data.BNetDataHandled.init(BNetDataHandled.java:316) at com.fr.data.BNetDataHandled.getRowCount(BNetDataHandled.java:441) at com.fr.data.AbstractTableData$EmbDataModel.getRowCount(Unknown Source) at com.fr.data.index.AbstractWrappedDataModel.getRowCount(Unknown Source) at com.fr.report.core.A.H.A(Unknown Source) at com.fr.report.core.A.H.A(Unknown Source) at com.fr.report.core.A.H.A(Unknown Source) at com.fr.report.core.A.l.cc_ce_array(Unknown Source) at com.fr.report.core.A.H.A(Unknown Source) at com.fr.report.core.A.H.A(Unknown Source) at com.fr.report.core.A.H.B(Unknown Source) at com.fr.report.core.A.H.execute4Expand(Unknown Source) at com.fr.report.core.A.H.C(Unknown Source) at com.fr.report.worksheet.WorkSheet.execute(Unknown Source) at com.fr.page.cal.sheet.PageWorkBookExecuter._execute(Unknown Source) at com.fr.page.cal.sheet.PageWorkBookExecuter.execute(Unknown Source) at com.fr.main.impl.WorkBook.execute(Unknown Source) at com.fr.log.LogUtils.executeAndLogRecord(Unknown Source) at com.fr.web.cache.ReportCache.getResultWorkBook(Unknown Source) at com.fr.stable.PageActor.getResultBookFromCacheIfNeed(Unknown Source) at com.fr.main.impl.WorkBookTemplateDelegate.execute(Unknown Source) at com.fr.web.core.ReportSessionIDInfor.showDirect(Unknown Source) at com.fr.web.core.ReportSessionIDInfor.initBook2Show(Unknown Source) at com.fr.web.core.ReportSessionIDInfor.getWorkBook2Show(Unknown Source) at com.fr.web.core.ReportSessionIDInfor.createPageSetChain(Unknown Source) at com.fr.web.core.ReportSessionIDInfor.getReportPage(Unknown Source) at com.fr.web.core.A.jC.A(Unknown Source) at com.fr.web.core.A.jC.A(Unknown Source) at com.fr.web.core.A.sA.process(Unknown Source) at com.fr.web.core.ReportDispatcher.dealWithOp(Unknown Source) at com.fr.web.core.ReportDispatcher.dealWeblet(Unknown Source) at com.fr.web.core.ReportDispatcher.dealWithRequest(Unknown Source) at com.fr.web.BaseServlet.doGet(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:596) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:473) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568) at org.mortbay.http.HttpContext.handle(HttpContext.java:1530) at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633) at org.mortbay.http.HttpContext.handle(HttpContext.java:1482) at org.mortbay.http.HttpServer.service(HttpServer.java:909) at org.mortbay.http.HttpConnection.service(HttpConnection.java:820) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:837) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:245) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534) |
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|