I want to start a discussion on hello-world-bc, 
You know it is a good example! But it haven't finished ,for so long time! 

After I succeed in finishing the hello-world-se,I try to follow the
hello-world-bc tutorial at the url: 
 http://incubator.apache.org/servicemix/hello-world-bc.html . 

But the hello-world-bc is different from hello-world-se in some places. 

1. someone may encounter the Error: 
java.lang.NoClassDefFoundError: org/apache/servicemix/common/BaseBootstrap 
        at java.lang.ClassLoader.defineClass1(Native Method) 
        at java.lang.ClassLoader.defineClass(ClassLoader.java:620) 
...... 

when I encounter this Error! 
I have found the reason from the source code! 
That's because: 
 in the MyBootstrap.java file: 

public class MyBootstrap extends BaseBootstrap{...} 

but  the class BaseBootstrap can do what,as follows: 

Base class for components bootstrap. 
  Due to classloading mechanism in JBI, Shared Libraries are 
  not available at bootstrap time, so this class should be 
  copied in your own component and modified directly, instead 
  of inheriting it. 

Now,you know what to do: 
You can copy the source code of class BaseBootstrap into the
MyBootstrap.java file.this can solve the error! 

My ServiceMix version is 3.1, 

2. you can find that in the web page 
http://incubator.apache.org/servicemix/hello-world-bc.html . 

"Creating a Hello World BC Service Unit 
This is a work in progress " 

So if we follow the things describe below step by setp,we can't get the
hello-world-bc work.. 
Is it right?

There is no SU. 
So  I do the things as below: 

I creat a service unit named "hello-world-su": 
First:I add the below to the pom.xml: 
     
          org.apache.servicemix.samples.helloworld.bc 
          hello-world-bc 
      1.0-SNAPSHOT     
     

second: I add xbean.xml  to hello-world-su\src\main\resources directory: 

<?xml version="1.0" encoding="UTF-8"?> 
 

 

 

I also creat a http consumer su and client.xml: 
xbean.xml : 
 

             

 

the client.html will send the request to the locationURI. 

Third:I creat a SA: 
I add the things list bellows to the pom.xml file: 
     
          org.apache.servicemix.samples.helloworld.bc 
          hello-world-su   
          1.0-SNAPSHOT 
     

         
          org.apache.servicemix.samples.helloworld.bc 
          hello-world-http-su   
          1.0-SNAPSHOT 
     

At last I creat a top level pom.xml : 
The modules are list below: 

   
    hello-world-http-su 
        hello-world-su 
        hello-world-bc 
        hello-world-sa     
   

when I deploy the SA: 
After the  servicemix starts,the components  hello-world-bc and 
servicemix-http can initialized,but the service Assembly failed: 
I got a error: 

INFO  - ComponentMBeanImpl             - Starting component: hello-world-bc 
INFO  - ComponentMBeanImpl             - Initializing component:
hello-world-bc 
INFO  - jetty                          - Logging to
org.apache.servicemix.http. 
[EMAIL PROTECTED] via org.apache.servicemix.http.jetty.JCLLogger 
INFO  - ComponentMBeanImpl             - Starting component: servicemix-http 
INFO  - ComponentMBeanImpl             - Initializing component:
servicemix-htt 

INFO  - DeploymentService              - UnDeployed ServiceUnit
hello-world-htt 
-su from Component: servicemix-http 
ERROR - AutoDeploymentService          - Failed to update Service Assembly:
hel 
o-world-sa 
java.lang.Exception: <?xml version="1.0" encoding="UTF-8"?> 
 
 
 
 
 
deploy 
FAILED 
ERROR 
 
 
 
 
        hello-world-bc 
         
                 
                        deploy 
                        FAILED 
                        ERROR 
                         
 
 
Could not deploy xbean service unit 
 
 
                         
                                1 
                                 
                                         
                                        org.springframework.beans. 
actory.BeanDefinitionStoreException: Unrecognized xbean element mapping:
endpoi 
t in namespace http://org.apache.servicemix.samples.helloworld.bc/1.0 
                                        <![CDATA[org.apache.xbean. 
ernel.ServiceRegistrationException:
org.springframework.beans.factory.BeanDefin 
tionStoreException: Unrecognized xbean element mapping: endpoint in
namespace h 
tp://org.apache.servicemix.samples.helloworld.bc/1.0 
        at
org.apache.xbean.kernel.standard.ServiceManagerRegistry.registerServ 
ce(ServiceManagerRegistry.java:424) 
...... 


"Unrecognized xbean element mapping: endpoi 
t in namespace http://org.apache.servicemix.samples.helloworld.bc/1.0"; 
this is the error! 

the reason is what?Any ideas?  Any others people try the hello-world-bc, 
Do  you succeed? 

Oh,It is so long!~~ 

Hope for any reply!Thanks! 

Ps:the mail list refuse to accept this mai,i don't know why? you can only
see this in this forum.
the reason is that 
Technical details of permanent failure: 
PERM_FAILURE: SMTP Error (state 16): 552 spam score (8.4) exceeded threshold
-- 
View this message in context: 
http://www.nabble.com/a-discussion-on-hello-world-bc%2C-tf4450388s12049.html#a12697426
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to