Package org.lilyproject.runtime

Examples of org.lilyproject.runtime.LilyRTException


        public URL getURL() {
            String path = "jar:" + file.toURI().toString() + "!/" + jarEntry.getName();
            try {
                return new URL(path);
            } catch (MalformedURLException e) {
                throw new LilyRTException("Error constructing URL for jar file entry " + path, e);
            }
        }
View Full Code Here


            ModuleSource newModuleSource = createModuleSource(location, moduleSourceType);
            moduleSource = new SharedModuleSource(newModuleSource, this, key);
            moduleSources.put(key, moduleSource);
        } else {
            if (getType(moduleSource.getDelegate()) != moduleSourceType) {
                throw new LilyRTException("The same module location was requested earlier but with a different type. Type 1: " + getType(moduleSource) + ", type 2: " + moduleSourceType);
            }
        }
        moduleSource.increaseRefCount();
        return moduleSource;
    }
View Full Code Here

    private String getKey(File location) {
        try {
            return location.getCanonicalFile().getAbsolutePath();
        } catch (IOException e) {
            throw new LilyRTException("Error making key for module source location " + location, e);
        }
    }
View Full Code Here

                    break;
                case SOURCE_DIRECTORY:
                    moduleSource = new MavenSourceDirectoryModuleSource(location, fam);
                    break;
                default:
                    throw new LilyRTException("Unexpected module definition type: " + location);
            }
            return moduleSource;
        } catch (Throwable t) {
            throw new ModuleSourceCreationException("Creating a module source from " + location + " of type " + moduleSourceType + " failed.", t);
        }
View Full Code Here

        } else if (moduleSource instanceof ExpandedJarModuleSource) {
            return ModuleSourceType.EXPANDED_JAR;
        } else if (moduleSource instanceof MavenSourceDirectoryModuleSource) {
            return ModuleSourceType.SOURCE_DIRECTORY;
        } else {
            throw new LilyRTException("Unrecognized module source implementation: " + moduleSource.getClass().getName());
        }
    }
View Full Code Here

    }

    protected synchronized void dispose(SharedModuleSource moduleSource) throws Exception {
        // Remove from list of managed module sources
        if (moduleSources.remove(moduleSource.getKey()) == null) {
            throw new LilyRTException("Unexpected situation: disposed module source not found.");
        }

        // perform disposal of actual module source
        moduleSource.getDelegate().dispose();
    }
View Full Code Here

            InputStream is = null;
            try {
                is = new FileInputStream(file);
                sourceLocations = new SourceLocations(is, file.getParent());
            } catch (Throwable t) {
                throw new LilyRTException("Problem reading source locations property file.", t);
            } finally {
                IOUtils.closeQuietly(is);
            }
        } else {
            sourceLocations = new SourceLocations();
View Full Code Here

TOP

Related Classes of org.lilyproject.runtime.LilyRTException

Copyright © 2018 www.massapicom. 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.