对元数据问题进行故障排除

时间:2019-06-27 13:20:27

标签: pentaho

我在Pentaho中有一个元数据层。我正在使用Pentaho元数据编辑器来编辑元数据。当我导出元数据并将其发布到双服务器时,双服务器无法刷新元数据,并告诉我“已重新加载0个解决方案的报告元数据。”

在服务器日志中,尝试处理元数据时会有一个堆栈跟踪:

ERROR [org.pentaho.platform.plugin.services.metadata.MetadataDomainRepository] !MetadataPublisher.ERROR_0001_COULD_NOT_LOAD!
java.lang.NullPointerException
        at org.pentaho.metadata.model.LogicalModel.findLogicalTable(LogicalModel.java:146)
        at org.pentaho.metadata.util.XmiParser.parseXmi(XmiParser.java:1238)
        at org.pentaho.platform.plugin.services.metadata.MetadataDomainRepository.loadMetadata(MetadataDomainRepository.java:225)
        at org.pentaho.platform.plugin.services.metadata.MetadataDomainRepository.reloadLegacyDomains(MetadataDomainRepository.java:187)
        at org.pentaho.platform.plugin.services.metadata.MetadataDomainRepository.reloadDomains(MetadataDomainRepository.java:126)
        at org.pentaho.platform.plugin.services.metadata.SessionCachingMetadataDomainRepository.reloadDomains(SessionCachingMetadataDomainRepository.java:219)
        at org.pentaho.platform.engine.services.metadata.MetadataPublisher.publish(MetadataPublisher.java:73)
        at org.pentaho.platform.engine.core.system.BasePublisher.publish(BasePublisher.java:37)
        at org.pentaho.platform.engine.core.system.PentahoSystem.publish(PentahoSystem.java:881)
        at org.pentaho.mantle.server.MantleServlet.refreshMetadata(MantleServlet.java:195)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:562)
        at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:188)
        at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:224)
        at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

代码的相关部分似乎是XmiParser中的方法。这是相关代码:

if (dimensionedObject != null)
      {
        NodeList bizcols = dimensionedObject.getElementsByTagName("CWMMDB:DimensionedObject");
        LogicalColumn col;
        String pcol;
        for (int i = 0; i < bizcols.getLength(); i++)
        {
          Element bizcol = (Element)bizcols.item(i);
          col = new LogicalColumn();
          col.setId(bizcol.getAttribute("name"));
          xmiConceptMap.put(bizcol.getAttribute("xmi.id"), col);
          bindParentConcept(bizcol, domain, col);

          Map<String, String> nvp = getKeyValuePairs(bizcol, "CWM:TaggedValue", "tag", "value");
          String biztbl = (String)nvp.get("BUSINESS_COLUMN_BUSINESS_TABLE");
          pcol = (String)nvp.get("BUSINESS_COLUMN_PHYSICAL_COLUMN_NAME");

// the next line with the LogicalTable is line 1238 which crashes!!!!!

          LogicalTable parent = logicalModel.findLogicalTable(biztbl);
          if (parent != null)
          {
            col.setLogicalTable(parent);
            parent.addLogicalColumn(col);
            for (IPhysicalColumn phycol : parent.getPhysicalTable().getPhysicalColumns()) {
              if (phycol.getId().equals(pcol))
              {
                col.setPhysicalColumn(phycol);
                break;
              }
            }
          }
        }
      }

当我浏览导出的xml文件并搜索“ BUSINESS_COLUMN_BUSINESS_TABLE”或“ BUSINESS_COLUMN_PHYSICAL_COLUMN_NAME”时,发现接近10,000个匹配项(导出的元数据大20 MB,并且有数百个表)。那么,如何查找损坏的表或元数据映射? stacktrace没有给出在我的元数据层中无效的行号。我导出的元数据xml文件确实将xmllint传递为有效xml。

0 个答案:

没有答案
相关问题