Package org.pentaho.reporting.libraries.base.boot

Examples of org.pentaho.reporting.libraries.base.boot.ModuleInitializeException


    final URL metaDataSource = ObjectUtilities.getResource
        ("org/pentaho/reporting/engine/classic/core/metadata/meta-elements.xml", ElementMetaDataParser.class);
    if (metaDataSource == null)
    {
      throw new ModuleInitializeException("Error: Could not find the core element meta-data description file");
    }
    try
    {
      ElementTypeRegistry.getInstance().registerFromXml(metaDataSource);
    }
    catch (Exception e)
    {
      logger.debug("Failed:", e);
      throw new ModuleInitializeException("Error: Could not parse the element meta-data description file", e);
    }

    final URL expressionMetaSource = ObjectUtilities.getResource
        ("org/pentaho/reporting/engine/classic/core/function/meta-expressions.xml", ElementMetaDataParser.class);
    if (expressionMetaSource == null)
    {
      throw new ModuleInitializeException("Error: Could not find the core expression meta-data description file");
    }
    try
    {
      ExpressionRegistry.getInstance().registerFromXml(expressionMetaSource);
    }
    catch (Exception e)
    {
      logger.debug("Failed:", e);
      throw new ModuleInitializeException("Error: Could not parse the expression meta-data description file", e);
    }

    final URL dataFactoryMetaSource = ObjectUtilities.getResource
        ("org/pentaho/reporting/engine/classic/core/metadata/meta-datafactory.xml", ElementMetaDataParser.class);
    if (dataFactoryMetaSource == null)
    {
      throw new ModuleInitializeException("Error: Could not find the core dataFactory meta-data description file");
    }
    try
    {
      DataFactoryRegistry.getInstance().registerFromXml(dataFactoryMetaSource);
    }
    catch (Exception e)
    {
      logger.debug("Failed:", e);
      throw new ModuleInitializeException("Error: Could not parse the datafactory meta-data description file", e);
    }

    final URL reportPreProcessorMetaSource = ObjectUtilities.getResource
        ("org/pentaho/reporting/engine/classic/core/metadata/meta-report-preprocessors.xml", ElementMetaDataParser.class);
    if (reportPreProcessorMetaSource == null)
    {
      throw new ModuleInitializeException("Error: Could not find the core report-preprocessor meta-data description file");
    }
    try
    {
      ReportPreProcessorRegistry.getInstance().registerFromXml(reportPreProcessorMetaSource);
    }
    catch (Exception e)
    {
      logger.debug("Failed:", e);
      throw new ModuleInitializeException("Error: Could not parse the report-preprocessor meta-data description file", e);
    }
  }
View Full Code Here


  public static void initializeOptionalReportPreProcessorMetaData(final String source) throws ModuleInitializeException
  {
    final URL reportPreProcessorMetaSource = ObjectUtilities.getResource(source, ElementMetaDataParser.class);
    if (reportPreProcessorMetaSource == null)
    {
      throw new ModuleInitializeException("Error: Could not find the core report-preprocessor meta-data description file");
    }
    try
    {
      ReportPreProcessorRegistry.getInstance().registerFromXml(reportPreProcessorMetaSource);
    }
    catch (Exception e)
    {
      logger.debug("Failed:", e);
      throw new ModuleInitializeException("Error: Could not parse the report-preprocessor meta-data description file", e);
    }
  }
View Full Code Here

  {
    final URL expressionMetaSource = ObjectUtilities.getResource
        (source, ElementMetaDataParser.class);
    if (expressionMetaSource == null)
    {
      throw new ModuleInitializeException("Error: Could not find the expression meta-data description file");
    }
    try
    {
      ExpressionRegistry.getInstance().registerFromXml(expressionMetaSource);
    }
    catch (Exception e)
    {
      logger.debug("Failed:", e);
      throw new ModuleInitializeException("Error: Could not parse the expression meta-data description file", e);
    }
  }
View Full Code Here

  public static void initializeOptionalElementMetaData(final String source) throws ModuleInitializeException
  {
    final URL metaDataSource = ObjectUtilities.getResource(source, ElementMetaDataParser.class);
    if (metaDataSource == null)
    {
      throw new ModuleInitializeException("Error: Could not find the optional element meta-data description file");
    }
    try
    {
      ElementTypeRegistry.getInstance().registerFromXml(metaDataSource);
    }
    catch (Exception e)
    {
      logger.debug("Failed:", e);
      throw new ModuleInitializeException("Error: Could not parse the element meta-data description file", e);
    }

  }
View Full Code Here

  public static void initializeOptionalDataFactoryMetaData(final String source) throws ModuleInitializeException
  {
    final URL expressionMetaSource = ObjectUtilities.getResource(source, ElementMetaDataParser.class);
    if (expressionMetaSource == null)
    {
      throw new ModuleInitializeException("Error: Could not find the datafactory meta-data description file");
    }
    try
    {
      DataFactoryRegistry.getInstance().registerFromXml(expressionMetaSource);
    }
    catch (Exception e)
    {
      logger.debug("Failed:", e);
      throw new ModuleInitializeException("Error: Could not parse the datafactory meta-data description file", e);
    }
  }
View Full Code Here

  {
    final URL expressionMetaSource = ObjectUtilities.getResource
        ("org/pentaho/jfreereport/legacy/meta-expressions.xml", LegacyFunctionsModule.class);
    if (expressionMetaSource == null)
    {
      throw new ModuleInitializeException("Error: Could not find the expression meta-data description file");
    }
    try
    {
      ExpressionRegistry.getInstance().registerFromXml(expressionMetaSource);
    }
    catch (Exception e)
    {
      throw new ModuleInitializeException("Error: Could not parse the element meta-data description file", e);
    }

  }
View Full Code Here

          baseDirectoryFile = new File(homeDirectory, baseDirectory);
        }
      }
      catch (Exception e)
      {
        throw new ModuleInitializeException
            ("Failed to create the file config storage.", e); //$NON-NLS-1$
      }
    }

    if (baseDirectoryFile.exists() == false)
    {
      if (baseDirectoryFile.mkdirs() == false)
      {
        throw new ModuleInitializeException
            ("Unable to create the specified directory."); //$NON-NLS-1$
      }
    }
    else
    {
      if (baseDirectoryFile.canRead() == false ||
          baseDirectoryFile.canWrite() == false)
      {
        throw new ModuleInitializeException
            ("Unable to access the specified directory."); //$NON-NLS-1$
      }
    }
    return baseDirectoryFile;
  }
View Full Code Here

      final ClassLoader loader = ObjectUtilities.getClassLoader(getClass());
      Class.forName("org.mozilla.javascript.Context", false, loader);
    }
    catch (Exception e)
    {
      throw new ModuleInitializeException("Unable to load the Rhino scripting framework class. " +
              "This class is required to execute the RhinoExpressions.");
    }

    final URL expressionMetaSource = ObjectUtilities.getResource
        ("org/pentaho/reporting/engine/classic/extensions/modules/rhino/meta-expressions.xml", RhinoModule.class);
    if (expressionMetaSource == null)
    {
      throw new ModuleInitializeException("Error: Could not find the expression meta-data description file");
    }
    try
    {
      ExpressionRegistry.getInstance().registerFromXml(expressionMetaSource);
    }
    catch (Exception e)
    {
      throw new ModuleInitializeException("Error: Could not parse the element meta-data description file", e);
    }

  }
View Full Code Here

      // I'm not going through and fix that now.
      logger.debug("Failed to init Kettle", e);

      // Should not happen, as there is no code in that method that could possibly raise
      // a Kettle exception.
      throw new ModuleInitializeException("Failed to initialize Kettle");
    }

    ElementMetaDataParser.initializeOptionalDataFactoryMetaData
        ("org/pentaho/reporting/engine/classic/extensions/datasources/kettle/meta-datafactory.xml");
View Full Code Here

      // I'm not going through and fix that now.
      logger.debug("Failed to init Pentaho Metadata", e);

      // Should not happen, as there is no code in that method that could possibly raise
      // a Kettle exception.
      throw new ModuleInitializeException("Failed to initialize Kettle");
    }

    ElementMetaDataParser.initializeOptionalDataFactoryMetaData
        ("org/pentaho/reporting/engine/classic/extensions/datasources/pmd/meta-datafactory.xml");
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.libraries.base.boot.ModuleInitializeException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.