PDA

View Full Version : Writing Schema file



smylavarapu
09-23-2003, 07:16 PM
First of all...this is an awesome tool.
I'm able to deploy the app without any issues. Then i started writing a new xml file using existing oracle database (not the demo database). Here are the db objects used in the xml file.
- BrandTraction_E (View)
- Accounts (Table)
Here's the schema:
<?xml version="1.0"?>
<Schema name="FoodMart">
<Dimension name="Account">
<Hierarchy hasAll="true" allMemberName="All Accounts" primaryKey="accountid">
<Table name="accounts"/>
<Level name="Account" column="accountname" uniqueMembers="true"/>
</Hierarchy>
</Dimension>

<Cube name="BrandTraction">
<Table name="brandtraction_e"/>
<DimensionUsage name="Account" source="Account" foreignKey="accountid"/>
<Dimension name="Brand Name">
<Hierarchy hasAll="true">
<Level name="Brand Name" column="brandname" uniqueMembers="true"/>
</Hierarchy>
</Dimension>
<Measure name="Total Stories" column="brandstories" aggregator="sum" formatString="#,###"/>
<Measure name="Traction" column="traction" aggregator="sum" formatString="#,###.00"/>
</Cube>
</Schema>
Here's the MDX Query:
select
{[Measures].[Total Stories], [Measures].[Traction]} on columns,
{[Account].[All Accounts],[All Brands]} ON rows
from [BrandTraction]
Here's the error:
org.apache.jasper.JasperException: Internal error: while counting members of level '[Account].[Account]'; sql=[select count(*) as "c0" from (select distinct "accounts"."accountname" as "c0" from "accounts" "accounts") "init"] at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254) 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: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: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:594) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619) at java.lang.Thread.run(Thread.java:536)
Thanks for the help in advance.
Sai

jhyde
09-23-2003, 08:14 PM
Are your table and column names really in lower-case? (Do 'select * from cat' to find out.)
A common mistake is to create tables without quotation marks (for example 'create table foo (x int)') which Oracle then converts to upper case (table name 'FOO' column 'X'). In this case, you will need to use the upper-case table and column names in your schema.xml file.

shaunstoltz
09-24-2003, 04:31 AM
Hmm, I have the same issue on an access DB. All Table/Column names are correct.
I have run the query in access and get a value for "c0"? so am not sure why the error occurs.
Have you tried running the query in oracle to see if you can get a value for "c0"?
Regards,
Shaun

smylavarapu
09-24-2003, 06:19 AM
I've modified my XML file as per julian's suggestion. It's working like charm. I'm very impressed with the tool.
Thanks a bunch
Sai

jhyde
09-24-2003, 06:26 AM
Good to hear that. And thanks for the positive feedback, too!