Hi

Here's a ex.getCause().printStackTrace() result

java.lang.IllegalStateException: Illegal attempt to resolve an service from
a no
n-deployed appliance [appliance:/mrt-vend-client/LocationViewContainerImpl].
        at
org.apache.avalon.activation.appliance.impl.DefaultAppliance.resolve(
DefaultAppliance.java:577)
        at
org.apache.avalon.activation.appliance.impl.DefaultServiceManager.loo
kup(DefaultServiceManager.java:146)
        at
com.mrt.vend.client.desktop2.view.AbstractView.initialize(AbstractVie
w.java:39)
        at
org.apache.avalon.activation.appliance.impl.DefaultAppliance.applyIni
tialization(DefaultAppliance.java:988)
        at
org.apache.avalon.activation.appliance.impl.DefaultAppliance.access$1
300(DefaultAppliance.java:109)
        at
org.apache.avalon.activation.appliance.impl.DefaultAppliance$Standard
Factory.newInstance(DefaultAppliance.java:1317)
        at
org.apache.avalon.activation.lifestyle.impl.SingletonLifestyleHandler
.refreshReference(SingletonLifestyleHandler.java:138)
        at
org.apache.avalon.activation.lifestyle.impl.SingletonLifestyleHandler
.resolve(SingletonLifestyleHandler.java:88)
        at
org.apache.avalon.activation.appliance.impl.DefaultAppliance.resolve(
DefaultAppliance.java:580)
        at
org.apache.avalon.activation.appliance.impl.DefaultAppliance.deploy(D
efaultAppliance.java:516)
        at
org.apache.avalon.activation.appliance.impl.AbstractBlock.deploy(Abst
ractBlock.java:655)
        at
org.apache.avalon.activation.appliance.impl.BlockThread.run(BlockThre
ad.java:111)

In our application components have dependency to parent container
(component), in initialize() we call lookup("parentContainer") and then we
call method add on parent container(component). Our container(component)
tree has root component which hasn't parent (but in another application
(block.xml) it can have parent).So we would like to call hasService() to
check if there is parentContainer.I found that there is attribute called
"optional" in type meta-info but setting this to "true" doesn't work.


----- Original Message ----- 
From: "Stephen McConnell" <[EMAIL PROTECTED]>
To: "Avalon framework users" <[EMAIL PROTECTED]>
Sent: Wednesday, February 25, 2004 4:47 PM
Subject: Re: hasService() and lookup() inconsistent results


Jarosław Pałka wrote:

> Could you help us? Is it a problem with merlin or we are using it in wrong
way?

The log will contain an error report.  The report will contain a summary
of the exception stack and normally the stack trace of the actual causal
exception.  In your case, the typical reason for an exception on lookup
is a result of a lookup on a lazy component (i.e. the component that is
providing the service has not been deployed and your seeing a deployment
error).

If you post the error report the problem will be more easily identifiable.

Cheers, Stephen.


-- 

|------------------------------------------------|
| 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]


Wiecej faktow! >>> http://link.interia.pl/f17c1






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

Reply via email to