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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--
Stephen J. McConnell mailto:[EMAIL PROTECTED] http://www.osm.net
Sent via James running under Merlin as an NT service. http://avalon.apache.org/sandbox/merlin
forced-error.zip
Description: Zip compressed data--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
