What don't you use jbi packaging (xbean.xml) ? or the classpath should be recognized by servicemix. (servicemix.conf)
xujingguo wrote: > > Hello everyone. > When I put my component in this > path:D:\apache-servicemix-3.1-incubating\examples\myComponent\ and the > servicemix.xml is : > > <?xml version="1.0" encoding="UTF-8"?> > <beans xmlns="http://xbean.org/schemas/spring/1.0" > xmlns:spring="http://xbean.org/schemas/spring/1.0" > xmlns:sm="http://servicemix.apache.org/config/1.0" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://xbean.org/schemas/spring/1.0 > ../../conf/spring-beans.xsd > http://servicemix.org/config/1.0 > ../../conf/servicemix.xsd" > xmlns:my="http://servicemix.org/demo/"> > > <!-- the JBI container --> > <sm:container spring:id="jbi" rootDir="../wdir" useMBeanServer="true" > createMBeanServer="true" installationDirPath="../install" > monitorInstallationDirectory="true" dumpStats="true" > statsInterval="10" transactionManager="#transactionManager"> > > <sm:activationSpecs> > > <sm:activationSpec componentName="provider" service="my:provider" > destinationService="my:consumer"> > <sm:component> > <bean xmlns="http://xbean.org/schemas/spring/1.0" > class="my.components.MsgProvider"/> > </sm:component> > </sm:activationSpec> > > <sm:activationSpec componentName="consumer" > service="my:consumer"> > <sm:component> > <bean xmlns="http://xbean.org/schemas/spring/1.0" > class="my.components.MsgConsumer"/> > </sm:component> > </sm:activationSpec> > > </sm:activationSpecs> > </sm:container> > > <!-- message broker --> > <bean id="broker" class="org.activemq.spring.BrokerFactoryBean"> > <property name="config" value="classpath:activemq.xml" /> > </bean> > > <bean id="transactionContextManager" > class="org.jencks.factory.TransactionContextManagerFactoryBean"/> > <bean id="transactionManager" > class="org.jencks.factory.GeronimoTransactionManagerFactoryBean" /> > > <bean id="jmsFactory" class="org.activemq.pool.PooledConnectionFactory"> > <property name="connectionFactory"> > <bean class="org.activemq.ActiveMQConnectionFactory"> > <property name="brokerURL"> > <value>tcp://localhost:61616</value> > </property> > </bean> > </property> > </bean> > > </beans> > > My components (MsgConsumer.jar and MsgProvider.jar) are in the path > D:\apache-servicemix-3.1-incubating\examples\myComponent directly.When I > run this in servicemix, I met a trouble : > > D:\apache-servicemix-3.1-incubating>bin\servicemix > d:\apache-servicemix-3.1-incu > bating\examples\myComponent\servicemix.xml > Starting Apache ServiceMix ESB: 3.1-incubating > > Loading Apache ServiceMix from file: > d:\apache-servicemix-3.1-incubating\example > s\myComponent\servicemix.xml > Caught: > org.springframework.beans.factory.parsing.BeanDefinitionParsingException > : Configuration problem: Bean class [my.components.MsgProvider] not found > Offending resource: file > [d:\apache-servicemix-3.1-incubating\examples\myCompone > nt\servicemix.xml] > Bean ''; nested exception is java.lang.ClassNotFoundException: > my.components.Msg > Provider > org.springframework.beans.factory.parsing.BeanDefinitionParsingException: > Config > uration problem: Bean class [my.components.MsgProvider] not found > Offending resource: file > [d:\apache-servicemix-3.1-incubating\examples\myCompone > nt\servicemix.xml] > Bean ''; nested exception is java.lang.ClassNotFoundException: > my.components.Msg > Provider > Caused by: java.lang.ClassNotFoundException: my.components.MsgProvider > ....... > > Who can give a solution?Best regards and be forward to any reply. > > -- View this message in context: http://www.nabble.com/Faced-a-trouble-of-%22Bean-%27%27--nested-exception-is-java.lang.ClassNotFoundException%22-tf3795089s12049.html#a10734252 Sent from the ServiceMix - User mailing list archive at Nabble.com.
