Giter Club home page Giter Club logo

mondrian's People

Contributors

afrjorge avatar andreramos89 avatar bcostahitachivantara avatar bennychow avatar dfieldfl avatar e-cuellar avatar ivanpogodin avatar jsichi avatar julianhyde avatar lcheng-pentaho avatar lgrill-pentaho avatar lucboudreau avatar mbrasil avatar mchen-len-son avatar mkambol avatar pedrofvteixeira avatar pentaho-nbaker avatar peterrinehart avatar pstoellberger avatar ricksjames avatar sailingscally avatar smmribeiro avatar stanislau-strelchanka avatar tatsianakasiankova avatar tgf avatar tmcsantos avatar urena-kenny avatar webdetails-build-bot avatar wgorman avatar yuryby avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mondrian's Issues

AggTable matcher can't find fact count column named fact_count

I get the error message

2015-12-10 15:32:37,087 ERROR [mondrian.rolap.aggmatcher.AggTableManager] Recognizer.checkFactCount: Candidate aggregate table 'sales_agg_year' for fact table 'sales' has no fact count columns.
2015-12-10 15:32:37,087 ERROR [mondrian.rolap.aggmatcher.AggTableManager] Recognizer.checkNosMeasures: Candidate aggregate table 'sales_agg_year' for fact table 'sales' has no measure columns.

where sales is the fact table and sales_agg_year is the aggregated table, and sales_agg_year contains a column named fact_count of type int.
I am using the default rules.
I am using MySQL.

the cube definition:

<Schema name="sales agg test"> <Cube name="Agged Cube" visible="true" cache="true" enabled="true"> <Table name="sales"> <AggPattern pattern="sales_agg_.*"/> </Table> ... rest of cube definition .... </Schema>

Null pointer exception while executing query on VirtualCube

I have a virtual cube (9119) defined on 2 cube and when i try to use one Measure ([Measures].[mssb_entitled_users])

I can also provide the Cubes schema if that can help!

The stack-trace is below:

org.apache.cxf.interceptor.Fault: Mondrian Error:java.util.concurrent.ExecutionException: mondrian.olap.MondrianException: Mondrian Error:Internal error: Error while executing query [with set [dateRange] as '{([Time].[Date].[2012].[August].[2012-08-29] : [Time].[Date].[2012].[September].[2012-09-05])}'
set [Time-Date] as '[dateRange]'
member [Time].[Date].[Time-Date] as 'Aggregate([Time-Date])'
set [measures] as '{[Measures].[page_hits], [Measures].[mssb_report_downloads], [Measures].[mssb_report_hovers], [Measures].[mssb_report_previews], [Measures].[mssb_entitled_users], [Measures].[visitors]}'
select [measures] ON COLUMNS,
NON EMPTY TopCount([mssb_cie_page].[Value].Members, 1000, Sum([measures])) ON ROWS
from [9119]
where [Time].[Date].[Time-Date]
]
at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:155) ~[cxf-bundle-2.2.6.jar:2.2.6]
at org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.createFault(AbstractJAXWSMethodInvoker.java:85) ~[cxf-bundle-2.2.6.jar:2.2.6]
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:121) ~[cxf-bundle-2.2.6.jar:2.2.6]
at org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:60) ~[cxf-bundle-2.2.6.jar:2.2.6]
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:75) ~[cxf-bundle-2.2.6.jar:2.2.6]
at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58) ~[cxf-bundle-2.2.6.jar:2.2.6]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) ~[na:1.6.0_25]
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) ~[na:1.6.0_25]
at java.util.concurrent.FutureTask.run(FutureTask.java:138) ~[na:1.6.0_25]
at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37) ~[cxf-bundle-2.2.6.jar:2.2.6]
at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106) ~[cxf-bundle-2.2.6.jar:2.2.6]
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243) ~[cxf-bundle-2.2.6.jar:2.2.6]
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:109) [cxf-bundle-2.2.6.jar:2.2.6]
at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:312) [cxf-bundle-2.2.6.jar:2.2.6]
at msjava.cxfutils.transport.jetty.internal.MSJettyHTTPDestination.doService(MSJettyHTTPDestination.java:107) [msjava_cxfutils.jar:2.3]
at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:70) [cxf-bundle-2.2.6.jar:2.2.6]
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) [jetty-6.1.21.jar:6.1.21]
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230) [jetty-6.1.21.jar:6.1.21]
at org.mortbay.jetty.handler.HandlerList.handle(HandlerList.java:49) [jetty-6.1.21.jar:6.1.21]
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) [jetty-6.1.21.jar:6.1.21]
at org.mortbay.jetty.Server.handle(Server.java:326) [jetty-6.1.21.jar:6.1.21]
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:536) [jetty-6.1.21.jar:6.1.21]
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:930) [jetty-6.1.21.jar:6.1.21]
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747) [jetty-6.1.21.jar:6.1.21]
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) [jetty-6.1.21.jar:6.1.21]
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:405) [jetty-6.1.21.jar:6.1.21]
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409) [jetty-6.1.21.jar:6.1.21]
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) [jetty-util-6.1.21.jar:6.1.21]
Caused by: mondrian.olap.MondrianException: Mondrian Error:java.util.concurrent.ExecutionException: mondrian.olap.MondrianException: Mondrian Error:Internal error: Error while executing query [with set [dateRange] as '{([Time].[Date].[2012].[August].[2012-08-29] : [Time].[Date].[2012].[September].[2012-09-05])}'
set [Time-Date] as '[dateRange]'
member [Time].[Date].[Time-Date] as 'Aggregate([Time-Date])'
set [measures] as '{[Measures].[page_hits], [Measures].[mssb_report_downloads], [Measures].[mssb_report_hovers], [Measures].[mssb_report_previews], [Measures].[mssb_entitled_users], [Measures].[visitors]}'
select [measures] ON COLUMNS,
NON EMPTY TopCount([mssb_cie_page].[Value].Members, 1000, Sum([measures])) ON ROWS
from [9119]
where [Time].[Date].[Time-Date]
]
at mondrian.rolap.RolapResultShepherd.shepherdExecution(RolapResultShepherd.java:152) ~[mondrian.jar:na]
at mondrian.rolap.RolapConnection.execute(RolapConnection.java:580) ~[mondrian.jar:na]
at mondrian.olap4j.MondrianOlap4jCellSet.execute(MondrianOlap4jCellSet.java:88) ~[mondrian.jar:na]
at mondrian.olap4j.MondrianOlap4jStatement.executeOlapQueryInternal(MondrianOlap4jStatement.java:408) ~[mondrian.jar:na]
at mondrian.olap4j.MondrianOlap4jStatement.executeOlapQuery(MondrianOlap4jStatement.java:340) ~[mondrian.jar:na]
at mondrian.olap4j.MondrianOlap4jStatement.executeOlapQuery(MondrianOlap4jStatement.java:426) ~[mondrian.jar:na]
at com.ms.bi.seismic.db.MondrianChartDataDAO.getChartData(MondrianChartDataDAO.java:97) ~[ide-bin/:na]
at com.ms.bi.seismic.ChartDataService.getChartData(ChartDataService.java:94) ~[ide-bin/:na]
at com.ms.bi.seismic.ChartDataService.getChartData(ChartDataService.java:56) ~[ide-bin/:na]
at sun.reflect.GeneratedMethodAccessor86.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_25]
at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_25]
at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:173) ~[cxf-bundle-2.2.6.jar:2.2.6]
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:89) ~[cxf-bundle-2.2.6.jar:2.2.6]
... 25 common frames omitted
Caused by: java.util.concurrent.ExecutionException: mondrian.olap.MondrianException: Mondrian Error:Internal error: Error while executing query [with set [dateRange] as '{([Time].[Date].[2012].[August].[2012-08-29] : [Time].[Date].[2012].[September].[2012-09-05])}'
set [Time-Date] as '[dateRange]'
member [Time].[Date].[Time-Date] as 'Aggregate([Time-Date])'
set [measures] as '{[Measures].[page_hits], [Measures].[mssb_report_downloads], [Measures].[mssb_report_hovers], [Measures].[mssb_report_previews], [Measures].[mssb_entitled_users], [Measures].[visitors]}'
select [measures] ON COLUMNS,
NON EMPTY TopCount([mssb_cie_page].[Value].Members, 1000, Sum([measures])) ON ROWS
from [9119]
where [Time].[Date].[Time-Date]
]
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222) ~[na:1.6.0_25]
at java.util.concurrent.FutureTask.get(FutureTask.java:83) ~[na:1.6.0_25]
at mondrian.rolap.RolapResultShepherd.shepherdExecution(RolapResultShepherd.java:126) ~[mondrian.jar:na]
... 38 common frames omitted
mondrian.olap.MondrianException: Mondrian Error:Internal error: Error while executing query [with set [dateRange] as '{([Time].[Date].[2012].[August].[2012-08-29] : [Time].[Date].[2012].[September].[2012-09-05])}'
set [Time-Date] as '[dateRange]'
member [Time].[Date].[Time-Date] as 'Aggregate([Time-Date])'
set [measures] as '{[Measures].[page_hits], [Measures].[mssb_report_downloads], [Measures].[mssb_report_hovers], [Measures].[mssb_report_previews], [Measures].[mssb_entitled_users], [Measures].[visitors]}'
select [measures] ON COLUMNS,
NON EMPTY TopCount([mssb_cie_page].[Value].Members, 1000, Sum([measures])) ON ROWS
from [9119]
where [Time].[Date].[Time-Date]
]
at mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:912) ~[mondrian.jar:na]
at mondrian.olap.Util.newInternal(Util.java:2038) ~[mondrian.jar:na]
at mondrian.olap.Util.newError(Util.java:2054) ~[mondrian.jar:na]
at mondrian.rolap.RolapConnection.executeInternal(RolapConnection.java:667) ~[mondrian.jar:na]
at mondrian.rolap.RolapConnection.access$000(RolapConnection.java:52) ~[mondrian.jar:na]
at mondrian.rolap.RolapConnection$1.call(RolapConnection.java:586) ~[mondrian.jar:na]
at mondrian.rolap.RolapConnection$1.call(RolapConnection.java:585) ~[mondrian.jar:na]
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) ~[na:1.6.0_25]
at java.util.concurrent.FutureTask.run(FutureTask.java:138) ~[na:1.6.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) ~[na:1.6.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) ~[na:1.6.0_25]
at java.lang.Thread.run(Thread.java:662) ~[na:1.6.0_25]
Caused by: java.lang.NullPointerException: null
at mondrian.rolap.RolapAggregationManager.makeRequest(RolapAggregationManager.java:168) ~[mondrian.jar:na]
at mondrian.rolap.FastBatchingCellReader.get(FastBatchingCellReader.java:68) ~[mondrian.jar:na]
at mondrian.rolap.RolapEvaluator.evaluateCurrent(RolapEvaluator.java:657) ~[mondrian.jar:na]
at mondrian.olap.fun.AggregateFunDef$AggregateCalc.aggregate(AggregateFunDef.java:159) ~[mondrian.jar:na]
at mondrian.olap.fun.AggregateFunDef$AggregateCalc.evaluate(AggregateFunDef.java:74) ~[mondrian.jar:na]
at mondrian.rolap.RolapProfilingEvaluator$ProfilingScalarCalc.evaluate(RolapProfilingEvaluator.java:226) ~[mondrian.jar:na]
at mondrian.rolap.RolapEvaluator.evaluateCurrent(RolapEvaluator.java:684) ~[mondrian.jar:na]
at mondrian.calc.impl.ValueCalc.evaluate(ValueCalc.java:36) ~[mondrian.jar:na]
at mondrian.olap.fun.FunUtil.evaluateSet(FunUtil.java:1536) ~[mondrian.jar:na]
at mondrian.olap.fun.FunUtil.sumDouble(FunUtil.java:1449) ~[mondrian.jar:na]
at mondrian.olap.fun.SumFunDef$2.evaluateDouble(SumFunDef.java:125) ~[mondrian.jar:na]
at mondrian.calc.impl.AbstractDoubleCalc.evaluate(AbstractDoubleCalc.java:45) ~[mondrian.jar:na]
at mondrian.olap.fun.FunUtil.evaluateMembers(FunUtil.java:420) ~[mondrian.jar:na]
at mondrian.olap.fun.FunUtil.partiallySortMembers(FunUtil.java:701) ~[mondrian.jar:na]
at mondrian.olap.fun.TopBottomCountFunDef$3.partiallySortList(TopBottomCountFunDef.java:140) ~[mondrian.jar:na]
at mondrian.olap.fun.TopBottomCountFunDef$3.evaluateList(TopBottomCountFunDef.java:108) ~[mondrian.jar:na]
at mondrian.calc.impl.AbstractListCalc.evaluateIterable(AbstractListCalc.java:71) ~[mondrian.jar:na]
at mondrian.rolap.RolapResult.executeAxis(RolapResult.java:772) ~[mondrian.jar:na]
at mondrian.rolap.RolapResult.evalLoad(RolapResult.java:615) ~[mondrian.jar:na]
at mondrian.rolap.RolapResult.loadMembers(RolapResult.java:580) ~[mondrian.jar:na]
at mondrian.rolap.RolapResult.(RolapResult.java:288) ~[mondrian.jar:na]
at mondrian.rolap.RolapConnection.executeInternal(RolapConnection.java:633) ~[mondrian.jar:na]
... 8 common frames omitted

Crash in the use of Mondrian encountered

A fatal error has been detected by the Java Runtime Environment:

SIGSEGV (0xb) at pc=0x00002aaaabbd8e5a, pid=5481, tid=1439533376

#686

JRE version: 6.0_29-b11

Java VM: Java HotSpot(TM) 64-Bit Server VM (20.4-b02 mixed mode linux-amd64 compressed oops)

Problematic frame:

J mondrian.util.DigitList.set(Ljava/lang/String;I)V

If you would like to submit a bug report, please visit:

http://java.sun.com/webapps/bugreport/crash.jsp

--------------- T H R E A D ---------------

Current thread (0x0000000050bdf800): JavaThread "[ACTIVE] ExecuteThread: '21' for queue: 'weblogic.kernel.Default (self-tuning)'" daemon [_thread_in_Java, id=6109, stack(0x0000000055bd8000,0x0000000055cd9000)]

siginfo:si_signo=SIGSEGV: si_errno=0, si_code=1 (SEGV_MAPERR), si_addr=0x0000003700000014

Registers:
RAX=0x0000000564768300, RBX=0x0000000055cd4110, RCX=0x0000000000000013, RDX=0x0000000564768300
RSP=0x0000000055cd4090, RBP=0x0000000564768298, RSI=0x0000003700000008, RDI=0x000000058ac0a794
R8 =0x0000000564768330, R9 =0x0000000000000000, R10=0x00002b6cf73831c9, R11=0x00002aaaab5f9000
R12=0x0000000000000000, R13=0x00002aaaab8ed0a4, R14=0x0000000055cd4100, R15=0x0000000050bdf800
RIP=0x00002aaaabbd8e5a, EFLAGS=0x0000000000210206, CSGSFS=0x0000000000000033, ERR=0x0000000000000006
TRAPNO=0x000000000000000e

Top of Stack: (sp=0x0000000055cd4090)
0x0000000055cd4090: 0000000000000003 000000058ac0a788
0x0000000055cd40a0: 0000000564768300 0000000000000013
0x0000000055cd40b0: 00000007e00988e0 0000000055cd4100
0x0000000055cd40c0: 00000007e0134098 0000000000000000
0x0000000055cd40d0: 00000007e00988f0 0000000000000000
0x0000000055cd40e0: 0000003700000008 0000000564768298
0x0000000055cd40f0: 00002aaaab8ed0a4 0000000000000000
0x0000000055cd4100: 0000000564768298 00002aaaab8ed0b8
0x0000000055cd4110: 00002aaaab87a7e0 0000000564760950
0x0000000055cd4120: 0000059e00000009 00000005647662f8
0x0000000055cd4130: 0000003700000008 00000007e06c27e8
0x0000000055cd4140: 00000007e00fefe0 00002aaa0000043e
0x0000000055cd4150: 0000000564765a98 0000000564760a20
0x0000000055cd4160: 0000000000000003 00000005647609f8
0x0000000055cd4170: 00000001ac7fc89d 00000007e03939c8
0x0000000055cd4180: 00000000fc0465f5 0000000000000247
0x0000000055cd4190: 0000000564768230 00000007e01f9e30
0x0000000055cd41a0: fff8000000000000 00002aaaabbd4d40
0x0000000055cd41b0: 0000000564768258 0000000200000012
0x0000000055cd41c0: 00000007e0232f88 00000007e06c27e8
0x0000000055cd41d0: 0000000055cd4248 00002aaaab03ea82
0x0000000055cd41e0: 00002aaaab03ea82 fff8000000000000
0x0000000055cd41f0: 00000000fc0466d0 0000000564768230
0x0000000055cd4200: 0000000564768230 0000000055cd4208
0x0000000055cd4210: 00000007ebcf47dd 0000000055cd4280
0x0000000055cd4220: 00000007ebcf5338 0000000000000000
0x0000000055cd4230: 00000007ebcf48a0 0000000055cd41e8
0x0000000055cd4240: 0000000055cd4268 0000000055cd42c8
0x0000000055cd4250: 00002aaaab03ea82 0000000000000000
0x0000000055cd4260: 0000000000000000 00000005647681e8
0x0000000055cd4270: fff8000000000000 00002b6cf6e465bf
0x0000000055cd4280: 00000005a4f94e20 0000000055cd4288

Instructions: (pc=0x00002aaaabbd8e5a)
0x00002aaaabbd8e3a: 00 00 66 66 66 90 89 84 24 00 a0 ff ff 55 48 83
0x00002aaaabbd8e4a: ec 70 89 4c 24 18 48 89 54 24 10 48 89 74 24 50
0x00002aaaabbd8e5a: c7 46 0c ff ff ff ff 44 89 66 10 8b 52 14 85 d2
0x00002aaaabbd8e6a: 0f 8e 29 06 00 00 4c 8b 54 24 10 45 8b 5a 10 45

Register to memory mapping:

RAX=
[error occurred during error reporting (printing register info), id 0xb]

Stack: [0x0000000055bd8000,0x0000000055cd9000], sp=0x0000000055cd4090, free space=1008k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
J mondrian.util.DigitList.set(Ljava/lang/String;I)V

NullPointer Exception After Adding Closure Table On Xml Schema

The XML definitions:

The SQL Definitions:

CREATE TABLE space_dimension(
parent_space_id BIGINT NOT NULL,
space_id BIGINT NOT NULL,
space_name VARCHAR NOT NULL,
space_type VARCHAR NOT NULL,
space_description VARCHAR NOT NULL DEFAULT 'No Description',
space_area BIGINT NOT NULL DEFAULT 0,
has_natural_light BOOLEAN NOT NULL DEFAULT FALSE,
CONSTRAINT pk_space_dimension PRIMARY KEY (space_id)
);

CREATE TABLE space_hierarchy_bridge(
parent_space_id BIGINT NOT NULL,
space_id BIGINT NOT NULL,
levels_from_top INT NOT NULL,
bottom_flag BOOLEAN NOT NULL,
top_flag BOOLEAN NOT NULL,
FOREIGN KEY (space_id) REFERENCES space_dimension (space_id)
);

The error that shows up has soon as i load the mondrian library:

java.lang.NullPointerException
at mondrian.rolap.RolapSchema$PhysPathBuilder.(RolapSchema.java:2554)
at mondrian.rolap.RolapSchemaLoader.registerExpr(RolapSchemaLoader.java:2219)
at mondrian.rolap.RolapSchemaLoader.registerAttribute(RolapSchemaLoader.java:2165)
at mondrian.rolap.RolapSchemaLoader.registerLevel(RolapSchemaLoader.java:2150)
at mondrian.rolap.RolapSchemaLoader.registerHierarchy(RolapSchemaLoader.java:2139)
at mondrian.rolap.RolapSchemaLoader.registerDimension(RolapSchemaLoader.java:2127)
at mondrian.rolap.RolapSchemaLoader.createCube(RolapSchemaLoader.java:1907)
at mondrian.rolap.RolapSchemaLoader.sharedDimension(RolapSchemaLoader.java:3062)
at mondrian.rolap.RolapSchemaLoader.access$500(RolapSchemaLoader.java:62)
at mondrian.rolap.RolapSchemaLoader$5.apply(RolapSchemaLoader.java:2731)
at mondrian.rolap.RolapSchemaLoader.loadStage2(RolapSchemaLoader.java:426)
at mondrian.rolap.RolapSchemaLoader.loadStage1(RolapSchemaLoader.java:336)
at mondrian.rolap.RolapSchemaLoader.loadStage0(RolapSchemaLoader.java:272)
at mondrian.rolap.RolapSchemaLoader.createSchema(RolapSchemaLoader.java:4303)
at mondrian.rolap.RolapSchemaPool.get(RolapSchemaPool.java:210)
at mondrian.rolap.RolapSchemaPool.get(RolapSchemaPool.java:62)
at mondrian.rolap.RolapConnection.(RolapConnection.java:160)
at mondrian.rolap.RolapConnection.(RolapConnection.java:84)
at mondrian.olap.DriverManager.getConnection(DriverManager.java:112)
at mondrian.olap.DriverManager.getConnection(DriverManager.java:68)
at mondrian.olap4j.MondrianOlap4jConnection.(MondrianOlap4jConnection.java:153)
at mondrian.olap4j.FactoryJdbc4Plus$AbstractConnection.(FactoryJdbc4Plus.java:323)
at mondrian.olap4j.FactoryJdbc41Impl$MondrianOlap4jConnectionJdbc41.(FactoryJdbc41Impl.java:118)
at mondrian.olap4j.FactoryJdbc41Impl.newConnection(FactoryJdbc41Impl.java:32)
at mondrian.olap4j.MondrianOlap4jDriver.connect(MondrianOlap4jDriver.java:139)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at energydw.olap.application.Application.init(Application.java:148)
at javax.servlet.GenericServlet.init(GenericServlet.java:244)
at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:612)
at org.eclipse.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:468)
at org.eclipse.jetty.servlet.ServletHolder.ensureInstance(ServletHolder.java:763)
at org.eclipse.jetty.servlet.ServletHolder.prepare(ServletHolder.java:748)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:497)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
at java.lang.Thread.run(Unknown Source)
2015-04-09 13:02:56.567:WARN:oejs.ServletHandler:qtp1031980531-17:
javax.servlet.ServletException: energydw.olap.application.Application@92789c63==energydw.olap.application.Application,-1,fa
at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:633)
at org.eclipse.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:468)
at org.eclipse.jetty.servlet.ServletHolder.ensureInstance(ServletHolder.java:763)
at org.eclipse.jetty.servlet.ServletHolder.prepare(ServletHolder.java:748)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:497)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
at java.lang.Thread.run(Unknown Source)
Caused by:
java.lang.NullPointerException
at mondrian.rolap.RolapSchema$PhysPathBuilder.(RolapSchema.java:2554)
at mondrian.rolap.RolapSchemaLoader.registerExpr(RolapSchemaLoader.java:2219)
at mondrian.rolap.RolapSchemaLoader.registerAttribute(RolapSchemaLoader.java:2165)
at mondrian.rolap.RolapSchemaLoader.registerLevel(RolapSchemaLoader.java:2150)
at mondrian.rolap.RolapSchemaLoader.registerHierarchy(RolapSchemaLoader.java:2139)
at mondrian.rolap.RolapSchemaLoader.registerDimension(RolapSchemaLoader.java:2127)
at mondrian.rolap.RolapSchemaLoader.createCube(RolapSchemaLoader.java:1907)
at mondrian.rolap.RolapSchemaLoader.sharedDimension(RolapSchemaLoader.java:3062)
at mondrian.rolap.RolapSchemaLoader.access$500(RolapSchemaLoader.java:62)
at mondrian.rolap.RolapSchemaLoader$5.apply(RolapSchemaLoader.java:2731)
at mondrian.rolap.RolapSchemaLoader.loadStage2(RolapSchemaLoader.java:426)
at mondrian.rolap.RolapSchemaLoader.loadStage1(RolapSchemaLoader.java:336)
at mondrian.rolap.RolapSchemaLoader.loadStage0(RolapSchemaLoader.java:272)
at mondrian.rolap.RolapSchemaLoader.createSchema(RolapSchemaLoader.java:4303)
at mondrian.rolap.RolapSchemaPool.get(RolapSchemaPool.java:210)
at mondrian.rolap.RolapSchemaPool.get(RolapSchemaPool.java:62)
at mondrian.rolap.RolapConnection.(RolapConnection.java:160)
at mondrian.rolap.RolapConnection.(RolapConnection.java:84)
at mondrian.olap.DriverManager.getConnection(DriverManager.java:112)
at mondrian.olap.DriverManager.getConnection(DriverManager.java:68)
at mondrian.olap4j.MondrianOlap4jConnection.(MondrianOlap4jConnection.java:153)
at mondrian.olap4j.FactoryJdbc4Plus$AbstractConnection.(FactoryJdbc4Plus.java:323)
at mondrian.olap4j.FactoryJdbc41Impl$MondrianOlap4jConnectionJdbc41.(FactoryJdbc41Impl.java:118)
at mondrian.olap4j.FactoryJdbc41Impl.newConnection(FactoryJdbc41Impl.java:32)
at mondrian.olap4j.MondrianOlap4jDriver.connect(MondrianOlap4jDriver.java:139)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at energydw.olap.application.Application.init(Application.java:148)
at javax.servlet.GenericServlet.init(GenericServlet.java:244)
at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:612)
at org.eclipse.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:468)
at org.eclipse.jetty.servlet.ServletHolder.ensureInstance(ServletHolder.java:763)
at org.eclipse.jetty.servlet.ServletHolder.prepare(ServletHolder.java:748)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:497)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
at java.lang.Thread.run(Unknown Source)

Everything was working fine before i added the closure definition.

I'm using mondrian version 4.2.0.2-261.

UPDATE:

The library is creating all the relations between facts, dimensions, and tables (including relations between fact tables and the closure table), but it does not create a relation between space dimension and its closure table...

Measure with no aggregation

Is there a way to make drill down in mondrian without aggregation formula for the columns? Because aggregating columns in my case doesn't make sense.

How to upgrade mondrian version 4.x from 3.x

I install mondrian with version 3.5, and success to connect it to hive, it can work now.
But once I upgrade it to 4.3, it can't work fine any way.
update step:
download mondrian-4.3.jar, then replace the mondrian-3.5.jar with the new jar.

after upgraded, it throw some exception:
ex1: java.lang.NoClassDefFoundError: mondrian/xmla/XmlaHandler$ConnectionFactory (resolved)
ex2: java.lang.NoSuchMethodError: org.apache.log4j.Logger.isTraceEnabled()Z mondrian
and i think i will face another issues even though i resloved above.

Anybody can give me an upgrade guide?

NoClassDefFoundError: org/pentaho/ui/xul/XulException when trying to run workbench

ant workbench

builds workbench successfully, while

ant workbench-run

or

java -jar lib/workbench.jar

causes

>java -jar lib/workbench.jar
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: org/pentaho/ui/xul/XulException
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
        at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
        at java.lang.Class.getMethod0(Class.java:3018)
        at java.lang.Class.getMethod(Class.java:1784)
        at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
        at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: org.pentaho.ui.xul.XulException
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 7 more

Naive question

Trying to install mondrian, and ran into an issue with "ant"

On the step for set up - when running ant

C:\mondrian> ant

i end up getting the following output instead.

help:
[echo]
[echo] You must specify a specific project target when using the ANT build.
[echo] Targets are one of the following:
[echo]
[echo] - help
[echo] This is the help.
[echo]
[echo] - info
[echo] Shows configuration info.
[echo]
[echo] - binzip
[echo] Compiles Mondrian and wraps everything in a neat little package,
[echo] including documentation.
[echo]
[echo] - workbench-dist
[echo] Compiles PSW and wraps everything in a neat little package.
[echo]
[echo] - jar
[echo] Creates a Mondrian jar.
[echo]
[echo] - workbench
[echo] Creates Mondrian and workbench jars.
[echo]
[echo] - clean
[echo] Deletes build output.
[echo]
[echo] - clean-deep
[echo] Clean build output and generated sources.
[echo]
[echo] - javadoc
[echo] Create the API documentation.
[echo]
[echo] - test
[echo] Runs the tests. Requires FoodMart to be installed. (see below)
[echo]
[echo] - jacoco
[echo] Runs the tests with jacoco to measure coverage. Requires FoodMart
[echo] to be installed. (see below)
[echo]
[echo] -load-foodmart
[echo] Will load the test DB FoodMart using the JDBC parameters specified.
[echo](see below)
[echo]
[echo] To run the tests, you must have FoodMart available in a database.
[echo] You can pass the DB configuration through the command line arguments,
[echo] like so:
[echo]
[echo] ant -Dmondrian.foodmart.jdbcURL="jdbc:mysql://localhost/foodmart"
[echo] -Dmondrian.foodmart.jdbcUser=foodmart
[echo] -Dmondrian.foodmart.jdbcPassword=foodmart
[echo] -Dmondrian.jdbcDrivers=com.mysql.jdbc.Driver
[echo] -Ddriver.classpath="/opt/mysql-connector-java-5.1.25-bin.jar"
[echo] test
[echo]
[echo] Alternatively, these can be written to a file at the root of the project.
[echo] Create a file 'mondrian.properties' containing this:
[echo]
[echo] mondrian.foodmart.jdbcURL=jdbc:mysql://localhost/foodmart
[echo] mondrian.foodmart.jdbcUser=foodmart
[echo] mondrian.foodmart.jdbcPassword=foodmart
[echo] mondrian.jdbcDrivers=com.mysql.jdbc.Driver
[echo] driver.classpath=/opt/mysql-connector-java-5.1.25-bin.jar
[echo]
[echo] To load foodmart into your DB, you can call the 'load-foodmart' target
[echo] before 'test'.
[echo]
[echo] The parameters can be adjusted to point to a different DB than MySQL.
[echo]

BUILD SUCCESSFUL
Total time: 0 seconds

Is there a specific target i should be selecting/specifying for the proper build steps?

AggGen and Aggreation Tables will not work when case differs between OLAP schema and what JDBC metadata returns.

AggGen fails to work when RolapStar cannot be found. Eventhough it's just a matter of case sensitivity that prevents it from being found. The JDBC drivers report table names in differing case so if you use one driver vs the other the case of your tables in the OLAP schema. In fact some drivers will report different case because it's OS dependent. Windows is case insensitive, Linux is case sensitive. Mysql will report different case based on the OS.

2015-04-18 21:56:06,507 [mondrian.rolap.agg.SegmentCacheManager$ACTOR] WARN mondrian.rolap.aggmatcher.AggGen - Init: No fact table with name "EMPLOYMENT"
2015-04-18 21:56:43,921 [mondrian.rolap.agg.SegmentCacheManager$ACTOR] ERROR mondrian.rolap.BatchLoader$Batch - AggGen failed

If you see "No fact table with name ..." Aggregation tables will not work. The process Mondrian uses to match up RolapStar and JDBC Table using JDBC metadata is case sensitive because the table names form metadata are added to a HashMap. Therefore, your OLAP Schema has to adhere to the specifics your driver returns or else it'll never work.

This should be made less sensitive. It's not robust and extremely hard to use. I've wasted easily a week debugging and trying to find a workaround. Just make it case-insensitive since SQL does not care about case. This was all tested on v3.x.

mondrian.xsd appears to be out of date

I recently found the mondrian schema, but it looks like it hasn't been touched in 3 years. I really like the fact someone bothered to create a schema because it makes editing the schema doc much easier. There are things I have used that appear to be working, but the schema says they are invalid. Particularly DimensionUsage caption attribute isn't included in the definition, but it appears to work. Any chance this would be updated? If the schema isn't the standard what exactly defines the standard beyond the docs?

Use Exists() in Where

Hi,

It will be good if you can add Exists function in where whenever two or more than two levels are included from same hierarchy.

WHERE {Exists([Time.Date].[Day].Members, [Time.Date].[2013].[Quarter1].[January])}

mondrian build issue

Hi

mondrian-3.5.0 code base am not able to build it during the am getting the error like ,

[NOT FOUND  ] jaxen#jaxen;1.1.1!jaxen.jar(source) (477ms)

[ivy:resolve] ==== public: tried
[ivy:resolve] http://repo1.maven.org/maven2/jaxen/jaxen/1.1.1/jaxen-1.1.1-sources.jar
[ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve] :: FAILED DOWNLOADS ::
[ivy:resolve] :: ^ see resolution messages for details ^ ::
[ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve] :: jaxen#jaxen;1.1.1!jaxen.jar(source)
[ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::

Please help me am new to this .
Thanks & Regards
Sivakumar J

"JPivot had an error" on embedded install on Ubuntu 14.04

To reproduce

Ubuntu 14.04.

Install Oracle Java 7 with:

sudo add-apt-repository -y ppa:webupd8team/java
sudo aptitude update
sudo aptitude install -y oracle-java7-installer

(has to be 7, 8 does not work)

Set:

export JAVA_HOME='/usr/lib/jvm/java-7-oracle'

on ~/.profile

Install Tomcat 7 with:

sudo aptitude install -y tomcat7

And set the Java for it at sudo vim /etc/default/tomcat7:

JAVA_HOME=/usr/lib/jvm/java-7-oracle

Start tomcat: sudo service start tomcat7. localhost:8080 shows it's running.

Clone this repo, and:

ant derby-war

Unzip lib/mondrian-embedded.war to TOMCAT_HOME/webapps/mondrian-embedded`.

What happens

Maybe http://lists.pentaho.org/pipermail/mondrian/2014-October/004999.html would solve this? But it requires so many Mondrian-specific manual steps that I haven't tried. I recommend keeping this open until I find what I did wrong, or a better installation method exists.

It would be great if there was a simpler install method on Ubuntu like a PPA, or a VM.

Error while building Mondrian 3.7

Hi,
I am trying to build Mondrian 3.7. I have some setup issues which is causing the build to fail. Can you please tell me what am I doing wrong ?

An Excerpt of the error is given below. Kindly shed some light on this.
Regards,
Sanjay

.properties is up to date

generate.properties:
[java] Generating src\main\mondrian\olap\MondrianProperties.java
[java] Generating doc\properties.html
[java] Generating mondrian.properties.template

def:

set-compile-args:

compileJdk15:
[exec] C:\jdk1.7
[exec] Using ANT_HOME: c:\Ant
[exec] Using JAVA_HOME: C:\jdk1.7
[exec] Using JAVACMD: C:\jdk1.7\bin\java.exe
[exec] Using Ant arguments: -Drequested.java.version=jdk1.5 compile.java
[exec] Buildfile: C:\mondrian-3.7\build.xml
[exec]
[exec] apologise:
[exec] [echo] Actual JVM Version (1.7.0_45-b18) does not match
[exec] [echo] requested (jdk1.5); skipping compile for this JDK.
[exec] [echo] If you wish to build for this JDK, modify C:\mondrian-3.
7/buildOnJdk.sh.
[exec] [echo]
[exec]
[exec] compile.java:
[exec]
[exec] BUILD SUCCESSFUL
[exec] Total time: 0 seconds

compileJdk16:
[exec] C:\jdk1.7
[exec] Using ANT_HOME: c:\Ant
[exec] Using JAVA_HOME: C:\jdk1.7
[exec] Using JAVACMD: C:\jdk1.7\bin\java.exe
[exec] Using Ant arguments: -Drequested.java.version=jdk1.6 compile.java
[exec] Buildfile: C:\mondrian-3.7\build.xml
[exec]
[exec] apologise:
[exec] [echo] Actual JVM Version (1.7.0_45-b18) does not match
[exec] [echo] requested (jdk1.6); skipping compile for this JDK.
[exec] [echo] If you wish to build for this JDK, modify C:\mondrian-3.
7/buildOnJdk.sh.
[exec] [echo]
[exec]
[exec] compile.java:
[exec]
[exec] BUILD SUCCESSFUL
[exec] Total time: 0 seconds

compileJdk17:
[exec] C:\jdk1.7
[exec] Using ANT_HOME: c:\Ant
[exec] Using JAVA_HOME: C:\jdk1.7
[exec] Using JAVACMD: C:\jdk1.7\bin\java.exe
[exec] Using Ant arguments: -Drequested.java.version=jdk1.7 compile.java
[exec] Buildfile: C:\mondrian-3.7\build.xml
[exec]
[exec] apologise:
[exec]
[exec] compile.java:
[exec] [echo] Compiling on JVM Version: 1.7.0_45-b18
[exec] [echo] include.gui=${include.gui}
[exec] [javac] Compiling 679 source files to C:\mondrian-3.7\bin\classe
s
[exec] [javac] C:\mondrian-3.7\src\main\mondrian\calc\impl\AbstractExpC
ompiler.java:150: error: cannot find symbol
[exec] [javac] throw MondrianResource.instance().NullNotSup
ported.ex();
[exec] [javac]
^
[exec] [javac] symbol: method ex()
[exec] [javac] location: variable NullNotSupported of type MondrianRe
source._Def3
[exec] [javac] C:\mondrian-3.7\src\main\mondrian\calc\impl\AbstractExpC
ompiler.java:215: error: cannot find symbol
[exec] [javac] .CannotImplicitlyConvertDimensio
nToHierarchy.ex(
[exec] [javac]
^
[exec] [javac] symbol: method ex(String)
[exec] [javac] location: variable CannotImplicitlyConvertDimensionToH
ierarchy of type MondrianResource._Def0
[exec] [javac] C:\mondrian-3.7\src\main\mondrian\calc\impl\AbstractExpC
ompiler.java:577: error: cannot find symbol
[exec] [javac] .CannotImplicitlyConvertDimensionToH
ierarchy.ex(
[exec] [javac]
^
[exec] [javac] symbol: method ex(String)
[exec] [javac] location: variable CannotImplicitlyConvertDimensionToH
ierarchy of type MondrianResource._Def0
[exec] [javac] C:\mondrian-3.7\src\main\mondrian\olap\Util.java:817: er
ror: cannot find symbol
[exec] [javac] throw MondrianResource.instance().Me
mberNotFound.ex(
[exec] [javac]
^
[exec] [javac] symbol: method ex(String)
[exec] [javac] location: variable MemberNotFound of type MondrianReso
urce._Def0
[exec] [javac] C:\mondrian-3.7\src\main\mondrian\olap\Util.java:821: er
ror: cannot find symbol
[exec] [javac] .ex(name.toString(), parent.getQ
ualifiedName());
[exec] [javac] ^
[exec] [javac] symbol: method ex(String,String)
[exec] [javac] location: variable MdxChildObjectNotFound of type Mond......

The Mondrian XML: Mondrian Error:Internal error: query already contains alias

I Have the following schema xml

<Schema name='purchase' metamodelVersion='4.0'>
    <PhysicalSchema>
        <Table name="purchase">
         <Key>
            <Column name='PurchaseVoucherNumber'/>
         </Key>
        </Table>
        <Table name='dim_date'>
            <Key>
                <Column name='date_key'/>
            </Key>
        </Table>
    </PhysicalSchema>
<Cube name='purchasesCube'>
<Dimensions>
    <Dimension name='Purchase Item' table='purchase' key='Purchase Item Code'>
    <Attributes>
        <Attribute name='Purchase Item Type'  keyColumn='PurchaseItemType' />
        <Attribute name='Purchase Item Group' keyColumn='PurchaseItemGroup' />
        <Attribute name='Purchase Item Category' keyColumn='PurchaseItemCategory' />
        <Attribute name='Purchase Item Code' keyColumn='PurchaseItemCode' />
    </Attributes>
    </Dimension>
</Dimensions>
<MeasureGroups>
<MeasureGroup name='Purchases' table='purchase'>
<Measures>
<Measure name='Number of Deliveries' column='PurchaseVoucherNumber' aggregator='distinct-count' visible='true'>
</Measure>
</Measures>
<DimensionLinks>
<ForeignKeyLink dimension='Purchase Item' foreignKeyColumn='PurchaseItemCode'/>
</DimensionLinks>
</MeasureGroup>
</MeasureGroups>
</Cube>
</Schema>

When I execute the following query against this

SELECT {[Measures].[Number of Deliveries]} ON columns, {[Purchase Item].[Purchase Item Code].Children} ON rows FROM purchasesCube

I get the following error

The Mondrian XML: Mondrian Error:Internal error: query already contains alias 'purchase'

The resulting SQL query

select
    "purchase"."PurchaseItemCode" as "c0"
from
    "purchase" as "purchase"
group by
    "purchase"."PurchaseItemCode"
order by
    CASE WHEN "purchase"."PurchaseItemCode" IS NULL THEN 0 ELSE 1 END, "purchase"."PurchaseItemCode" ASC

Can someone please help point out where I have gone wrong ?
PS: The foodmart examples work just fine.

Mondrian 4.1.1.0 - Issue

Hi,
I am moving from 3.x to 4.x and have build the mondrian.war from the 4.1.1.0 branch.
I have made the appropriate schema changes as per what is required by 4.0 spec.

When I try to execute an MDX Query I get the following error

The Mondrian XML: Mondrian Error:Internal error: Schema version '4.0' is later than schema version '3.x' supported by this version of Mondrian

Can someone please help me in understanding what I am doing wrong ?

Regards,
Sanjay

issuse when using phoenix based on mondrian 3.6.1

2014-05-27 15:43:22,906 DEBUG [mondrian.sql] 12: Segment.load: executing sql [select sum('WEB_STAT'.'CORE') as 'm0' from 'WEB_STAT' as 'WEB_STAT']
2014-05-27 15:43:22,906 DEBUG [mondrian.sql] 12: , exec+fetch 0 ms, 0 rows
2014-05-27 15:43:22,906 DEBUG [mondrian.sql] 12: , failed (com.salesforce.phoenix.exception.PhoenixParserException: ERROR 603 (42P00): Syntax error. Mismatched input. Expecting "RPAREN", got "." at line 1, column 22.)

in the sql, select sum('WEB_STAT'.'CORE') as 'm0' from 'WEB_STAT' as 'WEB_STAT' ,the quoteIdentifierString was '.but when I used mysql ,the quoteIdentifierString
was `.

Schema converter loses table schema name

I have a 3.x schema generated with workbench. It has a fact table that has has some schema, like my_schema.my_table. As soon as I try to establish connection, Mondrian crashes when it tries to run a query on my_table (omitting schema name).

I dug into this, and found that PhysSchemaConverter does not copy over schema name. Just table name and alias.

Have a look:

    private MondrianDef.Table toDef(
        RolapSchema.PhysTable physTable)
    {
        MondrianDef.Table xmlTable = new MondrianDef.Table();
        xmlTable.name = physTable.name;
        xmlTable.alias = physTable.alias;
        List<MondrianDef.RealOrCalcColumnDef> columnDefs =
            xmlTable.children.holder(
                new MondrianDef.ColumnDefs()).list();
        for (RolapSchema.PhysColumn physColumn
            : physTable.columnsByName.values())
        {
            toDef(physColumn, columnDefs);
        }
        for (RolapSchema.PhysKey physKey : physTable.keysByName.values()) {
            toDef(physKey, xmlTable);
        }
        xmlTables.put(physTable.getAlias(), xmlTable);
        return xmlTable;
    }

I believe it should include

        xmlTable.schema = physTable.schema;

FoodMart.xml fails to load/convert

When running the latest code (as of 2105-10-14), loading the FoodMart.xml catalog with a Derby database (but probably unrelated) fails with the following stack trace:

mondrian.olap.MondrianException: Mondrian Error:Calculated member or named set in cube 'Warehouse and Sales' has bad formula
at mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:992)
at mondrian.rolap.RolapSchemaLoader.resolveCalcMembers(RolapSchemaLoader.java:4730)
at mondrian.rolap.RolapSchemaLoader.createCalcMembersAndNamedSets(RolapSchemaLoader.java:4655)
at mondrian.rolap.RolapSchemaLoader.createCube(RolapSchemaLoader.java:1918)
at mondrian.rolap.RolapSchemaLoader.loadStage2(RolapSchemaLoader.java:419)
at mondrian.rolap.RolapSchemaLoader.loadStage1(RolapSchemaLoader.java:335)
at mondrian.rolap.RolapSchemaLoader.loadStage0(RolapSchemaLoader.java:271)
at mondrian.rolap.RolapSchemaLoader.createSchema(RolapSchemaLoader.java:4302)
at mondrian.rolap.RolapSchemaPool.get(RolapSchemaPool.java:210)
at mondrian.rolap.RolapSchemaPool.get(RolapSchemaPool.java:62)
at mondrian.rolap.RolapConnection.(RolapConnection.java:160)
at mondrian.rolap.RolapConnection.(RolapConnection.java:84)
at mondrian.olap.DriverManager.getConnection(DriverManager.java:113)
at mondrian.olap.DriverManager.getConnection(DriverManager.java:68)
at mondrian.olap4j.MondrianOlap4jConnection.(MondrianOlap4jConnection.java:155)
at mondrian.olap4j.FactoryJdbc4Plus$AbstractConnection.(FactoryJdbc4Plus.java:323)
at mondrian.olap4j.FactoryJdbc41Impl$MondrianOlap4jConnectionJdbc41.(FactoryJdbc41Impl.java:105)
at mondrian.olap4j.FactoryJdbc41Impl.newConnection(FactoryJdbc41Impl.java:32)
at mondrian.olap4j.MondrianOlap4jDriver.connect(MondrianOlap4jDriver.java:139)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:270)
at sage.store.cube.TestFoodmartDerbyDataSource.testCreateMondrianConnection(TestFoodmartDerbyDataSource.java:74)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: mondrian.olap.MondrianException: Mondrian Error:Failed to parse query 'WITH
MEMBER [Measures].[Measures].[Profit]
AS '[Measures].[Store Sales] - [Measures].[Store Cost]',
FORMAT_STRING = "$#,##0.00",
[$member_scope] = 'CUBE',
MEMBER_ORDINAL = 11
MEMBER [Measures].[Measures].[Profit Growth]
AS '([Measures].[Profit] - [Measures].[Profit last Period]) / [Measures].[Profit last Period]',
FORMAT_STRING = "0.0%",
[$member_scope] = 'CUBE',
MEMBER_ORDINAL = 12
MEMBER [Measures].[Measures].[Average Warehouse Sale]
AS '[Measures].[Warehouse Sales] / [Measures].[Warehouse Cost]',
FORMAT_STRING = "$#,##0.00",
[$member_scope] = 'CUBE',
MEMBER_ORDINAL = 13
MEMBER [Measures].[Measures].[Profit Per Unit Shipped]
AS '[Measures].[Profit] / [Measures].[Units Shipped]',
[$member_scope] = 'CUBE',
MEMBER_ORDINAL = 14
SELECT FROM [Warehouse and Sales]'
at mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:992)
at mondrian.olap.ConnectionBase.parseStatement(ConnectionBase.java:100)
at mondrian.rolap.RolapConnection.parseStatement(RolapConnection.java:589)
at mondrian.olap.ConnectionBase.parseQuery(ConnectionBase.java:55)
at mondrian.rolap.RolapSchemaLoader$9.execute(RolapSchemaLoader.java:4723)
at mondrian.rolap.RolapSchemaLoader$9.execute(RolapSchemaLoader.java:1)
at mondrian.server.Locus.execute(Locus.java:88)
at mondrian.server.Locus.execute(Locus.java:73)
at mondrian.rolap.RolapSchemaLoader.resolveCalcMembers(RolapSchemaLoader.java:4718)
... 44 more
Caused by: mondrian.olap.MondrianException: Mondrian Error:MDX object '[Measures].[Profit last Period]' not found in cube 'Warehouse and Sales'
at mondrian.resource.MondrianResource$_Def1.ex(MondrianResource.java:1009)
at mondrian.olap.Util.lookup(Util.java:990)
at mondrian.olap.Id.accept(Id.java:111)
at mondrian.olap.ValidatorImpl.validate(ValidatorImpl.java:79)
at mondrian.olap.fun.FunUtil.resolveFunArgs(FunUtil.java:1995)
at mondrian.mdx.UnresolvedFunCall.accept(UnresolvedFunCall.java:103)
at mondrian.olap.ValidatorImpl.validate(ValidatorImpl.java:79)
at mondrian.olap.fun.FunUtil.resolveFunArgs(FunUtil.java:1995)
at mondrian.mdx.UnresolvedFunCall.accept(UnresolvedFunCall.java:103)
at mondrian.olap.ValidatorImpl.validate(ValidatorImpl.java:79)
at mondrian.olap.fun.FunUtil.resolveFunArgs(FunUtil.java:1995)
at mondrian.mdx.UnresolvedFunCall.accept(UnresolvedFunCall.java:103)
at mondrian.olap.ValidatorImpl.validate(ValidatorImpl.java:79)
at mondrian.olap.Formula.accept(Formula.java:105)
at mondrian.olap.ValidatorImpl.validate(ValidatorImpl.java:155)
at mondrian.olap.Query.resolve(Query.java:552)
at mondrian.olap.Query.resolve(Query.java:445)
at mondrian.olap.Query.(Query.java:199)
at mondrian.olap.Query.(Query.java:168)
at mondrian.parser.QueryPartFactoryImpl.makeQuery(QueryPartFactoryImpl.java:38)
at mondrian.parser.MdxParserImpl.selectStatement(MdxParserImpl.java:1241)
at mondrian.parser.MdxParserImpl.statement(MdxParserImpl.java:1074)
at mondrian.parser.MdxParserImpl.statementEof(MdxParserImpl.java:188)
at mondrian.parser.JavaccParserValidatorImpl.parseInternal(JavaccParserValidatorImpl.java:57)
at mondrian.olap.ConnectionBase.parseStatement(ConnectionBase.java:97)
... 51 more

Crossjoins optimization

Hello,
I'm new to mondrian. Experementing combining a couple of sets with crossjoins and a date range (30 days for example) takes several minutes. Are optimizations planed for these use cases, or am I probably doing something wrong?

Are there any docs on the sql optimization engine? Perhaps I could help implementing something right away.

mondrian.rolap.RolapStar$Measure

Hi!

I noticed that mondrian.rolap.RolapStar.Measure extends mondrian.rolap.RolapStar.Column

Both of the classes have the field private final Dialect.Datatype datatype

As far as I can see and understand, the field should not be declared in the Measure class.

Is this planned and a reason behind this?

Best regards,

Jone

Can't build Mondrian master branch

Whenever I try to build Mondrain, I get the following error:

generate.properties:
Error while generating properties files.
java.lang.RuntimeException: Error while parsing src/main/prop/mondrian/olap/MondrianProperties.xml
at mondrian.util.PropertyUtil.generate(PropertyUtil.java:148)
at mondrian.util.PropertyUtil.main(PropertyUtil.java:95)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
....
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:205)
at mondrian.util.PropertyUtil.generate(PropertyUtil.java:120)
... 56 more
Caused by: java.lang.ClassNotFoundException: org.w3c.dom.ElementTraversal
at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1361)
at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1311)
at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1064)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 75 more

Followed by a large number of compilation errors:

compileJdk15:
[javac] Compiling 699 source files to /Users/maesenka/workspaces/github/mondrian/target/classes
[javac] /Users/maesenka/workspaces/github/mondrian/src/main/java/mondrian/rolap/SqlStatement.java:12: error: cannot find symbol
[javac] import mondrian.olap.MondrianProperties;
[javac] ^
[javac] symbol: class MondrianProperties
[javac] location: package mondrian.olap
[javac] /Users/maesenka/workspaces/github/mondrian/src/main/java/mondrian/rolap/agg/AggregationManager.java:17: error: cannot find symbol
[javac] import mondrian.olap.MondrianProperties;
[javac] ^
.....

I tried this on a mac JDK7 and JDK8.

mondrian3.5 install error

i have compile from source code and succucessful in eclipse ,but when i run an example like this:
========================example begin==================================
Connection connection =
DriverManager.getConnection
("Provider=mondrian;Jdbc=jdbc:mysql://localhost/foodmart; JdbcUser=root;JdbcPassword=mysql;Catalog=file:///C:/apache-tomcat-7.0.57/webapps/mondrian/WEB-INF/FoodMart.xml; JdbcDrivers=com.mysql.jdbc.Driver;",null);
String queryStr=
"SELECT {[Measures].[Unit Sales]} ON 0,\n"
+ "{[Product].Children} ON 1\n"
+ "FROM [Sales]";
Query query =connection.parseQuery(queryStr);
Result result = connection.execute(query);
========================example end==================================
it always report error like this:
========================error report==================================
Exception in thread "main" java.util.MissingResourceException: Can't find resource for bundle org.eigenbase.resgen.ShadowResourceBundle$MyPropertyResourceBundle, key Internal
at java.util.ResourceBundle.getObject(ResourceBundle.java:393)
at org.eigenbase.resgen.ShadowResourceBundle.handleGetObject(ShadowResourceBundle.java:137)
at java.util.ResourceBundle.getObject(ResourceBundle.java:387)
at java.util.ResourceBundle.getString(ResourceBundle.java:353)
at org.eigenbase.resgen.ResourceDefinition$Instance.toString(ResourceDefinition.java:290)
at mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:964)
at mondrian.olap.Util.newInternal(Util.java:2393)
at mondrian.olap.Util.newError(Util.java:2408)
at mondrian.rolap.RolapSchema.checkSchemaVersion(RolapSchema.java:458)
at mondrian.rolap.RolapSchema.load(RolapSchema.java:408)
at mondrian.rolap.RolapSchema.(RolapSchema.java:216)
at mondrian.rolap.RolapSchemaPool.get(RolapSchemaPool.java:214)
at mondrian.rolap.RolapSchemaPool.get(RolapSchemaPool.java:66)
at mondrian.rolap.RolapConnection.(RolapConnection.java:160)
at mondrian.rolap.RolapConnection.(RolapConnection.java:90)
at mondrian.olap.DriverManager.getConnection(DriverManager.java:113)
at mondrian.olap.DriverManager.getConnection(DriverManager.java:68)
at mondrian.olap.DriverManager.getConnection(DriverManager.java:50)
at test.MysqlTest.main(MysqlTest.java:41)

========================my question==================================
is anybody have error like this ,or is this a bug in mondrian3.5 ? hope you help! think you!

Retrieving FOREIGN TABLEs from PostgreSQL

I'm using Saiuku with Mondrian 4 and CitusDB's cstore_fdw for storing the fact tables.

Mondrian can't retrive the FTs from Postgres and that's something very similar to this issue #354.

cstore_fdw it's a great choice for a BI solution and Mondrian should support that.

The change should be trivial, maybe somehing like this:

src/main/mondrian/gui/JdbcMetaData.java
null, dbs.name, null, new String[]{"TABLE", "VIEW", "MATERIALIZED VIEW", "FOREIGN TABLE"});

src/main/mondrian/rolap/aggmatcher/JdbcSchema.java
String[] tableTypes = { "TABLE", "VIEW", "MATERIALIZED VIEW" , "FOREIGN TABLE"};

Thanks!

olap4j driver can't work with Olap4jXmlaServlet - (MondrianOlap4jConnection)$Proxy7

Good day!

I'm trying to play with this great project (having zero insight in it). Let me share my observations. The desired architecture is:

xmla4js ---xmla---> Olap4jXmlaServlet ---olap4j---> MondrianOlap4jDriver

it turns to

Caused by: java.lang.ClassCastException: com.sun.proxy.$Proxy7 cannot be cast to mondrian.olap4j.MondrianOlap4jConnection
at mondrian.olap4j.MondrianOlap4jExtra.getDataSources(MondrianOlap4jExtra.java:278)
at mondrian.xmla.RowsetDefinition$DiscoverDatasourcesRowset.populateImpl(RowsetDefinition.java:1596)
at mondrian.xmla.Rowset.populate(Rowset.java:221)
at mondrian.xmla.Rowset.unparse(Rowset.java:193)

I dig into a little here is my finding

MondrianOlap4jExtra naively casts reference connection to MondrianOlap4jConnection, but Olap4jXmlaServlet wraps it by proxy in createDelegatingOlapConnection().

I feel like I'm watching thoroughly made mosaic but one piece is broken.
I could fix this particular failure by using unwrap() instead of cast (or just by using DefaultXmlaServlet), but I want to provide a proper fix and/or find a test. It wasn't easy - ant and ivy, it's not my nowaday tools.

Nevertheless, I've found a test
MetadataTest.testDatabaseMetaDataGetDatasources from olap4j-tck.
How surprised I was when RowsetDefinition$DiscoverDatasourcesRowset.populateImpl obtains concrete MondrianConnection class instead of that proxy. Such lack of coverage makes me nervous.
Don't you think it's necessary to introduce new "proxy" TestContext.Wrapper to cover Olap4jXmlaServlet like behavior?

I'm confused a little by overlap between all these projects, perhaps I need to create issue in another one.

Thanks for your time.

Implement Existing Keyword

It's basically impossible to do anything moderately complex without the EXISTING keyword. I can't believe Mondrian is as old as it is and it's never been done.

MDX standard specifies the EXISTING keyword that can be used in WITH MEMBER calculations to use the existing context to limit a sets membership as opposed to using the cube's context. For example:

with member [Measures].[Employees] as
    'count( EXISTING [Employee].Members'
select
    { [Measures].[Employees] } on columns,
    { [employmentDate.yearMonth].[2010]:[employmentDate.yearMonth].[2012] } on rows
from [Workforce]

Now you can work around this little snafu using the Count( {}, EXCLUDEEMPTY ) trick like so:

with member [Measures].[Employees] as
   'Count(Distinct( [Employee].Members),EXCLUDEEMPTY) - Count(Distinct([Measures].[Terminations]),EXCLUDEEMPTY)'
select
   {[Measures].[Employees],[Measures].[Head Count],[Measures].[Terminations],[Measures].[New Hires]} on columns,
   {[employmentDate.yearMonth].[2010]:[employmentDate.yearMonth].[2012]} on rows
from [Workforce]

But, not all uses of EXISTING can be replaced by using the Count( {}, EXCLUDEEMPTY ) trick. For example:

SELECT
   { ([Measures].[Reseller Sales Amount]) } ON COLUMNS, 
   Generate({[Product].[Category].[Category].Members}, 
   TopCount( EXISTING {[Product].[Product].[Product].Members}, 
                    5, ([Measures].[Reseller Sales Amount]) ), ALL) ON ROWS 
FROM [Step-by-Step]

Or

WITH MEMBER [Measures].[Products] AS
   Count( EXISTING {[Product].[Product].[Product].Members})
MEMBER [Measures].[Reseller Products] AS 
   Count(Filter( EXISTING{[Product].[Product].[Product].Members}, ([Measures].[Reseller Sales Amount]) >= ([Measures].[Internet Sales Amount]) ) )
SELECT
   { ([Measures].[Products]), ([Measures].[Reseller Products]) } ON COLUMNS,
   { [Product].[Category].Members } ON ROWS
FROM [Step-by-Step]

3.x SNAPSHOT builds don't work with pre 1.8

I tried to use a SNAPSHOT build from maven and it was compiled with 1.8 and it isn't backwards compatible with older versions of java. I then tried to build it myself, and while it would compile successfully under 1.8. It wouldn't compile successfully under 1.7. I didn't try any versions lower than 1.7 since that is what my program is compiled with.

$: javap -v mondrian/mdx/NamedSetExpr.class  | grep major
major version: 52

Given that 3.x has always worked with older versions this seems like a configuration issue. What's the deal?

CmdRunner will not connect to anything other than Foodmart url

Using the documented procedure CmdRunner will not connect to a any other jdbcUrl other than Foodmart. Essentially CmdRunner code never looks at the property mondrian.test.jdbcURL. And CmdRunner.getJdbcURLProperty() uses return MondrianProperties.instance().FoodmartJdbcURL.get(); instead of the documented mondrian.test.jdbcURL. The only workaround is to use mondrian.foodmart.jdbcURL, mondrian.foodmart.jdbcUser, mondrian.foodmart.Password.

Last Known Price - Mondrian Error: Query required more than 12 iterations

Hi,

I have written an MDX Query to retrieve the last known price.

With 
MEMBER [Measures].[Last Known Price]
AS IIF(isEmpty([Measures].[Ex Showroom Price]),([Transaction Date].[Month].PrevMember,[Measures].[Last Known Price]),[Measures].[Ex Showroom Price])
Select { [Measures].[Last Known Price] } on Columns, {{[Transaction Date].[Month].[September 2014],[Transaction Date].[Month].[October 2014],[Transaction Date].[Month].[November 2014],[Transaction Date].[Month].[December 2014],[Transaction Date].[Month].[January 2015],[Transaction Date].[Month].[February 2015],[Transaction Date].[Month].[March 2015]}
*
{[Brand].[Brand].Children}} on Rows 
From [pricingCube] Where { {[Body Type].[Body Type].[SUV]} }

On execution it given me an error

The Mondrian XML: Mondrian Error:Internal error: Query required more than 12 iterations

I have tried increasing the mondrian.rolap.evaluate.MaxEvalDepth to no avail.

It works fine and fast when the number of Dimensional Items in the Dimension is less than say 15/20.
In the above Query if I replace Brand with Manufacturer - it work just fine

With 
MEMBER [Measures].[Last Known Price]
AS IIF(isEmpty([Measures].[Ex Showroom Price]),([Transaction Date].[Month].PrevMember,[Measures].[Last Known Price]),[Measures].[Ex Showroom Price])
Select { [Measures].[Last Known Price] } on Columns, {{[Transaction Date].[Month].[September 2014],[Transaction Date].[Month].[October 2014],[Transaction Date].[Month].[November 2014],[Transaction Date].[Month].[December 2014],[Transaction Date].[Month].[January 2015],[Transaction Date].[Month].[February 2015],[Transaction Date].[Month].[March 2015]}
*
{[Manufacturer].[Manufacturer].Children}} on Rows 
From [pricingCube] Where { {[Body Type].[Body Type].[SUV]} }

I am using Mondrian 3.7.

Can someone please help/guide me ?

Regards,
Sanjay

Running Unit Tests on v3.9.0.2 branch fails using Derby

I'm trying to run the unit test successfully using Derby but out of the box they have lots of failures which will make it hard to know if my changes are going to cause trouble.

There were Failures: 9, Errors: 5

A little too many to paste on this issue.

UTF-8 in Mondrian schema xml

mondrian.olap.Util.readVirtualFileAsString not work whith multibyte character sets

...
final byte[] bytes = Util.readFully(in, 1024);
final char[] chars = new char[bytes.length];
for (int i = 0; i < chars.length; i++) {
chars[i] = (char) bytes[i];
}
return new String(chars);
...

Change clause in to exists on transformation query

Hi all ,
For some time using Oracle 11g Mondrian realized that some consultations took me more than it should because the tables were not so great , passing investigating I realized that jumped me an error of memory heap space

The translator MDX to query Oracle uses clauses in the section where.
The use of the clause in the WHERE statement in Oracle 11g has a bug and too long lists of items causes an error of heap memory space .

You could change the translator so that instead of using the clause in use clause exists ?

sorry for my english, thanks in advance

Installation issues

Hi,
How exactly do you install the latest version of Mondrian(3.6.1)?
I stumbled on a Pentaho link and decided to give it a spin.
The SF.net download is a precompiled jar, nothing related to the stand-alone WAR
and other related files referenced in the documentation here : http://mondrian.pentaho.com/documentation/olap.php

Any pointers as to how I may get it in running in Tomcat?

Thanks

Shared Dimension cannot be used more than once in the same cube

In Mondrian 4.0, while trying to create and use more than one dimensions in a which have the same shared dimension as source, Mondrian throws an exception. For example, if there is a shared "Time" dimension and two dimensions Order date and Due date are created as:


Then the following exception is thrown :
mondrian.olap.MondrianException: Mondrian Error:Internal error: Could not find path to time
[....]
Caused by: mondrian.rolap.RolapSchema$PhysSchemaException: Could not find a path from time as time_1 to any of [time]

How to build war under mondrian verion 4.5

under mondrian version 4.5, run command 'ant war' to build it, but build failed.

D:\github_code\mondrian>ant war
Buildfile: D:\github_code\mondrian\build.xml

BUILD FAILED
Target "war" does not exist in the project "mondrian".

Total time: 0 seconds

So how to build war?

Retrieving MATERIALIZED VIEWs from PostgreSQL

Mondrian reports "table not found" error, when a PostgreSQL MATERIALIZED VIEW is defined as <Table> within <PhysicalSchema>. Storing the data as regular table is a workaround.

I recently posted an issue at the pgjdbc project, assuming that this component causes the error. But in fact, mondrian seems to cause the problem, neither asking PostgreSQL for mat. views nor foreign tables.

Please visit:

pgjdbc/pgjdbc#166

jOOQ/jOOQ#3254

Thank you!

Problems with Existing() function

I finally got the master line building and integrated to our app so I could test out the new Existing() function. It appears to work but not in all cases. Here was the original query I was trying to get to work.

WITH set TimelineSet as
   {[applicationDate.yearQuarterMonth].[2015].[1]:[applicationDate.yearQuarterMonth].[2016].[1]}
MEMBER Measures.avgMonthlyApplicants AS 
    Avg(Descendants([TimelineSet], [applicationDate.yearQuarterMonth].[Month]), [Measures].[applicants]) 
SELECT 
   {[Measures].[applicants],[Measures].[avgMonthlyApplicants]} ON COLUMNS, 
   {[TimelineSet]}  ON ROWS 
FROM 
   [applicants]

That produces:

|          | %{measure.applicants} | avgMonthlyApplicants |
+------+---+-----------------------+----------------------+
| 2015 | 1 |                    99 |                   32 |
|      | 2 |                    80 |                   32 |
|      | 3 |                    76 |                   32 |
|      | 4 |                   112 |                   32 |
| 2016 | 1 |                   111 |                   32 |

Notice the 32 being repeated. That's evaulating [TimelineSet] in the cube context and not the existing query context.

Now with existing:

WITH set TimelineSet as
   {[applicationDate.yearQuarterMonth].[2015].[1]:[applicationDate.yearQuarterMonth].[2016].[1]}
MEMBER Measures.avgMonthlyApplicants AS 
    Avg(Descendants(Existing([TimelineSet]), [applicationDate.yearQuarterMonth].[Month]), [Measures].[applicants]) 
SELECT 
   {[Measures].[applicants],[Measures].[avgMonthlyApplicants]} ON COLUMNS, 
   {[TimelineSet]}  ON ROWS 
FROM 
   [applicants]

Results:

|          | %{measure.applicants} | avgMonthlyApplicants |
+------+---+-----------------------+----------------------+
| 2015 | 1 |                    99 |                   33 |
|      | 2 |                    80 |                   27 |
|      | 3 |                    76 |                   25 |
|      | 4 |                   112 |                   37 |
| 2016 | 1 |                   111 |                   37 |

Great that worked! But if I don't have [TimelineSet] on rows or columns then:

with set TimelineSet as
   {[applicationDate.yearQuarterMonth].[2015].[1]:[applicationDate.yearQuarterMonth].[2016].[1]}
member Measures.avgApplicants as 
   Avg(Descendants(Existing([TimelineSet]), [applicationDate.yearQuarterMonth].[Month]), [Measures].[applicants]) 
select 
   {[Measures].[applicants],[Measures].[avgApplicants]} on 0, 
   {[gender].Members}  on 1 from [applicants]
where ([TimelineSet])

Results

|                           | %{measure.applicants} | avgApplicants |
+-------------+-------------+-----------------------+---------------+
| All Genders |             |                   478 |               |
|             | Male        |                   183 |               |
|             | Female      |                   172 |               |
|             | Unspecified |                    62 |               |
|             | Not Known   |                    61 |               |

So this puts a big damper on things. I wanted to put this as a calculated measure in my schema, but I can't if it's depends on which axis things are put on.

with set TimelineSet as
   {[applicationDate.yearQuarterMonth].[2015].[1]:[applicationDate.yearQuarterMonth].[2016].[1]}
member Measures.avgApplicants as 
   Avg(Descendants([TimelineSet], [applicationDate.yearQuarterMonth].[Month]), [Measures].[applicants]) 
select 
   {[Measures].[applicants],[Measures].[avgApplicants]} on 0, 
   {[gender].Members}  on 1 from [applicants]
where ([TimelineSet])

Leaving off Existing I get what I expect:

|                           | %{measure.applicants} | avgApplicants |
+-------------+-------------+-----------------------+---------------+
| All Genders |             |                   478 |            32 |
|             | Male        |                   183 |            12 |
|             | Female      |                   172 |            11 |
|             | Unspecified |                    62 |             5 |
|             | Not Known   |                    61 |             4 |

Can Existing be more forgiving so queries are easier to write that not as flimsy and don't depend on details of the surrounding query?

Problems with Hive (need to make a fix)

HiveDialect.java needs a fix: requiresOrderByAlias() and allowsOrderByAlias() should both return false (instead of true).

Mondrian generated a code for me that did the following:

select time_by_day.the_year as c0
from time_by_day time_by_day
group by time_by_day.the_year
order by ISNULL(c0) ASC, c0

And this is wrong, because you cannot have c0 inside the "order by" - Hive doesn't support it.
As soon as I fixed it, everything started to work fine.

Using my own dataset with Mondrian

Folks,

I have my own dataset in AWS Redshift that I want to use with Mondrian.

I have setup Mondrian, and assume that I need to do the following steps:

Define and add the schema file to my tomcat web application. This would define the dimensions, facts, hierarchies and how these map to my physical table

For this purpose, I tried to use the workbench tool but cannot get it to launch. I get the following error:

Error: Could not find or load main class mondrian.gui.Workbench

I Google'd and saw this thread but the tip there doesn't help because lib/workbench.jar does not have this Java type anymore

http://forums.pentaho.com/showthread.php?72262-Can-t-start-workbench

Any help is much appreciated.

How to create dimension member with name and key ?

I didn't find how create member with key, so I used the reflection.

public static Member createHierarchyMember(Hierarchy hierarchy, String memberName, Long memberKey) {
        Member member = hierarchy.createMember(null, hierarchy.getLevels()[0], memberName, null);
        try {
            Field fieldKey = RolapMemberBase.class.getDeclaredField("key");
            fieldKey.setAccessible(true);
            int modifiers = fieldKey.getModifiers();
            Field modifierField = fieldKey.getClass().getDeclaredField("modifiers");
            modifiers = modifiers & ~Modifier.FINAL;
            modifierField.setAccessible(true);
            modifierField.setInt(fieldKey, modifiers);
            fieldKey.set(((DelegatingRolapMember) member).member, memberKey.intValue());
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        return member;
    }

How to create member with name and key using mondrian's API ?

version 3.8.0

MDX TopCount with specific where clause doesnt work

Version using : 3.7.0.0-752
When using TopCount with MDX Query as

With 
Set [Set1] As TopCount([Company].Children,5,[Measures].[Premium]) 
Select { [Measures].[Premium] } on Columns
,  [Set1] on Rows
 From [insuranceCube]
 Where { {[Date].[Month].[July 2014],[Date].[Month].[August 2014],[Date].[Month].[September 2014]}      }

The result set that is retrieved is invalid as the SQL Statments that are run against the database are

 select "insurance"."Company" as "c0", "dim_date"."Month" as "c1", sum("insurance"."Premium") as "m0" from "insurance" as "insurance", "dim_date" as "dim_date" where "insurance"."EffectiveDate_date_dim" = "dim_date"."date_key" and "dim_date"."Month" = 'September 2014' group by "insurance"."Company", "dim_date"."Month"

and then

select "insurance"."Company" as "c0", "dim_date"."Month" as "c1", sum("insurance"."Premium") as "m0" from "insurance" as "insurance", "dim_date" as "dim_date" where "insurance"."Company" in ('Auto-Owners', 'Donegal', 'Economical', 'Intact', 'Wynward') and "insurance"."EffectiveDate_date_dim" = "dim_date"."date_key" and "dim_date"."Month" in ('August 2014', 'July 2014') group by "insurance"."Company", "dim_date"."Month"

If you see the Month in Where clause 3 months are present in MDX but only the last month is used to find the TopCount and while retrieving the values, it is being retrieving for the first two months,

This issue was also logged here @ http://jira.pentaho.com/browse/MONDRIAN-814 and was resolved stating fixed in version 3.7. Please help resolve this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.