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

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


      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");
    }

    DataFactoryXmlResourceFactory.register(KettleDataSourceXmlFactoryModule.class);

    DataFactoryReadHandlerFactory.getInstance().setElementHandler(KettleDataFactoryModule.NAMESPACE, "kettle-datasource", KettleDataSourceReadHandler.class);
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");
    }

    DataFactoryXmlResourceFactory.register(PmdDataSourceXmlFactoryModule.class);
    DataFactoryXmlResourceFactory.register(SimplePmdDataSourceXmlFactoryModule.class);
View Full Code Here

  public void initialize(final SubSystem subSystem)
      throws ModuleInitializeException
  {
    if (AbstractModule.isClassLoadable("com.lowagie.text.Document", BaseFontModule.class) == false)
    {
      throw new ModuleInitializeException("Unable to load iText classes. " +
          "Check your classpath configuration.");
    }

    if ("onInit".equals(subSystem.getGlobalConfig().getConfigProperty
        ("org.pentaho.reporting.engine.classic.core.modules.output.support.itext.AutoInit")))
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 URL expressionMetaSource = ObjectUtilities.getResource
        ("org/pentaho/reporting/engine/classic/extensions/drilldown/drilldown-profile.xml", DrillDownModule.class);
    if (expressionMetaSource == null)
    {
      throw new ModuleInitializeException("Error: Could not find the drilldown meta-data description file");
    }
    register(expressionMetaSource);

    final URL customizedMetaSource = ObjectUtilities.getResource("drilldown-profile.xml", DrillDownModule.class);
    if (customizedMetaSource != null)
View Full Code Here

    {
      DrillDownProfileMetaData.getInstance().registerFromXml(expressionMetaSource);
    }
    catch (Exception e)
    {
      throw new ModuleInitializeException("Error: Could not parse the drilldown meta-data description file", e);
    }
  }
View Full Code Here

          ("org.hsqldb.jdbcDriver", SampleDataModuleInitializer.class, Driver.class);
      populateDatabase(driver);
    }
    catch (Exception e)
    {
      throw new ModuleInitializeException("Failed to load the HSQL-DB driver", e);
    }

    ElementMetaDataParser.initializeOptionalDataFactoryMetaData
        ("org/pentaho/reporting/engine/classic/extensions/datasources/sampledata/meta-datafactory.xml");
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: " + source);
    }
    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 initializeOptionalReportProcessTaskMetaData(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-process-task meta-data description file: " + source);
    }
    try
    {
      ReportProcessTaskRegistry.getInstance().registerFromXml(reportPreProcessorMetaSource);
    }
    catch (Exception e)
    {
      logger.debug("Failed:", e);
      throw new ModuleInitializeException("Error: Could not parse the report-process-task meta-data description file", e);
    }
  }
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.