PDA

View Full Version : mondrian war jdbc NullPointerException



cilquirm
10-23-2003, 05:43 AM
( i posted to the list, but read that it was also good to post to the forum )
Hi,
after downloading the mondrian.war file and dropping it into the webapps directory of a newly installed jakarta-tomcat-4.1.27 installation, I noticed that there's a heavy dependence on a preconfigured setup using the jdbc:odbc link to the foodmart access db.
I downloaded the data and created a postgresql ( pgsql ) db and populated the tables. I dropped the pgsql driver jar into the WEB-INF/lib directory and started to reconfigure.
I managed to get the jpivot example working (testpage.jsp?query=mondrian off the index page ) but I am having a lot of trouble getting the taglib.jsp page to work ..
I am encountering a NullPointerException as listed at the bottom.
I have changed the connectString for the MDXQueryServlet to the following :
Provider=mondrian;Jdbc=jdbc:postgresql://localhost/mondrian;Catalog=/WEB-INF/queries/FoodMart.xml;JdbcDrivers=org.postgresql.Driver;JdbcUser=mondrian;
Can anyone help me figure out why would still be getting an error? Am I looking in the wrong area?
Thanks in advance for any insight.
-a
java.lang.NullPointerException
at mondrian.olap.Util$ConnectStringParser.parse(Util.java:668)
at mondrian.olap.Util.parseConnectString(Util.java:656)
at
mondrian.olap.DriverManager.getConnection(DriverManager.java:48)
at
mondrian.web.taglib.ResultCache.valueBound(ResultCache.java:115)
at
org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1277)
at
org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:191)
at
mondrian.web.taglib.ResultCache.getInstance(ResultCache.java:53)
at mondrian.web.taglib.QueryTag.doAfterBody(QueryTag.java:50)
at
org.apache.jsp.taglib_jsp._jspx_meth_mdx_query_0(taglib_jsp.java:168)
at org.apache.jsp.taglib_jsp._jspService(taglib_jsp.java:63)
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:210)
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:108)
at
com.tonbeller.wcf.controller.RequestSynchronizer.handleRequest(RequestSynchronizer.java:99)
at
com.tonbeller.wcf.controller.RequestFilter.doFilter(RequestFilter.java:134)
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:256)
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:2416)
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:171)
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:601)

patsu68
10-23-2003, 07:26 AM
Just curious, did you try out adhoc.jsp ? If so, did you get every query working ?

cilquirm
10-23-2003, 08:33 AM
once i added a mondrian.properties file to the root of the tomcat installation directory ( or any place that i started the instance from ), with the proper information ( i.e. mondrian.JdbcDrivers=org.postgresql.Driver ) , then i was able to execute some of the adhoc queries in adhoc.jsp.
i still cannot do anything with taglibs.jsp
here are the results of my test run:
Query #4 and #5 - ArrayIndexOutOfBoundsException at MDXQueryServlet.java:100
Query #6 = MDX object '[Product].[All Products].[Drink].[Alcoholic Beverages]' not found in cube 'Sales'
Query #8 - Internal error: Illegal access to members of hierarchy [Gender]
Query #9 - MDX object '[Product].[Food].[Dairy]' not found in cube 'Sales'
Query #10 - MDX object '[Customers].[USA]' not found in cube 'Sales'
Query #11 and #14 - Internal error: no function matches signature 'Val(<Numeric Expression>)'
Query #12 = MDX object '[Product].[All Products].[Drink].[Alcoholic Beverages].[Beer and Wine]' not found in cube 'Sales'
Query #16 - Internal error: Illegal access to members of hierarchy [Measures]
Query #17 - MDX object '[Warehouse]' not found in cube 'Warehouse and Sales'
Query #20 - MDX object '[Product].[Food]' not found in cube 'Sales'

jhyde
10-23-2003, 08:41 AM
Those symptoms make me think that your schema doesn't contain any data.

cilquirm
10-23-2003, 10:07 AM
Actually, i did what patsu68 did another thread and gave all rights to the california manager role ( from top to bottom )
and pretty much everything managed to run except #9 and #13 ( as reported in that other thread )
I checked my data in the postgresql db ( via pgadmin3 ) and it looks correct enough.
I also managed to make some headway into using the taglib, by adding a <context-param> tag to the web.xml ( and taking it directly from the MDXServlet init-param )
however the queries still aren't running ( but at least i've gotten past the null pointer exception ).

patsu68
10-23-2003, 10:07 AM
Hi guys,
Actually, even though I have jpivot working and adhoc.jsp almost running (except query 9 and 13), I have problems loading taglib.jsp too.
The errors is:
java.lang.NullPointerException
at mondrian.web.taglib.ResultCache.parse(ResultCache.java:59)
at mondrian.web.taglib.QueryTag.doAfterBody(QueryTag.java:54)
at org.apache.jsp.taglib_jsp._jspx_meth_mdx_query_0(taglib_jsp.java:169)
at org.apache.jsp.taglib_jsp._jspService(taglib_jsp.java:63)
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:2
95)
[... etc ...]
[JPivot] 23 Oct 2003 13:50:45,067 ERROR [Session A1EA15F7ADCFF0E2A8F0901ED4E0955
2] com.tonbeller.wcf.controller.RequestFilter#doFilter: handleRequest failed
org.apache.jasper.JasperException
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
.java:248)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
95)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
[...]
Thinking that tablib.jsp may have outdated queries, I copied every query from taglib.jsp into adhoc.jsp and execute them. All of them came back with some result except for query 6:
select from Sales
where ([Measures].[Store Sales], [Time].[1997], [Promotion Media].[All Media].[TV])
The error for query 6 in adhoc.jsp is:
java.lang.ArrayIndexOutOfBoundsException
at mondrian.web.servlet.MDXQueryServlet.processRequest(MDXQueryServlet.java:92)
[...]
Does anyone have some answers ?

patsu68
10-23-2003, 10:30 AM
Hi Aadi,
For oracle installation, I followed your instructions by adding the following to my /webapps/mondrian/WEB-INF/web.xml (replace <sid> with a Oracle SID):
<context-param>
<param-name>connectString</param-name>
<param-value>Provider=mondrian;Jdbc=jdbc:oracle:thin:foodmart/
foodmart@localhost:1521:<sid>;Catalog=/WEB-INF/queries/FoodMart.xml;JdbcDrivers=oracle.jdbc.OracleDriver
;Role='California manager';</param-value>
</context-param>
taglib.jsp now returns fine. I counted only 5 examples. The 6th example (query) only returns the MDX select statement, and like I mentioned above, could not run in adhoc.jsp too.
Julian, if you're reading this, are you able to discern what's happening based on the error message above (for query 6) ?