Examples of FrameworkLogEntry


Examples of org.eclipse.osgi.framework.log.FrameworkLogEntry

      if (!(e instanceof StatusException) && (bundledata.getStatus() & Constants.BUNDLE_LAZY_START) != 0 && !testStateChanging(Thread.currentThread()))
        try {
          // only start the bundle if this is a simple CNFE
          loader.setLazyTrigger();
        } catch (BundleException be) {
          framework.adaptor.getFrameworkLog().log(new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.WARNING, 0, be.getMessage(), 0, be, null));
        }
      throw e;
    }
  }
View Full Code Here

Examples of org.eclipse.osgi.framework.log.FrameworkLogEntry

      if (Debug.DEBUG && Debug.DEBUG_GENERAL) {
        Debug.println("Error reading framework metadata: " + ex.getMessage()); //$NON-NLS-1$
        Debug.printStackTrace(ex);
      }
      String message = NLS.bind(EclipseAdaptorMsg.ECLIPSE_STARTUP_FILEMANAGER_OPEN_ERROR, ex.getMessage());
      FrameworkLogEntry logEntry = new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.ERROR, 0, message, 0, ex, null);
      adaptor.getFrameworkLog().log(logEntry);
      FrameworkProperties.setProperty(EclipseStarter.PROP_EXITCODE, "15"); //$NON-NLS-1$
      String errorDialog = "<title>" + AdaptorMsg.ADAPTOR_STORAGE_INIT_FAILED_TITLE + "</title>" + NLS.bind(AdaptorMsg.ADAPTOR_STORAGE_INIT_FAILED_MSG, baseDir) + "\n" + ex.getMessage(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
      FrameworkProperties.setProperty(EclipseStarter.PROP_EXITDATA, errorDialog);
      throw ex;
View Full Code Here

Examples of org.eclipse.osgi.framework.log.FrameworkLogEntry

    try {
      return readBundleDatas();
    } catch (Throwable t) {
      // be safe here and throw out the results and start over
      // otherwise this would result in a failed launch
      FrameworkLogEntry logEntry = new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.ERROR, 0, "Error loading bundle datas.  Recalculating cache.", 0, t, null); //$NON-NLS-1$
      adaptor.getFrameworkLog().log(logEntry);
      return null;
    }
  }
View Full Code Here

Examples of org.eclipse.osgi.framework.log.FrameworkLogEntry

      try {
        storageManager.open(!LocationManager.getConfigurationLocation().isReadOnly());
        storageManagerClosed = false;
      } catch (IOException e) {
        String message = NLS.bind(EclipseAdaptorMsg.ECLIPSE_STARTUP_FILEMANAGER_OPEN_ERROR, e.getMessage());
        FrameworkLogEntry logEntry = new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.ERROR, 0, message, 0, e, null);
        adaptor.getFrameworkLog().log(logEntry);
      }
    saveBundleDatas();
    saveStateData(shutdown);
    savePermissionStorage();
View Full Code Here

Examples of org.eclipse.osgi.framework.log.FrameworkLogEntry

  }

  private void cleanOSGiCache() {
    File osgiConfig = LocationManager.getOSGiConfigurationDir();
    if (!AdaptorUtil.rm(osgiConfig))
      adaptor.getFrameworkLog().log(new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, "The -clean (osgi.clean) option was not successful. Unable to clean the storage area: " + osgiConfig.getAbsolutePath(), 0, null, null)); //$NON-NLS-1$

  }
View Full Code Here

Examples of org.eclipse.osgi.framework.log.FrameworkLogEntry

    try {
      Class clazz = factory.getClass();
      Method setParentFactory = clazz.getMethod("setParentFactory", new Class[] {Object.class}); //$NON-NLS-1$
      setParentFactory.invoke(factory, new Object[] {getParentFactory()});
    } catch (Exception e) {
      adaptor.getFrameworkLog().log(new FrameworkLogEntry(MultiplexingFactory.class.getName(), FrameworkLogEntry.ERROR, 0, "register", FrameworkLogEntry.ERROR, e, null)); //$NON-NLS-1$
      throw new RuntimeException(e.getMessage(), e);
    }
    addFactory(factory);
  }
View Full Code Here

Examples of org.eclipse.osgi.framework.log.FrameworkLogEntry

      // this is brittle; if class does not directly extend MultplexingFactory then this method will not exist, but we do not want a public method here
      Method closeTracker = factory.getClass().getSuperclass().getDeclaredMethod("closePackageAdminTracker", null); //$NON-NLS-1$
      closeTracker.setAccessible(true); // its a private method
      closeTracker.invoke(factory, null);
    } catch (Exception e) {
      adaptor.getFrameworkLog().log(new FrameworkLogEntry(MultiplexingFactory.class.getName(), FrameworkLogEntry.ERROR, 0, "unregister", FrameworkLogEntry.ERROR, e, null)); //$NON-NLS-1$
      throw new RuntimeException(e.getMessage(), e);
    }
  }
View Full Code Here

Examples of org.eclipse.osgi.framework.log.FrameworkLogEntry

      Method register = clazz.getMethod("register", new Class[] {Object.class}); //$NON-NLS-1$   
      for (Iterator it = released.iterator(); it.hasNext();) {
        register.invoke(successor, new Object[] {it.next()});
      }
    } catch (Exception e) {
      adaptor.getFrameworkLog().log(new FrameworkLogEntry(MultiplexingFactory.class.getName(), FrameworkLogEntry.ERROR, 0, "designateSuccessor", FrameworkLogEntry.ERROR, e, null)); //$NON-NLS-1$
      throw new RuntimeException(e.getMessage(), e);
    }
    closePackageAdminTracker(); // close tracker
    return successor;
  }
View Full Code Here

Examples of org.eclipse.osgi.framework.log.FrameworkLogEntry

          Method hasAuthorityMethod = factory.getClass().getMethod("hasAuthority", new Class[] {Class.class}); //$NON-NLS-1$
          if (((Boolean) hasAuthorityMethod.invoke(factory, new Object[] {clazz})).booleanValue()) {
            return factory;
          }
        } catch (Exception e) {
          adaptor.getFrameworkLog().log(new FrameworkLogEntry(MultiplexingFactory.class.getName(), FrameworkLogEntry.ERROR, 0, "findAuthorizedURLStreamHandler-loop", FrameworkLogEntry.ERROR, e, null)); //$NON-NLS-1$
          throw new RuntimeException(e.getMessage(), e);
        }
      }
    }
    return null;
View Full Code Here

Examples of org.eclipse.osgi.framework.log.FrameworkLogEntry

        if (handlerField == null)
          throw e;
      }
      handlerField.setAccessible(true);
    } catch (Exception e) {
      factory.adaptor.getFrameworkLog().log(new FrameworkLogEntry(MultiplexingURLStreamHandler.class.getName(), "initializeMethods", FrameworkLogEntry.ERROR, e, null)); //$NON-NLS-1$
      throw new RuntimeException(e.getMessage(), e);
    }
    methodsInitialized = true;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.