private void releaseWagon( String protocol, Wagon wagon ) { try { container.release( wagon ); } catch ( ComponentLifecycleException e ) { logger.error( "Problem releasing wagon - ignoring: " + e.getMessage() ); logger.debug( "", e ); } }
logger.warn( "Failed to lookup lifecycle participants: " + e.getMessage() ); logger.warn( "Failed to lookup lifecycle participants: " + e.getMessage() );
public String getMessage() { return getCause().getMessage(); } }
throw new ComponentLookupException( "Unable to lookup component '" + componentManager.getRole() + "', it could not be created.", componentManager.getRole(), componentManager.getRoleHint(), componentManager.getRealm(), e ); throw new ComponentLookupException( "Unable to lookup component '" + componentManager.getRole() + "', it could not be started.", componentManager.getRole(), componentManager.getRoleHint(), componentManager.getRealm(), e );
protected void startComponentLifecycle(Object component, ClassRealm realm) throws ComponentLifecycleException { try { componentManager.start(component); } catch (PhaseExecutionException e) { throw new ComponentLifecycleException("Error starting component", e); } }
Throwable cause = e.getCause(); while ( cause != null && !( cause instanceof LinkageError ) && !( cause instanceof ClassNotFoundException ) )
protected <T> T lookup( Class<T> componentClass, String roleHint ) throws ComponentLookupRuntimeException { try { return getContainer().lookup( componentClass, roleHint ); } catch ( ComponentLookupException e ) { throw new ComponentLookupRuntimeException( e ); } }
/** * Allows us to pull the ArchiverManager instance out of the container without causing a chicken-and-egg * instantiation/composition problem. */ @Override public void contextualize( final Context context ) throws ContextException { final PlexusContainer container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY ); try { archiverManager = (ArchiverManager) container.lookup( ArchiverManager.ROLE ); } catch ( final ComponentLookupException e ) { throw new ContextException( "Error retrieving ArchiverManager instance: " + e.getMessage(), e ); } }
protected void releaseAllCallback() { if ( components != null ) { try { container.releaseAll( components ); } catch ( ComponentLifecycleException e ) { logger.debug( "Error releasing components in active collection: " + e.getMessage(), e ); } components = null; } }
if ( componentManagerFactory == null ) throw new ComponentLookupException( "Unsupported instantiation strategy: " + instantiationStrategy, role, roleHint, throw new ComponentLookupException( "Undefined lifecycle handler: " + descriptor.getLifecycleHandler(), role, roleHint,
protected void endComponentLifecycle( Object component ) throws ComponentLifecycleException { ClassRealm contextRealm = componentContextRealms.remove( component ); if ( contextRealm == null ) { contextRealm = container.getLookupRealm( component ); } try { getLifecycleHandler().end( component, this, contextRealm ); } catch ( PhaseExecutionException e ) { throw new ComponentLifecycleException( "Error ending component lifecycle", e ); } }
protected <T> T lookup( Class<T> componentClass ) throws ComponentLookupRuntimeException { try { return getContainer().lookup( componentClass ); } catch ( ComponentLookupException e ) { throw new ComponentLookupRuntimeException( e ); } }
public void initialize() throws InitializationException { try { dispatcher = (DefaultSecDispatcher) plexusContainer.lookup( SecDispatcher.class, "maven" ); } catch ( ComponentLookupException e ) { throw new InitializationException( e.getMessage(), e ); } }
protected void releaseAllCallback() { if ( components != null ) { try { container.releaseAll( components ); } catch ( ComponentLifecycleException e ) { logger.debug( "Error releasing components in active collection: " + e.getMessage(), e ); } components = null; } } }
throw new ComponentLookupException("ComponentRegistry is not active", role, roleHint ); if ( descriptor == null ) throw new ComponentLookupException( "Component descriptor cannot be found in the component repository", role,
throw new ComponentLifecycleException("Error constructing component " + descriptor.getHumanReadableKey(), e); } catch (LinkageError e) { throw new ComponentLifecycleException("Error constructing component " + descriptor.getHumanReadableKey(), e); } finally { Thread.currentThread().setContextClassLoader(oldClassLoader);
protected Object lookup( String componentKey ) { try { return getContainer().lookup( componentKey ); } catch ( ComponentLookupException e ) { throw new ComponentLookupRuntimeException( e ); } }
public AbstractPrivilegeTest() { try { this.init(); } catch (ComponentLookupException e) { Assert.fail(e.getMessage()); } }
protected void startComponentLifecycle( Object component, ClassRealm realm ) throws ComponentLifecycleException { try { componentManager.getLifecycleHandler().start( component, componentManager, realm ); } catch ( PhaseExecutionException e ) { throw new ComponentLifecycleException( "Error starting component", e ); } }
protected Object lookup( String role, String roleHint ) throws ComponentLookupRuntimeException { try { return getContainer().lookup( role, roleHint ); } catch ( ComponentLookupException e ) { throw new ComponentLookupRuntimeException( e ); } }