If you use service units, you should not copy the jms component jar in the
lib folder, as the exception you obtain is expected in such a case.

The error is caused your SU pom that has dependencies on two different JBI
components (servicemix-jms and servicemix-bean).  In your case (this is
indicated in the exception thrown when deploying), the servicemix-bean is
the target for your JMS su and does not understand the xbean.xml.
To fix this, remove the dependency on servicemix-bean, or add a property to
your pom to specify explicitely the component:

 <properties>
  <componentName>servicemix-jms</componentName>
</properties>

On Jan 4, 2008 5:01 PM, Wilson Freitas <[EMAIL PROTECTED]> wrote:

> Hi,
>
> I found some posts about this problem, but all of them are related to LW
> containers and this is not my case.
>
> I am trying to deploy a simple SA that contains 2 SU's. One of them
> contains a cxf-bc component and the other one contains a jms component.
> The
> deployment of cxf-bc SU works fine, but the JMS deployment crashes.
>
> When I run mvn install jbi:projectDeploy I get the following error:
>
> ==============================================================
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Unable to deploy project, Error accessing ServiceMix administration
> <?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-cxf-bc</component-name>
>        <component-task-result-details>
>                <task-result-details>
>                        <task-id>deploy</task-id>
>                        <task-result>SUCCESS</task-result>
>                </task-result-details>
>        </component-task-result-details>
> </component-task-result>
> <component-task-result xmlns="
> http://java.sun.com/xml/ns/jbi/management-message";>
>        <component-name>servicemix-bean</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>
> org.springframework.beans.factory.BeanDefinitionStoreException:
> Unrecognized
> xbean namespace mapping:
> http://servicemix.apache.org/jms/1.0</loc-message<
> http://servicemix.apache.org/jms/1.0%3C/loc-message>
> >
>  ==============================================================
>
> Some posts in this list suggests to copy the servicemix-jms-3.2.1.jar into
> the <servicemix_home>/lib so I did it. Now I have the following error when
> starting servicemix:
>
>  ==============================================================
> ERROR - InstallerMBeanImpl             - Class not found:
> org.apache.servicemix.jms.JmsBootstrap
> java.lang.NoClassDefFoundError:
> org/apache/servicemix/common/DefaultComponent
>        at java.lang.ClassLoader.defineClass1(Native Method)
>        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>        at java.security.SecureClassLoader.defineClass(
> SecureClassLoader.java:124)
>        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
>        at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
>        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>        at org.codehaus.classworlds.RealmClassLoader.loadClassDirect(
> RealmClassLoader.java:195)
>        at org.codehaus.classworlds.DefaultClassRealm.loadClassDirect(
> DefaultClassRealm.java:412)
>        at org.codehaus.classworlds.DefaultClassRealm.loadClass(
> DefaultClassRealm.java:376)
> ==============================================================
>
> My environment:
>
> ServiceMix ESB: 3.2.1
>
> JDK:
> java version "1.5.0_11"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
> Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode)
>
> OS: Windows XP Professional
>
> SU xbean.xml:
>
> =============================================
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <beans
>
> xmlns:jms="http://servicemix.apache.org/jms/1.0";
>
> xmlns:pedido="http://www.tc.com/pedido/";>
>
> <jms:endpoint
>
> service="pedidos:PedidoFilaProvider"
>
> endpoint="PedidoFilaProvider"
>
> role="provider"
>
> destinationStyle="queue"
>
> jmsProviderDestinationName="queue/pedidoFila"
>
> connectionFactory="#connectionFactory"
>
> interfaceName="pedidos:PedidoFila"
>
> />
>
> <bean
>
> id="connectionFactory"
>
> class="org.apache.activemq.ActiveMQConnectionFactory">
>
> <property
>
> name="brokerURL"
>
> value="tcp://localhost:61616"
>
> />
>
> </bean>
>
> </beans>
>
> =============================================
>
> SU pom.xml:
> =============================================
>
> <?xml version="1.0" encoding="UTF-8"?><project>
>
> <parent>
>
> <artifactId>parent</artifactId>
>
> <groupId>com.tc.recarga.eis</groupId>
>
> <version>1.0-SNAPSHOT</version>
>
> </parent>
>
> <modelVersion>4.0.0</modelVersion>
>
> <groupId>com.tc.recarga.eis</groupId>
>
> <artifactId>pedido-jms</artifactId>
>
> <packaging>jbi-service-unit</packaging>
>
> <name>A custom project</name>
>
> <version>1.0-SNAPSHOT</version>
>
> <url>http://www.myorganization.org</url>
>
> <build>
>
> <resources>
>
> <resource>
>
> <directory>src/main/resources</directory>
>
> <includes>
>
> <include>**/*</include>
>
> </includes>
>
> </resource>
>
> </resources>
>
> <plugins>
>
> <plugin>
>
> <groupId>org.apache.servicemix.tooling</groupId>
>
> <artifactId>jbi-maven-plugin</artifactId>
>
> <version>${servicemix-version}</version>
>
> <extensions>true</extensions>
>
> </plugin>
>
> </plugins>
>
> </build>
>
> <repositories>
>
> <repository>
>
> <releases />
>
> <snapshots>
>
> <enabled>false</enabled>
>
> </snapshots>
>
> <id>apache</id>
>
> <name>Apache Repository</name>
>
> <url>http://people.apache.org/repo/m2-ibiblio-rsync-repository</url>
>
> </repository>
>
> <repository>
>
> <releases>
>
> <enabled>false</enabled>
>
> </releases>
>
> <snapshots />
>
> <id>apache.snapshots</id>
>
> <name>Apache Snapshots Repository</name>
>
> <url>http://people.apache.org/repo/m2-snapshot-repository</url>
>
> </repository>
>
> </repositories>
>
> <pluginRepositories>
>
> <pluginRepository>
>
> <releases />
>
> <snapshots>
>
> <enabled>false</enabled>
>
> </snapshots>
>
> <id>apache</id>
>
> <name>Apache Repository</name>
>
> <url>http://people.apache.org/repo/m2-ibiblio-rsync-repository</url>
>
> </pluginRepository>
>
> <pluginRepository>
>
> <releases>
>
> <enabled>false</enabled>
>
> </releases>
>
> <snapshots />
>
> <id>apache.snapshots</id>
>
> <name>Apache Snapshots Repository</name>
>
> <url>http://people.apache.org/repo/m2-snapshot-repository</url>
>
> </pluginRepository>
>
> </pluginRepositories>
>
> <dependencies>
>
> <dependency>
>
> <groupId>junit</groupId>
>
> <artifactId>junit</artifactId>
>
> <version>3.8.1</version>
>
> <scope>test</scope>
>
> </dependency>
>
> <dependency>
>
> <groupId>org.apache.servicemix</groupId>
>
> <artifactId>servicemix-jms</artifactId>
>
> <version>${servicemix-version}</version>
>
> </dependency>
>
> <dependency>
>
> <groupId>org.apache.servicemix</groupId>
>
> <artifactId>servicemix-bean</artifactId>
>
> <version>${servicemix-version}</version>
>
> </dependency>
>
> </dependencies>
>
> <properties>
>
> <servicemix-version>3.2.1</servicemix-version>
>
> </properties>
>
> </project>
>
> Thank you,
>
> Wilson
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Reply via email to