List of usage examples for org.springframework.beans BeansException printStackTrace
public void printStackTrace(PrintStream s)
From source file:org.yamj.filescanner.FileScanner.java
private ExitType execute(CmdLineParser parser) { ExitType status;//from www.jav a 2s. co m try { ApplicationContext applicationContext = new ClassPathXmlApplicationContext("yamj3-filescanner.xml"); ScannerManagement scannerManagement = (ScannerManagement) applicationContext .getBean("scannerManagement"); status = scannerManagement.runScanner(parser); } catch (BeansException ex) { LOG.error("Failed to load scanner configuration"); ex.printStackTrace(System.err); status = CONFIG_ERROR; } return status; }
From source file:org.archive.crawler.BasicProfileTest.java
protected void testProfileDirectory(File srcDir) throws Exception { System.out.println("\nNow testing " + srcDir.getName()); File tmpDir = new File(getTmpDir(), "validatorTest"); File configDir = new File(tmpDir, srcDir.getName()); org.archive.util.FileUtils.ensureWriteableDirectory(configDir); FileUtils.copyDirectory(srcDir, configDir); PathSharingContext ac = null;/* ww w.ja v a 2 s . c om*/ try { File config = new File(configDir, "profile-crawler-beans.cxml"); ac = new PathSharingContext("file:" + config.getAbsolutePath()); } catch (BeansException be) { be.printStackTrace(System.err); } finally { assertNotNull("profile not buildable", ac); ac.validate(); assertEquals("did not get the expected one error", 1, ac.getAllErrors().size()); ac.destroy(); } }