Earlier, when i was not using JMX, a similar exception was getting thrown.
So just look at JMX as just one simple component which is trying to check
whether the component ("Myclass") is in commissionable state or not. I had
thought that this should be in commissionable state as its reference was
retrieved using serviceManager.lookup call
-Aseem
----- Original Message -----
From: "Stephen McConnell" <[EMAIL PROTECTED]>
To: "Avalon framework users" <[EMAIL PROTECTED]>
Sent: Tuesday, April 20, 2004 6:55 PM
Subject: Re: serviceManager.lookup call
>
> Your using the code in avalon-components/facilites/jmx?
>
> Stephen.
>
> Aseem Bansal wrote:
>
> > Here is one of the stack trace that is thrown because the object is
> > in-commisionable state.
> >
> > Here is what is happening in this part of the code.
> >
> > - JMX Management handler (a component) is trying to register "Myclass"
as
> > MBean with the MBean server.
> >
> > - But before that, it checks whether the object is in commissionable
state
> > and then this exception is thrown :(
> >
> >
> > java.lang.IllegalStateException: Cannot respond to resolve request as
the
> > appliance appliance:/tutorial/Myclass is in a non-commissioned state.
> > at
> >
org.apache.avalon.activation.impl.DefaultAppliance.resolve(DefaultAppliance.
> > java:162)
> > at
> >
org.apache.avalon.activation.impl.DefaultRuntime.resolve(DefaultRuntime.java
> > :119)
> > at
> >
org.apache.avalon.composition.model.impl.DefaultSystemContext.resolve(Defaul
> > tSystemContext.java:395)
> > at
> >
org.apache.avalon.composition.model.impl.DefaultDeploymentModel.resolve(Defa
> > ultDeploymentModel.java:159)
> > at
> >
org.apache.avalon.jmx.spi.AbstractComponentRegistrationManager.register(Abst
> > ractComponentRegistrationManager.java:64)
> > at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
> > at
> >
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> > .java:25)
> > at java.lang.reflect.Method.invoke(Method.java:324)
> > at
> >
org.apache.avalon.activation.impl.ApplianceInvocationHandler.invoke(Applianc
> > eInvocationHandler.java:126)
> > at $Proxy10.register(Unknown Source)
> > at
> >
org.apache.avalon.jmx.handler.JmxManagementHandler.processModel(JmxManagemen
> > tHandler.java:147)
> > at
> >
org.apache.avalon.jmx.handler.JmxManagementHandler.modelAdded(JmxManagementH
> > andler.java:105)
> > at
> >
org.apache.avalon.composition.model.impl.DefaultContainmentModel.fireModelAd
> > dedEvent(DefaultContainmentModel.java:864)
> > at
> >
org.apache.avalon.composition.model.impl.DefaultContainmentModel.addModel(De
> > faultContainmentModel.java:850)
> > at
> >
org.apache.avalon.composition.model.impl.DefaultContainmentModel.addModel(De
> > faultContainmentModel.java:598)
> > at
> >
org.apache.avalon.composition.model.impl.DefaultContainmentModelAssemblyHelp
> > er.findServiceProvider(DefaultContainmentModelAssemblyHelper.java:363)
> > at
> >
org.apache.avalon.composition.model.impl.DefaultContainmentModelAssemblyHelp
> > er.findServiceProvider(DefaultContainmentModelAssemblyHelper.java:332)
> > at
> >
org.apache.avalon.composition.model.impl.DefaultContainmentModel.getModel(De
> > faultContainmentModel.java:763)
> > at
tutorial.util.AvalonUtilities.createComponent(AvalonUtilities.java:54)
> > at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
> > at
> >
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> > .java:25)
> > at java.lang.reflect.Method.invoke(Method.java:324)
> > at
> >
org.apache.avalon.activation.impl.ApplianceInvocationHandler.invoke(Applianc
> > eInvocationHandler.java:126)
> > at $Proxy2.createComponent(Unknown Source)
> > at tutorial.MyManager.createMyclass(MyManager.java:77)
> > at tutorial.MyManager.getMyClass(MyManager.java:173)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
> >
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> > )
> > at
> >
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> > .java:25)
> > at java.lang.reflect.Method.invoke(Method.java:324)
> > at
> >
org.apache.avalon.activation.impl.ApplianceInvocationHandler.invoke(Applianc
> > eInvocationHandler.java:126)
> > at $Proxy7.getMyClass(Unknown Source)
> > at tutorial.MyManager.execute(MyManager.java:115)
> > at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
> > at
> >
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> > .java:25)
> > at java.lang.reflect.Method.invoke(Method.java:324)
> > at
> >
org.apache.avalon.activation.impl.ApplianceInvocationHandler.invoke(Applianc
> > eInvocationHandler.java:126)
> > at $Proxy9.execute(Unknown Source)
> > at tutorial.ExServiceManager.execute(ExServiceManager.java:158)
> > at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
> > at
> >
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> > .java:25)
> > at java.lang.reflect.Method.invoke(Method.java:324)
> > at
> >
org.apache.avalon.activation.impl.ApplianceInvocationHandler.invoke(Applianc
> > eInvocationHandler.java:126)
> > at $Proxy14.execute(Unknown Source)
> > at tutorial.Hello2._execute(Hello2.java:221)
> > at tutorial.Hello2.execute(Hello2.java:190)
> > at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
> > at
> >
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> > .java:25)
> > at java.lang.reflect.Method.invoke(Method.java:324)
> > at
> >
org.apache.avalon.activation.impl.ApplianceInvocationHandler.invoke(Applianc
> > eInvocationHandler.java:126)
> > at $Proxy13.execute(Unknown Source)
> > at tutorial.cm.def.ClientWorker.execute(ClientWorker.java:67)
> > at tutorial.tm.Executable.run(Executable.java:110)
> > at tutorial.tm.def.KeThread.run(KeThread.java:185)
> > at java.lang.Thread.run(Thread.java:536)
> >
> >
> > ----- Original Message -----
> > From: "Stephen McConnell" <[EMAIL PROTECTED]>
> > To: "Avalon framework users" <[EMAIL PROTECTED]>
> > Sent: Tuesday, April 20, 2004 5:02 PM
> > Subject: Re: serviceManager.lookup call
> >
> >
> >
> >>Aseem Bansal wrote:
> >>
> >>
> >>>Hi,
> >>>
> >>>How can i make sure that the service looked up from the service
> >>>manager is in a commissionable state.
> >>
> >>This happens automatically.
> >>
> >>
> >>>MyService = (MyService)serviceManager.lookup("wiredService"); // I
> >>>have wired MyService to a particular implementation in block.xml.
> >>>
> >>>// Here it throws the exception MyService.doMyWork();
> >>
> >>Can you post the exception report?
> >>
> >>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]
> >>
> >>
> >>Fiorano MailServer
> >>All incoming and outgoing mails are scanned for Virus and Spam
> >>http://www.fiorano.com
> >
> >
> >
> > Fiorano MailServer
> > All incoming and outgoing mails are scanned for Virus and Spam
> > http://www.fiorano.com
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
>
> |---------------------------------------|
> | Magic by Merlin |
> | Production by Avalon |
> | |
> | http://avalon.apache.org |
> |---------------------------------------|
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> Fiorano MailServer
> All incoming and outgoing mails are scanned for Virus and Spam
> http://www.fiorano.com
Fiorano MailServer
All incoming and outgoing mails are scanned for Virus and Spam
http://www.fiorano.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]