avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kristian meier <kristian.me...@jentro.com>
Subject Re: [merlin] exception gets swallowed in avalon lifecycle methods, or how can I get them into the debug log ?
Date Tue, 24 Jun 2003 14:41:39 GMT
Hi Steve,

exchanging your block.xml with the attached file will show the behavior 
I saw before.

Kristian

PS: I like you little test-case, for such a little thing I was too 
unorganized yet ;-)

Stephen McConnell wrote:

>
>
> kristian meier wrote:
>
>> Hi Steve,
>>
>>   if I do something like this merlin just starts as without any 
>> complains, but should give some info when
>> using in the debug mode.
>>
>> public void start() throws Exception
>>        {
>>            if (started)
>>                throw new IllegalStateException("Already started");
>>             if (!started) throw new Exception("force error!");
>>            new Thread(this).start();
>>            started = true;
>>        }
>
>
>
> If your not seeing a complaint, chances are that you component is not 
> declaring that it implements startable.  Attached is a little test 
> case that demonstrates the sort of complaints you should be seeing:
>
> $ maven jar
>
> You should see a bunch a build messages then the folowing runtime 
> deployment test.
>
> merlin:deploy:
>    [echo] Merlin block deployment.
>    [echo] From jar: 
> F:\dev\avalon-sandbox\merlin-test\forced-error/target/merlin-test-forced-error- 
>
> 1.0.jar
> [INFO   ] (hello): starting
> [ERROR  ] (sys): Root block installation failure.
> -------------------------------------------------------------------
> Exception: org.apache.avalon.merlin.kernel.KernelException
> Message: Unable to deploy block.
> Block: /
>
> Cause: org.apache.avalon.merlin.block.BlockException
> Message: Could not establish a subsidiary appliance: 
> [appliance://hello] in block: [block://]
>
> Cause: org.apache.avalon.assembly.locator.LocatorException
> Message: Resolution failure in appliance: [appliance://hello]
>
> Cause: org.apache.avalon.assembly.locator.LocatorException
> Message: Singleton object access failure.
>
> Cause: org.apache.avalon.assembly.lifestyle.LifestyleException
> Message: Unable to create new instance for appliance: [appliance://hello]
>
> Cause: org.apache.avalon.assembly.lifecycle.DeploymentException
> Message: Component deployment failure in appliance: [appliance://hello]
>
> Cause: java.lang.IllegalStateException
> Message: force-error
> -------------------------------------------------------------------
>
> Cheers, Stece.
>
>>
>>
>>
>> the  DefaultDeploymentService class does throw the correct exception 
>> like:
>> throw new DeploymentException( error, e );
>>
>> how can I get them into the debug log ?
>>
>> best wishes Kristian
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
>> For additional commands, e-mail: dev-help@avalon.apache.org
>>
>>
>>
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
>For additional commands, e-mail: dev-help@avalon.apache.org
>

Mime
View raw message