[JPivot-devel] Customizing JPivot
Brought to you by:
avix
From: C. C. <aem...@sn...> - 2004-11-19 11:46:01
|
Hello, I'm new to JPivot and although I found the sample thrilling, I'm having a lot of problems customizing JPivot to my projet; First Doubt: Do I need ANT? From what I can see, I should be able to work with JPivot by just copying the WAR file and extracting it, and then customizing the files jpivot/WEB-INF/queries/* Second Doubt: If I change mondrian.jsp to include my OLAP sever, do I also need to change web.xml? I believe this is the DEFAULT config file, Third Doubt: Does JPivot work with BEA WebLogic? I could not run your samples there! Now for some real work: I'll describe the whole scenario. My OLAP DB is NOT Foodmart and it is on a remote server on machine "MyOlapServer" under SQL Server and the catalogue, instead of Foodmart 2000, let's call it "MyOlapDB". I saw a previous issue on this forum, and I followed it: - I started TomCat - I copied JPivot.war to the TomCat webapps folder. It created a fresh "jpivot" folder with the default sample. - I copied mssqlserver.jar, msutil.jar and msbase.jar to jpivot/WEB-INF/lib (from MS SQL Server drivers for JDBC) - I added a file jpivot/WEB-INF/queries/MyStarSchema.xml to describe the data on the OLAP server (I based it on Foodmart.xml) - I changed jpivot/WEB-INF/queries/mondrian.jsp to have the following: MONDRIAN.JSP: <%@ page session="true" contentType="text/html; charset=ISO-8859-1" %> <%@ taglib uri="http://www.tonbeller.com/jpivot"; prefix="jp" %> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %> <jp:mondrianQuery id="query01" jdbcDriver="com.microsoft.jdbc.sqlserver.SQLServerDriver" jdbcUrl="jdbc:microsoft:sqlserver://MyOlapServer:1433;DatabaseName=MyOlapDB"; jdbcUser="MyUser" jdbcPassword="MyPassword" catalogUri="/WEB-INF/queries/MyStarSchema.xml"> select {[Measures].[Incoming], [Measures].[Outgoing]} on columns, {[Workflow].[Isolated Region]} ON rows from WorkLoad </jp:mondrianQuery> - Now I started http://localhost:8080/jpivot and selected the "Testpage using mondrian" link, and the result was: Mondrian: Warning: file 'C:\Program Files\Apache Group\Tomcat 4.1\mondrian.properties' not found Mondrian: loaded 0 system properties Mondrian: JDBC driver sun.jdbc.odbc.JdbcOdbcDriver loaded successfully Mondrian: Warning: JDBC driver org.hsqldb.jdbcDriver not found Mondrian: Warning: JDBC driver oracle.jdbc.OracleDriver not found Mondrian: Warning: JDBC driver com.mysql.jdbc.Driver not found [JPivot] 15 Nov 2004 17:52:21,727 ERROR [Session C4210FF146FA1165757491A5B912FFDD] com.tonbeller.jpi vot.tags.OlapModelTag#doAfterBody: exception caught java.lang.NullPointerException at mondrian.olap.Util.replace(Util.java:91) at mondrian.olap.Util.quoteMdxIdentifier(Util.java:61) at mondrian.olap.Util.makeFqName(Util.java:171) at mondrian.rolap.RolapLevel.<init>(RolapLevel.java:73) at mondrian.rolap.RolapLevel.<init>(RolapLevel.java:163) at mondrian.rolap.RolapHierarchy.<init>(RolapHierarchy.java:106) at mondrian.rolap.RolapDimension.<init>(RolapDimension.java:88) at mondrian.rolap.RolapCube.<init>(RolapCube.java:67) at mondrian.rolap.RolapSchema.load(RolapSchema.java:130) at mondrian.rolap.RolapSchema.<init>(RolapSchema.java:99) at mondrian.rolap.RolapSchema.<init>(RolapSchema.java:40) at mondrian.rolap.RolapSchema$Pool.get(RolapSchema.java:264) at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:90) at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:61) at mondrian.olap.DriverManager.getConnection(DriverManager.java:133) at com.tonbeller.jpivot.mondrian.MondrianModel.initialize(MondrianModel.java:354) at com.tonbeller.jpivot.olap.model.OlapModelDecorator.initialize(OlapModelDecorator.java:155 ) at com.tonbeller.jpivot.tags.OlapModelProxy.setDelegate(OlapModelProxy.java:87) at com.tonbeller.jpivot.tags.OlapModelProxy.setOlapModel(OlapModelProxy.java:76) at com.tonbeller.jpivot.tags.OlapModelTag.doAfterBody(OlapModelTag.java:73) at org.apache.jsp.mondrian_jsp._jspx_meth_jp_mondrianQuery_0(mondrian_jsp.java:91) at org.apache.jsp.mondrian_jsp._jspService(mondrian_jsp.java:54) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:575) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:498) at com.tonbeller.wcf.utils.IncludeTag.doStartTag(IncludeTag.java:87) at org.apache.jsp.testpage_jsp._jspx_meth_wcf_include_0(testpage_jsp.java:223) at org.apache.jsp.testpage_jsp._jspService(testpage_jsp.java:112) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.tonbeller.wcf.controller.RequestFilter$MyHandler.normalRequest(RequestFilter.java:173) at com.tonbeller.wcf.controller.RequestSynchronizer.handleRequest(RequestSynchronizer.java:140) at com.tonbeller.wcf.controller.RequestFilter.doFilter(RequestFilter.java:257) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530) at java.lang.Thread.run(Thread.java:534) [JPivot] 15 Nov 2004 17:52:21,821 ERROR [Session C4210FF146FA1165757491A5B912FFDD] com.tonbeller.wcf.utils.IncludeTag#doStartTag: exception caught org.apache.jasper.JasperException at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:575) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:498) at com.tonbeller.wcf.utils.IncludeTag.doStartTag(IncludeTag.java:87) at org.apache.jsp.testpage_jsp._jspx_meth_wcf_include_0(testpage_jsp.java:223) at org.apache.jsp.testpage_jsp._jspService(testpage_jsp.java:112) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.tonbeller.wcf.controller.RequestFilter$MyHandler.normalRequest(RequestFilter.java:173) at com.tonbeller.wcf.controller.RequestSynchronizer.handleRequest(RequestSynchronizer.java:140) at com.tonbeller.wcf.controller.RequestFilter.doFilter(RequestFilter.java:257) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530) at java.lang.Thread.run(Thread.java:534) [JPivot] 15 Nov 2004 17:52:21,883 ERROR [Session C4210FF146FA1165757491A5B912FFDD] com.tonbeller.wcf.controller.RequestFilter$MyHandler#normalRequest: org.apache.jasper.JasperException at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.tonbeller.wcf.controller.RequestFilter$MyHandler.normalRequest(RequestFilter.java:173) at com.tonbeller.wcf.controller.RequestSynchronizer.handleRequest(RequestSynchronizer.java:140) at com.tonbeller.wcf.controller.RequestFilter.doFilter(RequestFilter.java:257) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530) at java.lang.Thread.run(Thread.java:534) [JPivot] 15 Nov 2004 17:52:21,930 ERROR [Session C4210FF146FA1165757491A5B912FFDD] com.tonbeller.wcf.controller.RequestFilter$MyHandler#normalRequest: redirecting to error page /error.jsp org.apache.jasper.JasperException at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.tonbeller.wcf.controller.RequestFilter$MyHandler.normalRequest(RequestFilter.java:173) at com.tonbeller.wcf.controller.RequestSynchronizer.handleRequest(RequestSynchronizer.java:140) at com.tonbeller.wcf.controller.RequestFilter.doFilter(RequestFilter.java:257) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530) at java.lang.Thread.run(Thread.java:534) Now what am I doing wrong?!? Please help, I need this done real quickly!!! Regards, Carlos |