Package xeus.jcl.exception

Examples of xeus.jcl.exception.JclException


                    continue;
                }

                if( jarEntryContents.containsKey( jarEntry.getName() ) ) {
                    if( !Configuration.supressCollisionException() )
                        throw new JclException( "Class/Resource " + jarEntry.getName() + " already loaded" );
                    else {
                        if( logger.isTraceEnabled() )
                            logger
                                    .trace( "Class/Resource " + jarEntry.getName()
                                            + " already loaded; ignoring entry..." );
View Full Code Here


            in.close();
            bos.close();

            return clone;
        } catch (IOException e) {
            throw new JclException( e );
        } catch (ClassNotFoundException cnfe) {
            throw new JclException( cnfe );
        }
    }
View Full Code Here

        byte[] content = new byte[(int) resourceFile.length()];
        fis.read( content );

        if( jarEntryContents.containsKey( resourceFile.getName() ) ) {
            if( !Configuration.supressCollisionException() )
                throw new JclException( "Resource " + resourceFile.getName() + " already loaded" );
            else {
                if( logger.isTraceEnabled() )
                    logger.trace( "Resource " + resourceFile.getName() + " already loaded; ignoring entry..." );
                return;
            }
View Full Code Here

        byte[] content = out.toByteArray();

        if( jarEntryContents.containsKey( url.toString() ) ) {
            if( !Configuration.supressCollisionException() )
                throw new JclException( "Resource " + url.toString() + " already loaded" );
            else {
                if( logger.isTraceEnabled() )
                    logger.trace( "Resource " + url.toString() + " already loaded; ignoring entry..." );
                return;
            }
View Full Code Here

        String entryName = pack + "/" + cf.getName();

        if( jarEntryContents.containsKey( entryName ) ) {
            if( !Configuration.supressCollisionException() )
                throw new JclException( "Class " + entryName + " already loaded" );
            else {
                if( logger.isTraceEnabled() )
                    logger.trace( "Class " + entryName + " already loaded; ignoring entry..." );
                return;
            }
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

            else if( resource instanceof URL )
                add( (URL) resource );
            else if( resource instanceof String )
                add( (String) resource );
            else
                throw new JclException( "Unknown Resource type" );
        }
    }
View Full Code Here

                logger.trace( "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

TOP

Related Classes of xeus.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.