You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Peter Klotz <pe...@blue-elephant-systems.com> on 2006/04/27 11:25:21 UTC

servicemix-eip

Hi,

in order to use the new servicemix-eip JBI component the docu on
http://servicemix.org/servicemix-eip talks about two ways of deployment, one
using a xbean.xml and one using servicemix.xml.

When using a xbean.xml one has to deploy the SU to servicemix-eip but one cannot
define the beans that are refered in the routing slips really? These would have
to be deployed in a separate SU that uses servicemix-lwcontainer, right?
Because when one tries to deploy a servicemix.xml one gets

<loc-message>Target component servicemix-eip for service unit midas-warouter
does not accept deployments</loc-message>


The other mode using servicemix.xml is deployed to a servicemix-lwcontainer only
and can contain both the eip endpoints as well as the beans that refered in the
routing slips such as the example in
servicemix-eip/src/test/resources/org/apache/servicemix/eip/spring.xml?
In this case one would still have to install the
install/servicemix-eip-3.0-SNAPSHOT.zip though?

In this case I get the strange error message:

<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>start</task-id>
                        <task-result>FAILED</task-result>
                        <message-type>ERROR</message-type>
                        <task-status-msg>
<msg-loc-info>
<loc-token/>
<loc-message>Unable to start service unit</loc-message>
</msg-loc-info>
</task-status-msg>
                        <exception-info>
                                <nesting-level>1</nesting-level>
                                <msg-loc-info>
                                        <loc-token/>
                                        <loc-message>Component name:
servicemix-eip is bound to an object which is not a JBI component, it is of
type: javax.xml.namespace.QName</loc-message>

<stack-trace><![CDATA[java.lang.IllegalArgumentException: Component name:
servicemix-eip is bound to an object which is not a JBI component, it is of
type: javax.xml.namespace.QName
        at
org.apache.servicemix.jbi.container.JBIContainer.activateComponent(JBIContainer.java:896)
        at
org.apache.servicemix.lwcontainer.LwContainerEndpoint.activate(LwContainerEndpoint.java:52)
        at org.apache.servicemix.common.ServiceUnit.start(ServiceUnit.java:45)
        at
org.apache.servicemix.common.BaseServiceUnitManager.start(BaseServiceUnitManager.java:148)
        at
org.apache.servicemix.jbi.framework.ServiceUnitLifeCycle.start(ServiceUnitLifeCycle.java:102)
        at
org.apache.servicemix.jbi.framework.ServiceAssemblyLifeCycle.start(ServiceAssemblyLifeCycle.java:129)
        at
org.apache.servicemix.jbi.framework.DeploymentService.start(DeploymentService.java:373)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:259)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService$2.run(AutoDeploymentService.java:507)
        at
org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
Source)
        at java.lang.Thread.run(Thread.java:534)
]]></stack-trace>
                                </msg-loc-info>
                        </exception-info>
                </task-result-details>
        </component-task-result-details>
</component-task-result>

The servicemix.xml:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:sm="http://servicemix.apache.org/config/1.0"
  xmlns:eip="http://servicemix.apache.org/eip/1.0"
  xmlns:bes="http://blue-elephant-systems.com/midas/servicemix/1.0">
...

  <!-- the JBI container -->
  <sm:serviceunit id="jbi">
    <sm:activationSpecs>
...
      <!-- output using a POJO -->
      <sm:activationSpec id="servicemix-eip">
        <sm:component>
          <eip:component>
            <eip:endpoints>

              <eip:static-routing-slip service="bes:usermgmt" endpoint="endpoint">
                <eip:targets>
                  <eip:exchange-target service="bes:auditing" />
                  <eip:exchange-target service="bes:usermgmt-filter" />
                </eip:targets>
              </eip:static-routing-slip>

...


Thanks, Peter

Re: servicemix-eip

Posted by Guillaume Nodet <gn...@gmail.com>.
Sorry about that.
This should now be fixed in svn.

Cheers,
Guillaume Nodet

On 4/27/06, Peter Klotz <pe...@blue-elephant-systems.com> wrote:
> Hi Guillaume,
>
> Guillaume Nodet wrote:
> [...]
> >> When using a xbean.xml one has to deploy the SU to servicemix-eip but one cannot
> >> define the beans that are refered in the routing slips really? These would have
> >> to be deployed in a separate SU that uses servicemix-lwcontainer, right?
> >> Because when one tries to deploy a servicemix.xml one gets
> >
> > Right
>
> ok, so here is a xbean.xml that is deployed to the component servicemix-eip
>
> --- SU xbean.xml
>
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns:eip="http://servicemix.apache.org/eip/1.0"
>   xmlns:bes="http://blue-elephant-systems.com/midas/servicemix/1.0">
>
>   <eip:wire-tap service="bes:request-start" endpoint="endpoint">
>     <eip:target>
>       <eip:exchange-target service="bes:dispatcher"/>
>     </eip:target>
>     <eip:inListener>
>       <eip:exchange-target service="bes:request-audit"/>
>     </eip:inListener>
>   </eip:wire-tap>
> ...
> </beans>
>
> --- SA jbi.xml
>
> <jbi xmlns="http://java.sun.com/xml/ns/jbi" version="1.0">
>   <service-assembly>
>     <identification>
>       <name>midas-becore</name>
>       <description>MIDAS Core Backend</description>
>     </identification>
> ...
>     <service-unit>
>       <identification>
>         <name>midas-bedispatch</name>
>         <description>MIDAS Request Dispatching</description>
>       </identification>
>       <target>
>         <artifacts-zip>midas-bedispatch-su.zip</artifacts-zip>
>         <component-name>servicemix-eip</component-name>
>       </target>
>     </service-unit>
>   </service-assembly>
> </jbi>
> ---
>
> But still the error is saying that it does not accept deployments:
>
> <jbi-task version="1.0" xmlns="http://java.sun.com/xml/ns/jbi/management-message">
> <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-status-msg>
> <msg-loc-info>
> <loc-token/>
> <loc-message>Target component servicemix-eip for service unit midas-wadispatch
> does not accept deployments</loc-message>
> </msg-loc-info>
> </task-status-msg>
> </task-result-details>
> </frmwk-task-result-details>
> </frmwk-task-result>
> </jbi-task-result>
> </jbi-task>
>
>         at
> org.apache.servicemix.jbi.framework.ManagementSupport.failure(ManagementSupport.java:120)
>         at
> org.apache.servicemix.jbi.framework.ManagementSupport.failure(ManagementSupport.java:102)
>         at
> org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:483)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:257)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService$2.run(AutoDeploymentService.java:507)
>         at
> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
>         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
> Source)
>         at java.lang.Thread.run(Thread.java:534)
> 27 Apr 2006 13:01:03,850 [Thread-25] DEBUG (AbstractFlow.java [resume]:144) -
> Called Flow resume
> 27 Apr 2006 13:01:03,851 [Thread-25] WARN  (AutoDeploymentService.java
> [run]:511) - Directory: deploy: Automatic install of
> /home/pak/sandbox/incubator-servicemix-3.0-SNAPSHOT/deploy/midas-wacore-sa.zip
> failed
> javax.jbi.management.DeploymentException: Failed to update Service Assembly:
> midas-wacore
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:272)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService$2.run(AutoDeploymentService.java:507)
>         at
> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
>         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
> Source)
>         at java.lang.Thread.run(Thread.java:534)
> Caused by: java.lang.Exception: <?xml version="1.0" encoding="UTF-8"?>
>
>
> Can you help please?
>
> Peter
>
>

Re: servicemix-eip

Posted by Peter Klotz <pe...@blue-elephant-systems.com>.
Hi Guillaume,

Guillaume Nodet wrote:
[...]
>> When using a xbean.xml one has to deploy the SU to servicemix-eip but one cannot
>> define the beans that are refered in the routing slips really? These would have
>> to be deployed in a separate SU that uses servicemix-lwcontainer, right?
>> Because when one tries to deploy a servicemix.xml one gets
> 
> Right

ok, so here is a xbean.xml that is deployed to the component servicemix-eip

--- SU xbean.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:eip="http://servicemix.apache.org/eip/1.0"
  xmlns:bes="http://blue-elephant-systems.com/midas/servicemix/1.0">

  <eip:wire-tap service="bes:request-start" endpoint="endpoint">
    <eip:target>
      <eip:exchange-target service="bes:dispatcher"/>
    </eip:target>
    <eip:inListener>
      <eip:exchange-target service="bes:request-audit"/>
    </eip:inListener>
  </eip:wire-tap>
...
</beans>

--- SA jbi.xml

<jbi xmlns="http://java.sun.com/xml/ns/jbi" version="1.0">
  <service-assembly>
    <identification>
      <name>midas-becore</name>
      <description>MIDAS Core Backend</description>
    </identification>
...
    <service-unit>
      <identification>
        <name>midas-bedispatch</name>
        <description>MIDAS Request Dispatching</description>
      </identification>
      <target>
        <artifacts-zip>midas-bedispatch-su.zip</artifacts-zip>
        <component-name>servicemix-eip</component-name>
      </target>
    </service-unit>
  </service-assembly>
</jbi>
---

But still the error is saying that it does not accept deployments:

<jbi-task version="1.0" xmlns="http://java.sun.com/xml/ns/jbi/management-message">
<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-status-msg>
<msg-loc-info>
<loc-token/>
<loc-message>Target component servicemix-eip for service unit midas-wadispatch
does not accept deployments</loc-message>
</msg-loc-info>
</task-status-msg>
</task-result-details>
</frmwk-task-result-details>
</frmwk-task-result>
</jbi-task-result>
</jbi-task>

        at
org.apache.servicemix.jbi.framework.ManagementSupport.failure(ManagementSupport.java:120)
        at
org.apache.servicemix.jbi.framework.ManagementSupport.failure(ManagementSupport.java:102)
        at
org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:483)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:257)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService$2.run(AutoDeploymentService.java:507)
        at
org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
Source)
        at java.lang.Thread.run(Thread.java:534)
27 Apr 2006 13:01:03,850 [Thread-25] DEBUG (AbstractFlow.java [resume]:144) -
Called Flow resume
27 Apr 2006 13:01:03,851 [Thread-25] WARN  (AutoDeploymentService.java
[run]:511) - Directory: deploy: Automatic install of
/home/pak/sandbox/incubator-servicemix-3.0-SNAPSHOT/deploy/midas-wacore-sa.zip
failed
javax.jbi.management.DeploymentException: Failed to update Service Assembly:
midas-wacore
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:272)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService$2.run(AutoDeploymentService.java:507)
        at
org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
Source)
        at java.lang.Thread.run(Thread.java:534)
Caused by: java.lang.Exception: <?xml version="1.0" encoding="UTF-8"?>


Can you help please?

Peter

Re: servicemix-eip

Posted by Guillaume Nodet <gn...@gmail.com>.
On 4/27/06, Peter Klotz <pe...@blue-elephant-systems.com> wrote:
> Hi,
>
> in order to use the new servicemix-eip JBI component the docu on
> http://servicemix.org/servicemix-eip talks about two ways of deployment, one
> using a xbean.xml and one using servicemix.xml.
>
> When using a xbean.xml one has to deploy the SU to servicemix-eip but one cannot
> define the beans that are refered in the routing slips really? These would have
> to be deployed in a separate SU that uses servicemix-lwcontainer, right?
> Because when one tries to deploy a servicemix.xml one gets

Right

>
> <loc-message>Target component servicemix-eip for service unit midas-warouter
> does not accept deployments</loc-message>
>
>
> The other mode using servicemix.xml is deployed to a servicemix-lwcontainer only
> and can contain both the eip endpoints as well as the beans that refered in the
> routing slips such as the example in
> servicemix-eip/src/test/resources/org/apache/servicemix/eip/spring.xml?
> In this case one would still have to install the
> install/servicemix-eip-3.0-SNAPSHOT.zip though?

This mode is not really meant to be use on the lightweight container,
but in the main servicemix.xml configuration file (even if it should
work).
In such a case, you have to extract the jar files inside the
servicemix-eip.zip and put them in the lib directory of the ServiceMix
container so that they are inside the classpath.

When you install a component, a specific classloader is created for
this component use and jars are not available to other components (the
servicemix-lwcontainer in this case).

The error you see is meaningless (due to a bug in xbean) but is
usually due to the needed jar not being in the classpath.

Cheers,
Guillaume Nodet

>
> In this case I get the strange error message:
>
> <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>start</task-id>
>                         <task-result>FAILED</task-result>
>                         <message-type>ERROR</message-type>
>                         <task-status-msg>
> <msg-loc-info>
> <loc-token/>
> <loc-message>Unable to start service unit</loc-message>
> </msg-loc-info>
> </task-status-msg>
>                         <exception-info>
>                                 <nesting-level>1</nesting-level>
>                                 <msg-loc-info>
>                                         <loc-token/>
>                                         <loc-message>Component name:
> servicemix-eip is bound to an object which is not a JBI component, it is of
> type: javax.xml.namespace.QName</loc-message>
>
> <stack-trace><![CDATA[java.lang.IllegalArgumentException: Component name:
> servicemix-eip is bound to an object which is not a JBI component, it is of
> type: javax.xml.namespace.QName
>         at
> org.apache.servicemix.jbi.container.JBIContainer.activateComponent(JBIContainer.java:896)
>         at
> org.apache.servicemix.lwcontainer.LwContainerEndpoint.activate(LwContainerEndpoint.java:52)
>         at org.apache.servicemix.common.ServiceUnit.start(ServiceUnit.java:45)
>         at
> org.apache.servicemix.common.BaseServiceUnitManager.start(BaseServiceUnitManager.java:148)
>         at
> org.apache.servicemix.jbi.framework.ServiceUnitLifeCycle.start(ServiceUnitLifeCycle.java:102)
>         at
> org.apache.servicemix.jbi.framework.ServiceAssemblyLifeCycle.start(ServiceAssemblyLifeCycle.java:129)
>         at
> org.apache.servicemix.jbi.framework.DeploymentService.start(DeploymentService.java:373)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:259)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService$2.run(AutoDeploymentService.java:507)
>         at
> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
>         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
> Source)
>         at java.lang.Thread.run(Thread.java:534)
> ]]></stack-trace>
>                                 </msg-loc-info>
>                         </exception-info>
>                 </task-result-details>
>         </component-task-result-details>
> </component-task-result>
>
> The servicemix.xml:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns:sm="http://servicemix.apache.org/config/1.0"
>   xmlns:eip="http://servicemix.apache.org/eip/1.0"
>   xmlns:bes="http://blue-elephant-systems.com/midas/servicemix/1.0">
> ...
>
>   <!-- the JBI container -->
>   <sm:serviceunit id="jbi">
>     <sm:activationSpecs>
> ...
>       <!-- output using a POJO -->
>       <sm:activationSpec id="servicemix-eip">
>         <sm:component>
>           <eip:component>
>             <eip:endpoints>
>
>               <eip:static-routing-slip service="bes:usermgmt" endpoint="endpoint">
>                 <eip:targets>
>                   <eip:exchange-target service="bes:auditing" />
>                   <eip:exchange-target service="bes:usermgmt-filter" />
>                 </eip:targets>
>               </eip:static-routing-slip>
>
> ...
>
>
> Thanks, Peter
>
>