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. ---- 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) org.apache.avalon.activation.appliance.impl.DefaultAppliance.applyInitialization(DefaultAppliance.java:991) org.apache.avalon.activation.appliance.impl.DefaultAppliance.access$1300(DefaultAppliance.java:109) org.apache.avalon.activation.appliance.impl.DefaultAppliance$StandardFactory.newInstance(DefaultAppliance.java:1320) org.apache.avalon.activation.lifestyle.impl.SingletonLifestyleHandler.refreshReference(SingletonLifestyleHandler.java:138) org.apache.avalon.activation.lifestyle.impl.SingletonLifestyleHandler.resolve(SingletonLifestyleHandler.java:88) org.apache.avalon.activation.appliance.impl.DefaultAppliance.resolve(DefaultAppliance.java:583) org.apache.avalon.activation.appliance.impl.DefaultAppliance.deploy(DefaultAppliance.java:519) org.apache.avalon.activation.appliance.impl.AbstractBlock.deploy(AbstractBlock.java:712) org.apache.avalon.activation.appliance.impl.BlockThread.run(BlockThread.java:111) --------------------------------------------------------------------------------
[junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 7.395 sec [junit] [ERROR] TEST au.com.acompany.blocks.StoreTestCase FAILED
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
merlin.context=../../../target/program/water
And for good measure this is the SpoolManager.java:107
Target sm = (Target) m_spoolmonitorselector.select(spoolmonitorname);
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).
Thanks in advance, Jon
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
