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.

Reply via email to