private ProgressObject deploy(final Target[] targetList, final Properties properties) { if (targetList == null) { return new ProgressObjectImpl(CommandType.DISTRIBUTE, new NullPointerException("targetList is null")); } if (!containsDefaultTarget(targetList)) { return new ProgressObjectImpl(CommandType.DISTRIBUTE, Collections.<TargetModuleID>emptySet()); } try { final AppInfo appInfo = getDeployer().deploy(properties); final TargetModuleID targetModuleId = toTargetModuleId(appInfo, null); return new ProgressObjectImpl(CommandType.DISTRIBUTE, Collections.singleton(targetModuleId)); } catch (ValidationFailedException e) { final String s = System.getProperty(ReportValidationResults.VALIDATION_LEVEL, "3"); final int level = Integer.parseInt(s); final ByteArrayOutputStream baos = new ByteArrayOutputStream(); final PrintStream out = new PrintStream(baos); out.println(e.getMessage()); print(e.getErrors(), out, level); print(e.getFailures(), out, level); print(e.getWarnings(), out, level); out.close(); e = new ValidationFailedException(new String(baos.toByteArray()), e); return new ProgressObjectImpl(CommandType.DISTRIBUTE, e); } catch (final OpenEJBException e) { return new ProgressObjectImpl(CommandType.DISTRIBUTE, e); } }
public AppInfo configureApplication(final File jarFile) throws OpenEJBException { logger.debug("Beginning load: " + jarFile.getAbsolutePath()); try { final AppModule appModule = deploymentLoader.load(jarFile); final AppInfo appInfo = configureApplication(appModule); // TODO This is temporary -- we need to do this in AppInfoBuilder appInfo.paths.add(appInfo.path); appInfo.paths.add(jarFile.getAbsolutePath()); return appInfo; } catch (final ValidationFailedException e) { logger.warning("configureApplication.loadFailed", jarFile.getAbsolutePath(), e.getMessage()); // DO not include the stacktrace in the message throw e; } catch (final OpenEJBException e) { // DO NOT REMOVE THE EXCEPTION FROM THIS LOG MESSAGE // removing this message causes NO messages to be printed when embedded logger.warning("configureApplication.loadFailed", e, jarFile.getAbsolutePath(), e.getMessage()); throw e; } }
sb.append("Jar failed validation: ").append(appModule.getModuleId()); for (ValidationError e : set.getErrors()) { sb.append(e.getPrefix()).append(" ... ").append(e.getComponentName()).append(":\t").append(e.getMessage(2)); for (ValidationFailure e : set.getFailures()) { sb.append(e.getPrefix()).append(" ... ").append(e.getComponentName()).append(":\t").append(e.getMessage(2));
throw new ValidationFailedException("Module failed validation. " + uberContext.getModuleType() + "(name=" + uberContext.getName() + ")", uberContext, validationFailedException);
public AppInfo configureApplication(File jarFile) throws OpenEJBException { logger.debug("Beginning load: " + jarFile.getAbsolutePath()); AppInfo appInfo; try { AppModule appModule = deploymentLoader.load(jarFile); appInfo = configureApplication(appModule); } catch (ValidationFailedException e) { logger.warning("configureApplication.loadFailed", jarFile.getAbsolutePath(), e.getMessage()); // DO not include the stacktrace in the message throw e; } catch (OpenEJBException e) { // DO NOT REMOVE THE EXCEPTION FROM THIS LOG MESSAGE // removing this message causes NO messages to be printed when embedded logger.warning("configureApplication.loadFailed", e, jarFile.getAbsolutePath(), e.getMessage()); throw e; } return appInfo; }
throw new ValidationFailedException("Module failed validation. " + uberContext.getModuleType() + "(name=" + uberContext.getName() + ")", uberContext, validationFailedException);
private ProgressObject deploy(final Target[] targetList, final Properties properties) { if (targetList == null) { return new ProgressObjectImpl(CommandType.DISTRIBUTE, new NullPointerException("targetList is null")); } if (!containsDefaultTarget(targetList)) { return new ProgressObjectImpl(CommandType.DISTRIBUTE, Collections.<TargetModuleID>emptySet()); } try { final AppInfo appInfo = getDeployer().deploy(properties); final TargetModuleID targetModuleId = toTargetModuleId(appInfo, null); return new ProgressObjectImpl(CommandType.DISTRIBUTE, Collections.singleton(targetModuleId)); } catch (ValidationFailedException e) { final String s = JavaSecurityManagers.getSystemProperty(ReportValidationResults.VALIDATION_LEVEL, "3"); final int level = Integer.parseInt(s); final ByteArrayOutputStream baos = new ByteArrayOutputStream(); final PrintStream out = new PrintStream(baos); out.println(e.getMessage()); print(e.getErrors(), out, level); print(e.getFailures(), out, level); print(e.getWarnings(), out, level); out.close(); e = new ValidationFailedException(new String(baos.toByteArray()), e); return new ProgressObjectImpl(CommandType.DISTRIBUTE, e); } catch (final OpenEJBException e) { return new ProgressObjectImpl(CommandType.DISTRIBUTE, e); } }
public AppInfo configureApplication(final File jarFile) throws OpenEJBException { logger.debug("Beginning load: " + jarFile.getAbsolutePath()); try { final AppModule appModule = deploymentLoader.load(jarFile, null); final AppInfo appInfo = configureApplication(appModule); // we need the finder for web scanning so push it to what sees TomcatWebAppBuilder, ie the info tree // this is clean up in Assembler for safety and TomcatWebAppBuilder when used if (!appModule.getWebModules().isEmpty()) { for (final WebAppInfo info : appInfo.webApps) { for (final EjbModule ejbModule : appModule.getEjbModules()) { if (ejbModule.getModuleId().equals(info.moduleId) && ejbModule.getFinder() != null) { appInfo.properties.put(info, ejbModule); } } } } // TODO This is temporary -- we need to do this in AppInfoBuilder appInfo.paths.add(appInfo.path); appInfo.paths.add(jarFile.getAbsolutePath()); return appInfo; } catch (final ValidationFailedException e) { logger.warning("configureApplication.loadFailed", jarFile.getAbsolutePath(), e.getMessage()); // DO not include the stacktrace in the message throw e; } catch (final OpenEJBException e) { // DO NOT REMOVE THE EXCEPTION FROM THIS LOG MESSAGE // removing this message causes NO messages to be printed when embedded logger.warning("configureApplication.loadFailed", e, jarFile.getAbsolutePath(), e.getMessage()); throw e; } }
validationFailedException = new ValidationFailedException("Module failed validation. "+uberContext.getModuleType()+"(path="+uberContext.getJarPath()+")", uberContext, validationFailedException);
errors.reject(ex.getMessage());
logger.warning("configureApplication.loadFailed", jarFile.getAbsolutePath(), e.getMessage()); // DO not include the stacktrace in the message throw e; } catch (final OpenEJBException e) {
logger.warning("configureApplication.loadFailed", jarFile.getAbsolutePath(), e.getMessage()); // DO not include the stacktrace in the message throw e; } catch (OpenEJBException e) { appInfo = configureApplication(collection); } catch (ValidationFailedException e) { logger.warning("configureApplication.loadFailed", id, e.getMessage()); // DO not include the stacktrace in the message throw e; } catch (OpenEJBException e) {
logger.warning("configureApplication.loadFailed", jarFile.getAbsolutePath(), e.getMessage()); // DO not include the stacktrace in the message throw e; } catch (final OpenEJBException e) {
/** * embedded usage * * @param classLoader classloader * @param id id supplied from embedded properties or null * @param jarFiles list of ejb modules * @return configured AppInfo * @throws OpenEJBException on error */ public AppInfo configureApplication(final ClassLoader classLoader, final String id, final List<File> jarFiles) throws OpenEJBException { final AppModule collection = loadApplication(classLoader, id, jarFiles); final AppInfo appInfo; try { appInfo = configureApplication(collection); } catch (final ValidationFailedException e) { logger.warning("configureApplication.loadFailed", collection.getModuleId(), e.getMessage()); // DO not include the stacktrace in the message throw e; } catch (final OpenEJBException e) { // DO NOT REMOVE THE EXCEPTION FROM THIS LOG MESSAGE // removing this message causes NO messages to be printed when embedded logger.warning("configureApplication.loadFailed", e, collection.getModuleId(), e.getMessage()); throw e; } return appInfo; }
/** * embedded usage * * @param classLoader classloader * @param id id supplied from embedded properties or null * @param jarFiles list of ejb modules * @return configured AppInfo * @throws OpenEJBException on error */ public AppInfo configureApplication(final ClassLoader classLoader, final String id, final List<File> jarFiles) throws OpenEJBException { final AppModule collection = loadApplication(classLoader, id, jarFiles); final AppInfo appInfo; try { appInfo = configureApplication(collection); } catch (final ValidationFailedException e) { logger.warning("configureApplication.loadFailed", collection.getModuleId(), e.getMessage()); // DO not include the stacktrace in the message throw e; } catch (final OpenEJBException e) { // DO NOT REMOVE THE EXCEPTION FROM THIS LOG MESSAGE // removing this message causes NO messages to be printed when embedded logger.warning("configureApplication.loadFailed", e, collection.getModuleId(), e.getMessage()); throw e; } return appInfo; }
logger().warning("configureApplication.loadFailed", appModule.getModuleId(), e.getMessage()); // DO not include the stacktrace in the message
logger().warning("configureApplication.loadFailed", appModule.getModuleId(), e.getMessage()); // DO not include the stacktrace in the message