Re-wrote all the required xml files (jbi.xml,servicemix-sa.xml and servicemix.xml)and it works fine :-)
-----Original Message----- From: Soumadeep [mailto:[EMAIL PROTECTED] Sent: Monday, April 10, 2006 11:10 PM To: servicemix-dev@geronimo.apache.org Subject: RE: Need help for auto-deploying Service Assemblies Hi Guillaume, I have tried all that you suggested but I still get the following error. Any idea when does this happen. Thanks Soumadeep ERROR: java.lang.Exception: <?xml version="1.0" encoding="UTF-8"?> <jbi-task xmlns="http://java.sun.com/xml/ns/jbi/management-message" version="1.0 "> <jbi-task-result> <frmwk-task-result> <frmwk-task-result-details> <task-result-details> <task-id>deploy</task-id> <task-result>FAILED</task-result> <message-type>ERROR</message-type> </task-result-details> </frmwk-task-result-details> </frmwk-task-result> <component-task-result xmlns="http://java.sun.com/xml/ns/jbi/management-message" > <component-name>servicemix-lwcontainer</component-name> <component-task-result-details> <task-result-details> <task-id>deploy</task-id> <task-result>FAILED</task-result> <message-type>ERROR</message-type> <task-status-msg> <msg-loc-info> <loc-token/> <loc-message>Could not deploy xbean service unit</loc-message> </msg-loc-info> </task-status-msg> <exception-info> <nesting-level>1</nesting-level> <msg-loc-info> <loc-token/> <loc-message>Can not find 'jbi' bean</lo c-message> <stack-trace><![CDATA[java.lang.Runt imeE xception: Can not find 'jbi' bean at org.apache.servicemix.lwcontainer.LwContainerXBeanDeployer.getService s(LwContainerXBeanDeployer.java:49) at org.apache.servicemix.common.xbean.AbstractXBeanDeployer.deploy(Abstr actXBeanDeployer.java:95) at org.apache.servicemix.common.BaseServiceUnitManager.doDeploy(BaseServ iceUnitManager.java:87) at org.apache.servicemix.common.BaseServiceUnitManager.deploy(BaseServic eUnitManager.java:68) at org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAs sembly(DeploymentService.java:526) at org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchi ve(AutoDeploymentService.java:257) at org.apache.servicemix.jbi.framework.AutoDeploymentService$2.run(AutoD eploymentService.java:507) at org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.ja va:291) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown So urce) at java.lang.Thread.run(Thread.java:595) Caused by: org.apache.xbean.kernel.ServiceNotFoundException at org.apache.xbean.kernel.standard.ServiceManagerRegistry.getServiceMan ager(ServiceManagerRegistry.java:201) at org.apache.xbean.kernel.standard.StandardKernel.getServiceManager(Sta ndardKernel.java:442) at org.apache.xbean.kernel.standard.StandardKernel.getService(StandardKe rnel.java:358) at org.apache.servicemix.lwcontainer.LwContainerXBeanDeployer.getService s(LwContainerXBeanDeployer.java:40) ... 9 more ]]></stack-trace> </msg-loc-info> </exception-info> </task-result-details> </component-task-result-details> </component-task-result> </jbi-task-result> </jbi-task> -----Original Message----- From: Guillaume Nodet [mailto:[EMAIL PROTECTED] Sent: Monday, April 10, 2006 2:34 AM To: servicemix-dev@geronimo.apache.org Subject: Re: Need help for auto-deploying Service Assemblies If you are writing a lightweight component (inheriting the ComponentSupport base class), you have to deploy your service unit onto the servicemix-lwcontainer component. So: 1) make sure the servicemix-lwcontainer is installed (you can just copy the servicemix-lwcontainer zip to the install dir) 2) you have to specify servicemix-lwcontainer as the target component in your SA jbi descriptor <service-unit> <identification> <name>xxx-su</name> <description>xxx-su components</description> </identification> <target> <artifacts-zip>xxx-su.zip</artifacts-zip> <component-name>servicemix-lwcontainer</component-name> </target> </service-unit> Cheers, Guillaume Nodet On 4/9/06, Soumadeep <[EMAIL PROTECTED]> wrote: > Hi, > Need some help with auto-deploying service assemblies. Is there a proper doc > somewhere, which I can refer to? > This is what I tried. > Structure of the xxx-sa.zip > xxx-sa.zip > |----------- META-IN > |------------- jbi.xml > |----------- xxx-su.zip > |------------- component > | |-----------------Xyz.class > |------------- servicemix.xml > > > The class Xyz extends ComponentSupport and implements > MessageExchangeListener. It works fine if I change the element > <sm:serviceunit id="jbi"> to <sm:container id="jbi"> in the servicemix.xml > and put it in the root dir of the new sample component that I have made. > > Would appreciate if anyone could help. > > Thanks > Soumadeep > > Console output > ============ > INFO - ComponentMBeanImpl.init(184) | Initializing component: > #SubscriptionManag > er# > INFO - DeploymentService.buildState(683) | Restoring service assemblies > INFO - JBIContainer.init(508) | ServiceMix JBI Container > (http://servicemix.org/ > ) name: ServiceMix running version: 3.0-SNAPSHOT > INFO - ComponentMBeanImpl.setInitialRunningState(335) | Setting running > state fo > r Component: servicemix-lwcontainer to Started > INFO - ComponentMBeanImpl.init(184) | Initializing component: > servicemix-lwconta > iner > INFO - AutoDeploymentService$2.run(504) | Directory: deploy: Archive > changed: pr > ocessing xxx-sa.zip ... > INFO - AutoDeploymentService.updateArchive(264) | Components xyz are not in > stalled yet - adding ServiceAssembly xxx-sa to pending list > INFO - AutoDeploymentService$2.run(508) | Directory: deploy: Finished > installati > on of archive: xbroker-sa.zip > > > > > JBI File: > ====== > <?xml version="1.0" encoding="UTF-8"?> > <jbi xmlns="http://java.sun.com/xml/ns/jbi" version="1.0" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://java.sun.com/xml/ns/jbi > C:\servicemix-test-file\jbi.xsd"> > <service-assembly> > <identification> > <name>xxx-sa</name> > <description>xxx-sa</description> > </identification> > <service-unit> > <identification> > <name>xxx-su</name> > <description>xxx-su components</description> > </identification> > <target> > <artifacts-zip>xxx-su.zip</artifacts-zip> > <component-name>xyz</component-name> > </target> > </service-unit> > </service-assembly> > </jbi> > > Servicemix.xml > ============= > <?xml version="1.0" encoding="UTF-8"?> > <beans xmlns="http://xbean.org/schemas/spring/1.0" > xmlns:sm="http://servicemix.org/config/1.0" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:foo="http://servicemix.org/demo/"> > > <classpath> > <location>.</location> > </classpath> > > <!-- the JBI container --> > <sm:serviceunit id="jbi"> > > <sm:activationSpecs> > > <!-- Create a http server binding on port 8912 and have it forward to the > foo:stockQuote --> > <sm:activationSpec componentName="httpReceiver" > service="foo:httpBinding" > destinationService="foo:xyz"> > <sm:component> > <bean class="org.apache.servicemix.components.http.HttpConnector"> > <!-- <property name="host" value="localhost"/> --> > <property name="host" value="localhost"/> > <property name="port" value="8912"/> > </bean> > </sm:component> > </sm:activationSpec> > > <!-- This just invokes another service --> > <sm:activationSpec componentName="xyz" > service="foo:xyz" > destinationService="foo:stockQuote">> > <sm:component> > <bean class="component.Xyz"> > </bean> > </sm:component> > </sm:activationSpec> > <!-- This just invokes another service --> > <sm:activationSpec componentName="stockQuote" > service="foo:stockQuote"> > <sm:component> > <bean class="org.apache.servicemix.components.saaj.SaajBinding"> > <property name="soapEndpoint"> > <bean class="javax.xml.messaging.URLEndpoint"> > <constructor-arg value="http://64.124.140.30/soap"/> > </bean> > </property> > </bean> > </sm:component> > > </sm:activationSpec> > </sm:activationSpecs> > > </sm:serviceunit> > > </beans> > > servicemix.xml - for the root directory when used with auto-deploy/ ant task > ======================================================= > <?xml version="1.0" encoding="UTF-8"?> > <beans xmlns:sm="http://servicemix.apache.org/config/1.0"> > > <!-- the JBI container --> > <sm:container id="jbi" > useMBeanServer="true" > createMBeanServer="true" > installationDirPath="./install" > deploymentDirPath="./deploy" > monitorInstallationDirectory="true" > dumpStats="true" > statsInterval="10"> > > <sm:activationSpecs> > </sm:activationSpecs> > </sm:container> > > </beans> > > > >