Tabnine Logo
Embedder.handleError
Code IndexAdd Tabnine to your IDE (free)

How to use
handleError
method
in
org.apache.openejb.loader.Embedder

Best Java code snippets using org.apache.openejb.loader.Embedder.handleError (Showing top 3 results out of 315)

origin: org.apache.geronimo.ext.openejb/openejb-loader

private void checkOpenEjbHome(File openejbHome) throws Exception {
  try {
    String homePath = openejbHome.getAbsolutePath();
    // The openejb.home must exist
    if (!openejbHome.exists())
      handleError(BAD_HOME + homePath, NOT_THERE, INSTRUCTIONS);
    // The openejb.home must be a directory
    if (!openejbHome.isDirectory())
      handleError(BAD_HOME + homePath, NOT_DIRECTORY, INSTRUCTIONS);
    // The openejb.home must contain a 'lib' directory
    File openejbHomeLibs = new File(openejbHome, "lib");
    if (!openejbHomeLibs.exists())
      handleError(BAD_HOME + homePath, NO_LIBS, INSTRUCTIONS);
    // The openejb.home there must be openejb*.jar files in the 'dist'
    // directory
    String[] libs = openejbHomeLibs.list();
    boolean found = false;
    for (int i = 0; i < libs.length && !found; i++) {
      found = (libs[i].startsWith("openejb-") && libs[i].endsWith(".jar"));
    }
    if (!found)
      handleError(BAD_HOME + homePath, NO_LIBS, INSTRUCTIONS);
  } catch (Exception e) {
    e.printStackTrace();
  }
}
origin: org.apache.openejb/openejb-loader

private void checkOpenEjbHome(final File openejbHome) throws Exception {
  try {
    final String homePath = openejbHome.getAbsolutePath();
    // The openejb.home must exist
    if (!openejbHome.exists()) {
      handleError(BAD_HOME + homePath, NOT_THERE, INSTRUCTIONS);
    }
    // The openejb.home must be a directory
    if (!openejbHome.isDirectory()) {
      handleError(BAD_HOME + homePath, NOT_DIRECTORY, INSTRUCTIONS);
    }
    // The openejb.home must contain a 'lib' directory
    final File openejbHomeLibs = new File(openejbHome, "lib");
    if (!openejbHomeLibs.exists()) {
      handleError(BAD_HOME + homePath, NO_LIBS, INSTRUCTIONS);
    }
    // The openejb.home there must be openejb*.jar files in the 'dist'
    // directory
    final String[] libs = openejbHomeLibs.list();
    boolean found = false;
    for (int i = 0; i < libs.length && !found; i++) {
      found = (libs[i].startsWith("openejb-") && libs[i].endsWith(".jar"));
    }
    if (!found) {
      handleError(BAD_HOME + homePath, NO_LIBS, INSTRUCTIONS);
    }
  } catch (final Exception e) {
    e.printStackTrace();
  }
}
origin: org.apache.tomee/openejb-loader

private void checkOpenEjbHome(final File openejbHome) throws Exception {
  try {
    final String homePath = openejbHome.getAbsolutePath();
    // The openejb.home must exist
    if (!openejbHome.exists()) {
      handleError(BAD_HOME + homePath, NOT_THERE, INSTRUCTIONS);
    }
    // The openejb.home must be a directory
    if (!openejbHome.isDirectory()) {
      handleError(BAD_HOME + homePath, NOT_DIRECTORY, INSTRUCTIONS);
    }
    // The openejb.home must contain a 'lib' directory
    final File openejbHomeLibs = new File(openejbHome, "lib");
    if (!openejbHomeLibs.exists()) {
      handleError(BAD_HOME + homePath, NO_LIBS, INSTRUCTIONS);
    }
    // The openejb.home there must be openejb*.jar files in the 'dist'
    // directory
    final String[] libs = openejbHomeLibs.list();
    boolean found = false;
    for (int i = 0; i < libs.length && !found; i++) {
      found = (libs[i].startsWith("openejb-") && libs[i].endsWith(".jar"));
    }
    if (!found) {
      handleError(BAD_HOME + homePath, NO_LIBS, INSTRUCTIONS);
    }
  } catch (final Exception e) {
    e.printStackTrace();
  }
}
org.apache.openejb.loaderEmbedderhandleError

Popular methods of Embedder

  • checkOpenEjbHome
  • forcefulLoad
  • load
    Loads the Class object for the className.
  • <init>
  • init
    Uses reflection to invoke the init(Properties props) method on the loaderClass field

Popular in Java

  • Reactive rest calls using spring rest template
  • getSharedPreferences (Context)
  • setContentView (Activity)
  • onCreateOptionsMenu (Activity)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now