You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by techy_bolek <te...@yahoo.com> on 2010/09/03 23:27:01 UTC

Service Mix 3.3.1: unable to find org.apache.servicemix.common.DefaultComponent

I have built a custom component that inherits from
org.apache.servicemix.common.DefaultComponent. I was able to build it
correctly through maven. However, when trying to deploy the component I get
an error that the above class does not exist. I was able to locate the jar
that contains the class under the following location:

data/smx/sharedlibs/servicemix-shared/version_1/lib/servicemix-common-2009.01.jar

What am I missing?
-- 
View this message in context: http://servicemix.396122.n5.nabble.com/Service-Mix-3-3-1-unable-to-find-org-apache-servicemix-common-DefaultComponent-tp2802977p2802977.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Service Mix 3.3.1: unable to find org.apache.servicemix.common.DefaultComponent

Posted by techy_bolek <te...@yahoo.com>.
Thanks, that was it. I mean although I did have the dependency you mentioned:

   <dependency>
      <groupId>org.apache.servicemix</groupId>
      <artifactId>servicemix-common</artifactId>
      <version>2009.01</version>
      <scope>provided</scope>
    </dependency>


the auto-generated jbi.xml did not contain any reference to
servicemix-common. I updated jbi.xml so that it looks as below and my custom
service engine now starts OK. Sometime I'll try to figure out how to get
maven tooling to generate it properly.

<?xml version="1.0" encoding="UTF-8"?>
<jbi xmlns="http://java.sun.com/xml/ns/jbi" version="1.0">
  <component type="binding-component"
component-class-loader-delegation="parent-first"
bootstrap-class-loader-delegation="parent-first">

    <shared-library version="2009.01">servicemix-shared</shared-library>    
<-----Added this line
    ......
    .....

-- 
View this message in context: http://servicemix.396122.n5.nabble.com/Service-Mix-3-3-1-unable-to-find-org-apache-servicemix-common-DefaultComponent-tp2802977p2803791.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Service Mix 3.3.1: unable to find org.apache.servicemix.common.DefaultComponent

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

Ensure the custom component descriptor jbi.xml has
<shared-library version="2009.01">servicemix-shared</shared-library>

I believe if your custom component pom.xml use packaging
<packaging>jbi-component</packaging>

and you have dependency
<dependency>
       <groupId>org.apache.servicemix</groupId>
       <artifactId>servicemix-shared</artifactId>
     </dependency>

then the auto-generated jbi.xml should contain
<shared-library version="2009.01">servicemix-shared</shared-library>

Freeman
On 2010-9-4, at 上午5:27, techy_bolek wrote:

>
> I have built a custom component that inherits from
> org.apache.servicemix.common.DefaultComponent. I was able to build it
> correctly through maven. However, when trying to deploy the  
> component I get
> an error that the above class does not exist. I was able to locate  
> the jar
> that contains the class under the following location:
>
> data/smx/sharedlibs/servicemix-shared/version_1/lib/servicemix- 
> common-2009.01.jar
>
> What am I missing?
> -- 
> View this message in context: http://servicemix.396122.n5.nabble.com/Service-Mix-3-3-1-unable-to-find-org-apache-servicemix-common-DefaultComponent-tp2802977p2802977.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.


-- 
Freeman Fang

------------------------
blog: http://freemanfang.blogspot.com
twitter: http://twitter.com/freemanfang
Open Source SOA: http://fusesource.com
Apache Servicemix:http://servicemix.apache.org
Apache Cxf: http://cxf.apache.org
Apache Karaf: http://karaf.apache.org
Apache Felix: http://felix.apache.org