at $Proxy6.getMemberByUniqueName(Unknown Source)
at mondrian.rolap.RolapSchema.createRole(RolapSchema.java:781)
at mondrian.rolap.RolapSchema.load(RolapSchema.java:582)
at mondrian.rolap.RolapSchema.load(RolapSchema.java:436)
at mondrian.rolap.RolapSchema.<init>(RolapSchema.java:234)
at mondrian.rolap.RolapSchema.<init>(RolapSchema.java:225)
at mondrian.rolap.RolapSchema$Pool.get(RolapSchema.java:1094)
at mondrian.rolap.RolapSchema$Pool.get(RolapSchema.java:900)
at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:160)
at mondrian.rolap.RolapConnection.<init>(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 mondrian.web.servlet.MdxQueryServlet.processRequest(MdxQueryServlet.java:85)
at mondrian.web.servlet.MdxQueryServlet.doGet(MdxQueryServlet.java:238)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:298)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at mondrian.rolap.RolapUtil$1.invoke(RolapUtil.java:98)
... 33 more
Caused by: mondrian.olap.MondrianException: Mondrian Error:Member '[Region D].[云南省].[昆明市]' not found
at mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:939)
at mondrian.olap.Util.lookupCompound(Util.java:876)
at mondrian.rolap.RolapSchemaReader.lookupCompoundInternal(RolapSchemaReader.java:426)
at mondrian.rolap.RolapSchemaReader.lookupCompound(RolapSchemaReader.java:411)
at mondrian.rolap.RolapCube$RolapCubeSchemaReader.getMemberByUniqueName(RolapCube.java:2894)
at mondrian.rolap.RolapSchemaReader.getMemberByUniqueName(RolapSchemaReader.java:371)
... 38 more
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at mondrian.rolap.RolapUtil$1.invoke(RolapUtil.java:98)
at $Proxy6.getMemberByUniqueName(Unknown Source)
at mondrian.rolap.RolapSchema.createRole(RolapSchema.java:781)
at mondrian.rolap.RolapSchema.load(RolapSchema.java:582)
at mondrian.rolap.RolapSchema.load(RolapSchema.java:436)
at mondrian.rolap.RolapSchema.<init>(RolapSchema.java:234)
at mondrian.rolap.RolapSchema.<init>(RolapSchema.java:225)
at mondrian.rolap.RolapSchema$Pool.get(RolapSchema.java:1094)
at mondrian.rolap.RolapSchema$Pool.get(RolapSchema.java:900)
at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:160)
at mondrian.rolap.RolapConnection.<init>(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 mondrian.web.servlet.MdxQueryServlet.processRequest(MdxQueryServlet.java:85)
at mondrian.web.servlet.MdxQueryServlet.doGet(MdxQueryServlet.java:238)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:298)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: mondrian.olap.MondrianException: Mondrian Error:Member '[Region D].[云南省].[昆明市]' not found
at mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:939)
at mondrian.olap.Util.lookupCompound(Util.java:876)
at mondrian.rolap.RolapSchemaReader.lookupCompoundInternal(RolapSchemaReader.java:426)
at mondrian.rolap.RolapSchemaReader.lookupCompound(RolapSchemaReader.java:411)
at mondrian.rolap.RolapCube$RolapCubeSchemaReader.getMemberByUniqueName(RolapCube.java:2894)
at mondrian.rolap.RolapSchemaReader.getMemberByUniqueName(RolapSchemaReader.java:371)
... 38 more
mondrian.olap.MondrianException: Mondrian Error:Member '[Region D].[云南省].[昆明市]' not found
at mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:939)
at mondrian.olap.Util.lookupCompound(Util.java:876)
at mondrian.rolap.RolapSchemaReader.lookupCompoundInternal(RolapSchemaReader.java:426)
at mondrian.rolap.RolapSchemaReader.lookupCompound(RolapSchemaReader.java:411)
at mondrian.rolap.RolapCube$RolapCubeSchemaReader.getMemberByUniqueName(RolapCube.java:2894)
at mondrian.rolap.RolapSchemaReader.getMemberByUniqueName(RolapSchemaReader.java:371)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at mondrian.rolap.RolapUtil$1.invoke(RolapUtil.java:98)
at $Proxy6.getMemberByUniqueName(Unknown Source)
at mondrian.rolap.RolapSchema.createRole(RolapSchema.java:781)
at mondrian.rolap.RolapSchema.load(RolapSchema.java:582)
at mondrian.rolap.RolapSchema.load(RolapSchema.java:436)
at mondrian.rolap.RolapSchema.<init>(RolapSchema.java:234)
at mondrian.rolap.RolapSchema.<init>(RolapSchema.java:225)
at mondrian.rolap.RolapSchema$Pool.get(RolapSchema.java:1094)
at mondrian.rolap.RolapSchema$Pool.get(RolapSchema.java:900)
at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:160)
at mondrian.rolap.RolapConnection.<init>(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 mondrian.web.servlet.MdxQueryServlet.processRequest(MdxQueryServlet.java:85)
at mondrian.web.servlet.MdxQueryServlet.doGet(MdxQueryServlet.java:238)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:298)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
原因:把数据从Oracle迁移到MySQL后,导致D_Region表的字段PARENTID一些在Oracle中值为NULL行在导入到MySQL后
变成了空值(即''),而在MDX Schema中又采用如下配置
<Dimension name="Region D" caption="区域" foreignKey="REGION_ID">
<Hierarchy hasAll="true" allMemberName="All Regions D" allMemberCaption="云南省" primaryKey="ID">
<Table name="D_REGION"/>
<Level name="Region Id" uniqueMembers="true" type="Numeric" column="ID"
nameColumn="NAME" parentColumn="PARENTID" nullParentValue="null">
<Closure parentColumn="PARENT_ID" childColumn="ID">
<Table name="C_REGION_CLOSURE"/>
</Closure>
<Property name="Name" column="NAME"/>
<Property name="Div Level" column="DIVLEVEL"/>
</Level>
</Hierarchy>
</Dimension>
红字部分导致MDX语句在MySQL中获取'[Region D].[云南省].[昆明市]'的Member找不到父节点标识。
解决:把MySQL中表D_REGION中所有PARENTID为空的字段改为一个特殊标识值,如-1。
然后,更改MDX Schema为如下配置
......
nullParentValue="-1"
......