Package org.xeustechnologies.jcl.exception

Examples of org.xeustechnologies.jcl.exception.JclException


                dependencies.add( JCL_FACTORY );
                dependsOn = (String[]) dependencies.toArray( new String[0] );
            }
            definition.setDependsOn( dependsOn );
        } else
            throw new JclException( "JCL Bean definition " + jclRef + "not found" );
    }
View Full Code Here


            clone = in.readObject();

            in.close();
            bos.close();
        } catch (Exception e) {
            throw new JclException( e );
        }

        return clone;
    }
View Full Code Here

                entryName += resourceFile.getName();

                if (jarEntryContents.containsKey( entryName )) {
                    if (!collisionAllowed)
                        throw new JclException( "Resource " + entryName + " already loaded" );
                    else {
                        if (logger.isLoggable( Level.FINEST ))
                            logger.finest( "Resource " + entryName + " already loaded; ignoring entry..." );
                        return;
                    }
                }

                if (logger.isLoggable( Level.FINEST ))
                    logger.finest( "Loading resource: " + entryName );

                jarEntryContents.put( entryName, content );
            }
        } catch (IOException e) {
            throw new JclException( e );
        } finally {
            try {
                fis.close();
            } catch (IOException e) {
                throw new JclException( e );
            }
        }
    }
View Full Code Here

            byte[] content = out.toByteArray();

            if (jarEntryContents.containsKey( url.toString() )) {
                if (!collisionAllowed)
                    throw new JclException( "Resource " + url.toString() + " already loaded" );
                else {
                    if (logger.isLoggable( Level.FINEST ))
                        logger.finest( "Resource " + url.toString() + " already loaded; ignoring entry..." );
                    return;
                }
            }

            if (logger.isLoggable( Level.FINEST ))
                logger.finest( "Loading remote resource." );

            jarEntryContents.put( url.toString(), content );
        } catch (IOException e) {
            throw new JclException( e );
        } finally {
            if (out != null)
                try {
                    out.close();
                } catch (IOException e) {
                    throw new JclException( e );
                }
            if (stream != null)
                try {
                    stream.close();
                } catch (IOException e) {
                    throw new JclException( e );
                }
        }
    }
View Full Code Here

            if (fis.read( content ) != -1) {
                entryName = pack + "/" + cf.getName();

                if (jarEntryContents.containsKey( entryName )) {
                    if (!collisionAllowed)
                        throw new JclException( "Class " + entryName + " already loaded" );
                    else {
                        if (logger.isLoggable( Level.FINEST ))
                            logger.finest( "Class " + entryName + " already loaded; ignoring entry..." );
                        return;
                    }
                }

                if (logger.isLoggable( Level.FINEST ))
                    logger.finest( "Loading class: " + entryName );

                jarEntryContents.put( entryName, content );
            }
        } catch (IOException e) {
            throw new JclException( e );
        } finally {
            if (fis != null)
                try {
                    fis.close();
                } catch (IOException e) {
                    throw new JclException( e );
                }
        }

    }
View Full Code Here

            loadResource( new File( url.toURI() ), "" );
        } catch (IllegalArgumentException iae) {
            // Is Remote
            loadRemoteResource( url );
        } catch (URISyntaxException e) {
            throw new JclException( "URISyntaxException", e );
        }
    }
View Full Code Here

            logger.finest( "Resource: " + path );

        File fp = new File( path );

        if (!fp.exists() && !ignoreMissingResources) {
            throw new JclException( "File/Path does not exist" );
        }

        loadResource( fp, "" );
    }
View Full Code Here

        else if (source instanceof URL)
            add( (URL) source );
        else if (source instanceof String)
            add( (String) source );
        else
            throw new JclException( "Unknown Resource type" );

    }
View Full Code Here

                logger.finest( "Removing loaded class " + className );
            classes.remove( className );
            try {
                classpathResources.unload( formatClassName( className ) );
            } catch (ResourceNotFoundException e) {
                throw new JclException( "Something is very wrong!!!"
                        + "The locally loaded classes must be in synch with ClasspathResources", e );
            }
        } else {
            try {
                classpathResources.unload( formatClassName( className ) );
            } catch (ResourceNotFoundException e) {
                throw new JclException( "Class could not be unloaded "
                        + "[Possible reason: Class belongs to the system]", e );
            }
        }
    }
View Full Code Here

            } );

            Object v = field.get( null );
            ignoredInstances.put( v, true );
        } catch (Throwable e) {
            throw new JclException( e );
        }
    }
View Full Code Here

TOP

Related Classes of org.xeustechnologies.jcl.exception.JclException

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.