Развертывание отчета Birt возвращает «Невозможно создать драйвер JDBC класса» для URL-адреса подключения «ноль» » - PullRequest
1 голос
/ 06 июня 2011

Я создаю отчет, используя Birt и Eclipse.При развертывании внутри Tomcat возникает эта проблема.

 Jun 6, 2011 10:42:39 AM org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager
                loadDriverExtensions
                INFO: Found JDBC driverinfo extension: driverClass=org.apache.derby.jdbc.Embedde
                dDriver, connectionFactory=null
                Jun 6, 2011 10:43:04 AM org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager
                loadDriverExtensions
                INFO: Found JDBC driverinfo extension: driverClass=org.eclipse.birt.report.data.
                oda.sampledb.Driver, connectionFactory=org.eclipse.birt.report.data.oda.sampledb
                .SampleDBJDBCConnectionFactory
                Jun 6, 2011 10:43:04 AM org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager$
                DriverClassLoader addNewURL
                INFO: JDBCDriverManager: found JAR file drivers/ojdbc14.jar. URL=bundleentry://4
                1.fwk12171472/drivers/ojdbc14.jar
                Cannot create JDBC driver of class '' for connect URL 'null'
                java.lang.NullPointerException
                        at sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(JdbcOdbcDriver.java:507)
                        at sun.jdbc.odbc.JdbcOdbcDriver.knownURL(JdbcOdbcDriver.java:476)
                        at sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(JdbcOdbcDriver.java:307)
                        at java.sql.DriverManager.getDriver(DriverManager.java:253)
                        at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(B
                asicDataSource.java:1437)
                        at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDat
                aSource.java:1371)
                        at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSo
                urce.java:1044)
                        at org.eclipse.birt.report.data.oda.jdbc.JndiDataSource.getDataSourceCon
                nection(JndiDataSource.java:178)
                        at org.eclipse.birt.report.data.oda.jdbc.JndiDataSource.getConnection(Jn
                diDataSource.java:133)
                        at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.getJndiDSConn
                ection(JDBCDriverManager.java:325)
                        at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.doConnect(JDB
                CDriverManager.java:225)
                        at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.getConnection
                (JDBCDriverManager.java:212)
                        at org.eclipse.birt.report.data.oda.jdbc.Connection.connectByUrl(Connect
                ion.java:237)
                        at org.eclipse.birt.report.data.oda.jdbc.Connection.open(Connection.java
                :162)
                        at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaConnection.
                open(OdaConnection.java:250)
                        at org.eclipse.birt.data.engine.odaconsumer.ConnectionManager.openConnec
                tion(ConnectionManager.java:165)
                        at org.eclipse.birt.data.engine.executor.DataSource.newConnection(DataSo
                urce.java:224)
                        at org.eclipse.birt.data.engine.executor.DataSource.open(DataSource.java
                :212)
                        at org.eclipse.birt.data.engine.impl.DataSourceRuntime.openOdiDataSource
                (DataSourceRuntime.java:208)
                        at org.eclipse.birt.data.engine.impl.QueryExecutor.openDataSource(QueryE
                xecutor.java:406)
                        at org.eclipse.birt.data.engine.impl.QueryExecutor.prepareExecution(Quer
                yExecutor.java:316)
                        at org.eclipse.birt.data.engine.impl.PreparedQuery.doPrepare(PreparedQue
                ry.java:455)
                        at org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.produceQuer
                yResults(PreparedDataSourceQuery.java:190)
                        at org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.execute(Pre
                paredDataSourceQuery.java:178)
                        at org.eclipse.birt.data.engine.impl.PreparedOdaDSQuery.execute(Prepared
                OdaDSQuery.java:145)
                        at org.eclipse.birt.report.data.adapter.impl.DataRequestSessionImpl.exec
                ute(DataRequestSessionImpl.java:616)
                        at org.eclipse.birt.report.engine.api.impl.GetParameterDefinitionTask.ex
                ecuteQuery(GetParameterDefinitionTask.java:640)
                        at org.eclipse.birt.report.engine.api.impl.GetParameterDefinitionTask.ge
                tResultSetForParameter(GetParameterDefinitionTask.java:1369)
                        at org.eclipse.birt.report.engine.api.impl.GetParameterDefinitionTask.ge
                tChoicesFromParameterQuery(GetParameterDefinitionTask.java:1341)
                        at org.eclipse.birt.report.engine.api.impl.GetParameterDefinitionTask.do
                GetSelectionList(GetParameterDefinitionTask.java:515)
                        at org.eclipse.birt.report.engine.api.impl.GetParameterDefinitionTask.ge
                tSelectionList(GetParameterDefinitionTask.java:445)
                        at org.eclipse.birt.report.service.BirtViewerReportService.getParameterS
                electionList(BirtViewerReportService.java:821)
                        at org.eclipse.birt.report.presentation.aggregation.parameter.ComboBoxPa
               ............................
    org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:16
                65)
                        at java.lang.Thread.run(Thread.java:619)
                Cannot create JDBC driver of class '' for connect URL 'null'
                java.lang.NullPointerException
                        at sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(JdbcOdbcDriver.java:507)
                        at sun.jdbc.odbc.JdbcOdbcDriver.knownURL(JdbcOdbcDriver.java:476)
                        at sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(JdbcOdbcDriver.java:307)
                        at java.sql.DriverManager.getDriver(DriverManager.java:253)
                        at .................
                        at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationD
                ispatcher.java:551)
                        at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDis
                patcher.java:488)
                        at org.eclipse.birt.report.presentation.aggregation.AbstractBaseFragment
                .service(AbstractBaseFragment.java:82)
                        at org.eclipse.birt.report.presentation.aggregation.AbstractBaseFragment
                .callBack(AbstractBaseFragment.java:106)
                        at org.apache.jsp.webcontent.birt.pages.layout.SidebarFragment_jsp._jspS
                ervice(SidebarFragment_jsp.java:72)
                        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
                        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
                .java:386)
                        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
                13)
                        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
                        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
                icationFilterChain.java:290)
                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
                ilterChain.java:206)
                        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
                atcher.java:646)
                        at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationD
                ispatcher.java:551)
                        at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDis
                patcher.java:488)
                        at org.eclipse.birt.report.presentation.aggregation.AbstractBaseFragment
                .service(AbstractBaseFragment.java:82)
                        at org.eclipse.birt.report.presentation.aggregation.AbstractBaseFragment
                .callBack(AbstractBaseFragment.java:106)
                        at org.apache.jsp.webcontent.birt.pages.layout.ReportFragment_jsp._jspSe
                rvice(ReportFragment_jsp.java:72)
                        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
                        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
                .java:386)
                        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
                13)
                        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
                        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
                icationFilterChain.java:290)
                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
                ilterChain.java:206)
                        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
                atcher.java:646)
                        at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationD
                ispatcher.java:551)
                        at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDis
                patcher.java:488)
                        at org.eclipse.birt.report.presentation.aggregation.AbstractBaseFragment
                .service(AbstractBaseFragment.java:82)
                        at org.eclipse.birt.report.presentation.aggregation.AbstractBaseFragment
                .callBack(AbstractBaseFragment.java:106)
                        at org.apache.jsp.webcontent.birt.pages.layout.FramesetFragment_jsp._jsp
                Service(FramesetFragment_jsp.java:265)
                        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
                        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
                .java:386)
                        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
                13)
                        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
                        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                        at ...................
                        at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:16
                65)
                        at java.lang.Thread.run(Thread.java:619)
                Cannot create JDBC driver of class '' for connect URL 'null'
                java.lang.NullPointerException
                        at sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(JdbcOdbcDriver.java:507)
                        at sun.jdbc.odbc.JdbcOdbcDriver.knownURL(JdbcOdbcDriver.java:476)
                        at sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(JdbcOdbcDriver.java:307)
                        at java.sql.DriverManager.getDriver(DriverManager.java:253)
                        at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(B
                asicDataSource.java:1437)
                        at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDat
                aSource.java:1371)
                        at .............. org.eclipse.birt.report.engine.api.impl.GetParameterDefinitionTask.do
                GetSelectionList(GetParameterDefinitionTask.java:515)
                        at org.eclipse.birt.report.engine.api.impl.GetParameterDefinitionTask.ge
                tSelectionList(GetParameterDefinitionTask.java:445)
                        at org.eclipse.birt.report.service.BirtViewerReportService.getParameterS
                electionList(BirtViewerReportService.java:821)
                        at org.eclipse.birt.report.presentation.aggregation.parameter.ComboBoxPa
                rameterFragment.prepareParameterBean(ComboBoxParameterFragment.java:91)
                        at org.eclipse.birt.report.presentation.aggregation.parameter.ScalarPara
                meterFragment.doService(ScalarParameterFragment.java:91)
                        at org.eclipse.birt.report.presentation.aggregation.AbstractBaseFragment
                .service(AbstractBaseFragment.java:76)
                        at org.apache.jsp.webcontent.birt.pages.dialog.ParameterDialogFragment_j
                sp._jspService(ParameterDialogFragment_jsp.java:109)
                        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
                        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
                .java:386)
                        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
                13)
                        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
                        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
                icationFilterChain.java:290)
                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
                ilterChain.java:206)
                        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
                atcher.java:646)
                        at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationD
                ispatcher.java:551)
                        at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDis
                patcher.java:488)
                        at org.eclipse.birt.report.presentation.aggregation.AbstractBaseFragment
                .service(AbstractBaseFragment.java:82)
                        at org.eclipse.birt.report.presentation.aggregation.AbstractBaseFragment
                .callBack(AbstractBaseFragment.java:106)
                        at org.apache.jsp.webcontent.birt.pages.dialog.DialogContainerFragment_j
                sp._jspService(DialogContainerFragment_jsp.java:135)
                        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
                        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
                .java:386)
                        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
                13)
                        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
                        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
                icationFilterChain.java:290)
                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
                ilterChain.java:206)
                        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
                atcher.java:646)
                        at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationD
                ispatcher.java:551)
                        at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDis
                patcher.java:488)
                        at org.eclipse.birt.report.presentation.aggregation.AbstractBaseFragment
                .service(AbstractBaseFragment.java:82)
                        at org.eclipse.birt.report.presentation.aggregation.AbstractBaseFragment
                .callBack(AbstractBaseFragment.java:106)
                        at org.apache.jsp.webcontent.birt.pages.layout.SidebarFragment_jsp._jspS
                ervice(SidebarFragment_jsp.java:72)
                        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
                        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
                .java:386)
                        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
                13)
                        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
                        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
                icationFilterChain.java:290)
        ...........................
                        at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:16
                65)
                        at java.lang.Thread.run(Thread.java:619)
                Cannot create JDBC driver of class '' for connect URL 'null'
                java.lang.NullPointerException
                        at sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(JdbcOdbcDriver.java:507)
                        at sun.jdbc.odbc.JdbcOdbcDriver.knownURL(JdbcOdbcDriver.java:476)
                        at sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(JdbcOdbcDriver.java:307)
                        at java.sql.DriverManager.getDriver(DriverManager.java:253)
                        at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(B
                asicDataSource.java:1437)
                        at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDat
                aSource.java:1371)
                        at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSo
                urce.java:1044)
                        at org.eclipse.birt.report.data.oda.jdbc.JndiDataSource.getDataSourceCon
                nection(JndiDataSource.java:178)
                        at org.eclipse.birt.report.data.oda.jdbc.JndiDataSource.getConnection(Jn
                diDataSource.java:133)
                        at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.getJndiDSConn
                ection(JDBCDriverManager.java:325)
                        at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.doConnect(JDB
                CDriverManager.java:225)
                        at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.getConnection
                (JDBCDriverManager.java:212)
                        at org.eclipse.birt.report.data.oda.jdbc.Connection.connectByUrl(Connect
                ion.java:237)
                        at org.eclipse.birt.report.data.oda.jdbc.Connection.open(Connection.java
                :162)
                        at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaConnection.
                open(OdaConnection.java:250)
                        at org.eclipse.birt.data.engine.odaconsumer.ConnectionManager.openConnec
                tion(ConnectionManager.java:165)
                        at org.eclipse.birt.data.engine.executor.DataSource.newConnection(DataSo
                urce.java:224)
                        at org.eclipse.birt.data.engine.executor.DataSource.open(DataSource.java
                :212)
                        ..........Some text
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationD
                ispatcher.java:551)
                        at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDis
                patcher.java:488)
                        at org.eclipse.birt.report.presentation.aggregation.AbstractBaseFragment
                .service(AbstractBaseFragment.java:82)
                        at org.eclipse.birt.report.presentation.aggregation.AbstractBaseFragment
                .callBack(AbstractBaseFragment.java:106)
                        at org.apache.jsp.webcontent.birt.pages.dialog.DialogContainerFragment_j
                sp._jspService(DialogContainerFragment_jsp.java:135)
                        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
                        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
                .java:386)
                        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
                13)
                        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
                        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
                icationFilterChain.java:290)
                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
                ilterChain.java:206)
                        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
                atcher.java:646)
                        at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationD
                ispatcher.j

Я настроил файлы web.xml и context.xml и скопировал файл ojdbc14.jar в папку webapps\birt\WEB-INF\platform\plugins\org.eclipse.birt.report.data.oda.jdbc_2.6.2.r262_v20110127\drivers.

После запуска отчета через браузер я получаю эту проблему.Первоначально это показывает индикатор выполнения.Но через некоторое время (30 минут) он показывает пустой отчет.

Мой запрос может занять один час.Но отчет показывает пустой с 30 минут.В чем проблема?

1 Ответ

1 голос
/ 14 июня 2011

Похоже, это может быть связано с каким-то тайм-аутом сеанса. Я считаю, что для Tomcat по умолчанию установлено время ожидания сеанса 30 минут. Я считаю, что этот параметр находится в файле web.xml.

...