安装并配置Pentaho Mondrian后,抛出以下异常(完整的堆栈跟踪)
我正在使用SQL Server Driver 4.0
com.tonbeller.jpivot.olap.model.OlapException:无法加载Jdbc驱动程序com.sqlserver.jdbc.Driver
com.tonbeller.jpivot.olap.model.OlapException: Could not load Jdbc Driver com.sqlserver.jdbc.Driver
at com.tonbeller.jpivot.mondrian.MondrianModel.initialize(MondrianModel.java:455)
at com.tonbeller.jpivot.olap.model.OlapModelDecorator.initialize(OlapModelDecorator.java:132)
at com.tonbeller.jpivot.tags.OlapModelProxy$MyState.initialize(OlapModelProxy.java:77)
at com.tonbeller.jpivot.tags.StackStateManager.initializeAndShow(StackStateManager.java:76)
at com.tonbeller.jpivot.tags.OlapModelProxy.initializeAndShow(OlapModelProxy.java:160)
at com.tonbeller.jpivot.tags.OlapModelTag.doEndTag(OlapModelTag.java:81)
at org.apache.jsp.WEB_002dINF.queries.colors_jsp._jspx_meth_jp_005fmondrianQuery_005f0(colors_jsp.java:127)
at org.apache.jsp.WEB_002dINF.queries.colors_jsp._jspService(colors_jsp.java:69)
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:388)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
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(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
at com.tonbeller.wcf.utils.IncludeTag.doStartTag(IncludeTag.java:59)
at org.apache.jsp.testpage_jsp._jspx_meth_wcf_005finclude_005f0(testpage_jsp.java:287)
at org.apache.jsp.testpage_jsp._jspService(testpage_jsp.java:127)
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:388)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
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(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.tonbeller.wcf.controller.RequestFilter$MyHandler.normalRequest(RequestFilter.java:139)
at com.tonbeller.wcf.controller.RequestSynchronizer.handleRequest(RequestSynchronizer.java:127)
at com.tonbeller.wcf.controller.RequestFilter.doFilter(RequestFilter.java:263)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:744)
以下是我的mondrian.properties
mondrian.rolap.aggregates.Use=true
mondrian.rolap.aggregates.Read=true
mondrian.native.topcount.enable=true
mondrian.native.filter.enable=true
mondrian.result.limit=50000
Provider=Mondrian:Jdbc=jdbc:sqlserver://localhost:1433;databaseName=foodmart;Catalog=/WEB-INF/queries/FoodMart.xml;JdbcDrivers=com.microsoft.sqlserver.jdbc.SQLServerDriver;
以下是我的web.xml
<context-param>
<param-name>connectString</param-name>
<param-value>Provider=Mondrian;Jdbc=jdbc:sqlserver://localhost/foodmart;JdbcUser=sa;JdbcPassword=adminpassword; Catalog=/WEB-INF/queries/FoodMart.xml;JdbcDrivers=com.microsoft.sqlserver.jdbc.SQLServerDriver;</param-value>
</context-param>
以下是我的datasources.xml
<DataSourceInfo>Provider=Mondrian:Jdbc=jdbc:sqlserver://localhost:1433;JdbcUser=sa;JdbcPassword=adminpassword;Catalog=/WEB-INF/queries/FoodMart.xml;JdbcDrivers=com.microsoft.sqlserver.jdbc.SQLServerDriver; </DataSourceInfo>
<ProviderName>Mondrian</ProviderName>
<ProviderType>MDP</ProviderType>
我已经在\webapps\mondrian\WEB-INF\lib
文件夹
答案 0 :(得分:0)
MSSQL驱动程序的正确类名是com.microsoft.sqlserver.jdbc.SQLServerDriver
。我建议你在项目中搜索文本com.sqlserver.jdbc.Driver
,并用适当的类名替换它。
另外,至于我jTDS
驱动程序证明比MS自己的驱动程序工作得更好。