You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by hotcool <ji...@gmail.com> on 2007/09/17 03:57:28 UTC

a discussion on hello-world-bc,

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. 
etty.JCLLogger@128340 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.

Re: more more discussion on hello-world-bc ,

Posted by hotcool <ji...@gmail.com>.


bsnyder wrote:
> 
> 
> 
> Please provide the xbean.xml file.
> 
> Bruce
> 
> 

ok.because if i paste the xbean.xml file in the post ,the mail list will
refuse me .
So I put the files in the attachment! 
see the attachement below!  

http://www.nabble.com/file/p12788634/hello-world-smx-ForBC.rar
hello-world-smx-ForBC.rar 
-- 
View this message in context: http://www.nabble.com/a-discussion-on-hello-world-bc%2C-tf4450388s12049.html#a12788634
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: more more discussion on hello-world-bc ,

Posted by Bruce Snyder <br...@gmail.com>.
On 9/16/07, hotcool <ji...@gmail.com> wrote:

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

Please provide the xbean.xml file.

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/
Castor - http://castor.org/

Re: more more discussion on hello-world-bc ,

Posted by hotcool <ji...@gmail.com>.
thanks very much..my question is in another post :
below is that:

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.. 

There is no SU. 
So  I do the things as below: 
I creat a service unit named "hello-world-su": 


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

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


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

Third:I creat a SA: 


At last I creat a top level pom.xml: 
The modules are list below: 
<modules> 
        <module>hello-world-http-su</module> 
        <module>hello-world-su</module> 
        <module>hello-world-bc</module> 
        <module>hello-world-sa</module>     
</modules> 

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. 
etty.JCLLogger@128340 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"?> 
<jbi-task xmlns="http://java.sun.com/xml/ns/jbi/management-message"
version="1. 
"> 
<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>hello-world-bc</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. 
actory.BeanDefinitionStoreException: Unrecognized xbean element mapping:
endpoi 
t in namespace
http://org.apache.servicemix.samples.helloworld.bc/1.0</loc-mess 
ge> 
......

"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! 

-- 
View this message in context: http://www.nabble.com/a-discussion-on-hello-world-bc%2C-tf4450388s12049.html#a12728680
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: more more discussion on hello-world-bc ,

Posted by Bruce Snyder <br...@gmail.com>.
On 9/16/07, hotcool <ji...@gmail.com> wrote:
>
> 3. more details  about the pom.xml and xbean.xml
>
> but if I paste them in text ,the mailing list will refuse my post,So i put
> them it the attachments.
>
> the reason why i post  as three sections.becasue if i post all in a time,the
> mailing list always refuse . for the reason :
>
>  SMTP error from remote mail server after end of data:
>     host mx1.eu.apache.org [192.87.106.230]: 552 spam score (6.2) exceeded
> threshold http://www.nabble.com/file/p12728359/hello-world-smx-ForBC.rar
> hello-world-smx-ForBC.rar

Evidently some characteristics of the message have triggered a spam
rule. What exactly is your question?

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/
Castor - http://castor.org/

more more discussion on hello-world-bc ,

Posted by hotcool <ji...@gmail.com>.
3. more details  about the pom.xml and xbean.xml

but if I paste them in text ,the mailing list will refuse my post,So i put
them it the attachments.

the reason why i post  as three sections.becasue if i post all in a time,the
mailing list always refuse . for the reason :

 SMTP error from remote mail server after end of data:
    host mx1.eu.apache.org [192.87.106.230]: 552 spam score (6.2) exceeded
threshold http://www.nabble.com/file/p12728359/hello-world-smx-ForBC.rar
hello-world-smx-ForBC.rar 
-- 
View this message in context: http://www.nabble.com/a-discussion-on-hello-world-bc%2C-tf4450388s12049.html#a12728359
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: more discussion on hello-world-bc ,

Posted by hotcool <ji...@gmail.com>.
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": 


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

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


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

Third:I creat a SA:


At last I creat a top level pom.xml:
The modules are list below:
<modules>
	<module>hello-world-http-su</module>
	<module>hello-world-su</module> 
	<module>hello-world-bc</module> 
	<module>hello-world-sa</module>     
</modules> 

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:
                                        
<loc-message>org.springframework.beans. 
actory.BeanDefinitionStoreException: Unrecognized xbean element mapping:
endpoi 
t in namespace
http://org.apache.servicemix.samples.helloworld.bc/1.0</loc-mess 
ge> 
......

"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! 

-- 
View this message in context: http://www.nabble.com/a-discussion-on-hello-world-bc%2C-tf4450388s12049.html#a12728355
Sent from the ServiceMix - User mailing list archive at Nabble.com.


more discussion on hello-world-bc ,

Posted by hotcool <ji...@gmail.com>.
the message  is in Html Foamt.but it is not clear.
I want to post it like this format:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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) 
        at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12 
4) 
        at
org.apache.xbean.classloader.JarFileClassLoader.access$200(JarFileCla 
ssLoader.java:48) 
        at
org.apache.xbean.classloader.JarFileClassLoader$6.run(JarFileClassLoa 
der.java:272)
......

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
-- 
View this message in context: http://www.nabble.com/a-discussion-on-hello-world-bc%2C-tf4450388s12049.html#a12728307
Sent from the ServiceMix - User mailing list archive at Nabble.com.