Examples of FatalStartupError


Examples of org.apache.xbean.server.main.FatalStartupError

            if (file.canRead()) {
                try {
                    // configuration file is on the local file system
                    factory = new FileSystemXmlApplicationContext(file.toURL().toString());
                } catch (MalformedURLException e) {
                    throw new FatalStartupError("Error creating url for bootstrap file", e);
                }
            } else {
                // assume it is a classpath resource
                factory = new ClassPathXmlApplicationContext(configurationFile);
            }

            // get the main service from the configuration file
            String[] names = factory.getBeanNamesForType(Main.class);
            Main main = null;
            if (names.length == 0) {
                throw new FatalStartupError("No bean of type: " + Main.class.getName() + " found in the bootstrap file: " + configurationFile, 10);
            }
            main = (Main) factory.getBean(names[0]);
            return main;
        }
        finally {
View Full Code Here

Examples of org.apache.xbean.server.main.FatalStartupError

                if (configurationName != null) {
                    kernel.startServiceRecursive(configurationName);
                    return;
                }
            } catch (Exception e) {
                throw new FatalStartupError("Error loading '" + location + "' with " + loader, e);
            }
        }
        String message = "No loaders were able to load '" + location + "' : Available loaders ";
        for (Iterator iterator = loaders.iterator(); iterator.hasNext();) {
            message += iterator.next();
            if (iterator.hasNext()) {
                message += ", ";
            }
        }
        throw new FatalStartupError(message);
    }
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.