Stephen McConnell wrote:
Jon Elson-Green wrote:
Is it possible to use AbstractMerlinTestCase with merlin.properties which alters properties merlin.deployment and merlin.override?
Absolutely - yes.
Basically I wanted to bring up the full block in a testcase, but I don't think I understand enough to spot the gotchas and it's not working.
If I start merlin normally it runs fine. If I try this test case I get a NullPointerException during initialise.
Umm, that's not good - you should not be getting an NPE. Can you post the stack trace and any merlin.properties you are using?
Sure, I'm afraid the entire context of what I've created (MUAHAHA ;) is hard to express so some things may look a little odd without the complete picture, (e.g. like why the deployment directory is ../../../target/program/water).
[DEBUG ] (kernel): state: initialized
---- exception report ----------------------------------------------------------
Exception: org.apache.avalon.merlin.KernelException
Message: Kernel startup failure.
---- cause ---------------------------------------------------------------------
Exception: org.apache.avalon.merlin.KernelException
Message: Application deployment failure.
---- cause ---------------------------------------------------------------------
Exception: org.apache.avalon.activation.appliance.DeploymentException
Message: Composite deployment failure in block: [block:/spoolmanager-test]
---- cause ---------------------------------------------------------------------
Exception: org.apache.avalon.activation.lifecycle.LifecycleException
Message: Unable to create a new component instance in appliance [/spoolmanager-test/spoolmanager] due to a component deployment failure.
---- cause ---------------------------------------------------------------------
Exception: org.apache.avalon.activation.lifecycle.LifecycleException
Message: Component initiated initialization failure.
The above message means that the error is raised within a component (not within Merlin). In this case its appears to be inside the initialization method of SpoolManager.
---- cause ---------------------------------------------------------------------
Exception: java.lang.NullPointerException
Message: null
---- stack trace ---------------------------------------------------------------
java.lang.NullPointerException
org.apache.avalon.activation.appliance.impl.CompositeBlock$BlockInvocationHandler.invoke(CompositeBlock.java:268)
$Proxy5.select(Unknown Source)
au.com.acompany.blocks.spoolmanager.SpoolManager.initialize(SpoolManager.java:107)
<snip/>
Here is my merlin.properties:
merlin.deployment=../../../target/program/water merlin.override=../../../target/program/water/conf/config.xml merlin.deployment.timeout=300000 merlin.code.security.enabled=false merlin.debug=true
Presumably the merlin.debug is on a new line?
merlin.context=../../../target/program/water
And for good measure this is the SpoolManager.java:107
Target sm = (Target) m_spoolmonitorselector.select(spoolmonitorname);
Can you do a bit of digging around to locate the null object?
Also, I'm using merlin-3.2.5 and merlin-unit-3.2.7 (3.2.6-dev was identical, 3.2.8 fails in other ways).
Just for reference .. Merlin 3.2.5 is released with merlin-unit 3.2.10.
http://www.dpml.net/merlin/jars/merlin-unit-3.2.10.jar
Cheers, Stephen.
Thanks in advance, Jon
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--
|------------------------------------------------| | Magic by Merlin | | Production by Avalon | | | | http://avalon.apache.org/merlin | | http://dpml.net/merlin/distributions/latest | |------------------------------------------------|
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
