Stephen McConnell wrote:


Jaroslaw :


Just a note to confirm that this is a Merlin problem. I've just created a tutorial entry for parameters and I'm getting the same NPE as you are. My guess is that this is a bug in the composition layer.


Problem fixed (incorrect implementation of the isParameterizable() function in the composition model impl package). Have also added tutorial sources dealing with a simple parameterizable component and the following live demo using the 20031122 build:

$ merlin http://dpml.net/merlin/tutorial/blocks/param.block -execute

[INFO ] (kernel): installing: http://dpml.net/merlin/tutorial/blocks/param.block
[INFO ] (tutorial.hello): execution
[INFO ] (tutorial.hello): initialization [magenta, relative]
[INFO ] (kernel): dissassembly phase
[INFO ] (kernel): disposal phase


A snapshot binary will be posted shortly.

Cheers, Steve.



Stephen.


Jaroslaw Palka wrote:


Hi!!!

I'm using latest merlin release (3.0 beta 1).I found strange problem
with components which are using parameters. Here's an exception:

java.lang.NullPointerException
at
com.piksar.remote.AbstractRemoteService.parameterize(AbstractRemoteService.java:72)


at
org.apache.avalon.activation.appliance.impl.DefaultAppliance.applyParameters(DefaultAppliance.java:820)


at
org.apache.avalon.activation.appliance.impl.DefaultAppliance.newInstance(DefaultAppliance.java:643)


at
org.apache.avalon.activation.lifestyle.impl.SingletonLifestyleHandler.resolve(SingletonLifestyleHandler.java:96)


at
org.apache.avalon.activation.appliance.impl.DefaultAppliance.resolve(DefaultAppliance.java:581)


at
org.apache.avalon.activation.appliance.impl.DefaultAppliance.resolve(DefaultAppliance.java:555)


at
org.apache.avalon.activation.appliance.impl.DefaultAppliance.deploy(DefaultAppliance.java:505)


at
org.apache.avalon.activation.appliance.impl.DefaultBlock.deploy(DefaultBlock.java:628)


at
org.apache.avalon.activation.appliance.impl.BlockThread.run(BlockThread.java:111)



here piece of my code:


public void parameterize(Parameters params) throws ParameterException {
_name = params.getParameter("name");
if ((_name == null) || ((_name!=null) &&(_name.trim().length() == 0)))
{
throw new ParameterException("Remote object name cannot be null or
empty");
}
}


and piece of my block.xml:

    <component name="MachineDAOServiceRemote"
class="com.piksar.vend.MachineDAOServiceRemoteImpl">
        <parameters>
            <parameter name="name" value="machineDAOService"/>
        </parameters>
    </component>

I'm sure that this is problem with params in parameterize method is null
(checked under debugger). What's wrong with it.

Jarek




--


Stephen J. McConnell
mailto:[EMAIL PROTECTED]

|------------------------------------------------|
| Magic by Merlin                                |
| Production by Avalon                           |
|                                                |
| http://avalon.apache.org/merlin                |
| http://dpml.net/                               |
|------------------------------------------------|





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to