The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

pv1999 (7) [Avatar] Offline
#1
Hi,

I've either missed something along the way or have improperly configured something. I've gotten to the ServiceMix message flow example, but my response chain doesn't complete and nothing comes out of the CheapestPriceCalculator.

Here is the log and at the end you can see where the last two service units are in a "state not active".

Thanks in advance,
PV

C:osesbinactionworkspaceworkspace-servicemixservicemix esourceschapter4>ant -f ch4-examples.xml start
Buildfile: ch4-examples.xml

init:

gn:init:
[echo] ServiceMix home is set to C:osesbinactionesbapache-servicemix-3.2.1.
[echo] Workspace home is set to C:osesbinactionworkspaceworkspace-servicemixservicemix.

start:
[echo] Starting Servicemix: use CTRL-C or kill the process to stop the server

gn:start:
[java] Listening for transport dt_socket at address: 8000
[java] Starting Apache ServiceMix ESB: 3.2.1
[java]
[java] Loading Apache ServiceMix from file: conf/servicemix.xml
[java] INFO - ConnectorServerFactoryBean - JMX connector available at: service:jmx:rmi:///jndi/rmi://localhost
:1099/jmxrmi
[java] INFO - JBIContainer - ServiceMix 3.2.1 JBI Container (ServiceMix) is starting
[java] INFO - JBIContainer - For help or more informations please see: http://incubator.apache.o
rg/servicemix/
[java] INFO - ComponentMBeanImpl - Initializing component: #SubscriptionManager#
[java] INFO - jetty - Logging to org.apache.servicemix.http.jetty.JCLLogger@cb1594 via or
g.apache.servicemix.http.jetty.JCLLogger
[java] INFO - DeploymentService - Restoring service assemblies
[java] INFO - ComponentMBeanImpl - Setting running state for Component: servicemix-bean to Started
[java] INFO - ComponentMBeanImpl - Initializing component: servicemix-bean
[java] INFO - ComponentMBeanImpl - Setting running state for Component: servicemix-camel to Started
[java] INFO - ComponentMBeanImpl - Initializing component: servicemix-camel
[java] INFO - ComponentMBeanImpl - Setting running state for Component: servicemix-cxf-bc to Started
[java] INFO - ComponentMBeanImpl - Initializing component: servicemix-cxf-bc
[java] INFO - ComponentMBeanImpl - Setting running state for Component: servicemix-cxf-se to Started
[java] INFO - ComponentMBeanImpl - Initializing component: servicemix-cxf-se
[java] INFO - ComponentMBeanImpl - Setting running state for Component: servicemix-drools to Started
[java] INFO - ComponentMBeanImpl - Initializing component: servicemix-drools
[java] INFO - ComponentMBeanImpl - Setting running state for Component: servicemix-eip to Started
[java] INFO - ComponentMBeanImpl - Initializing component: servicemix-eip
[java] INFO - ComponentMBeanImpl - Setting running state for Component: servicemix-file to Started
[java] INFO - ComponentMBeanImpl - Initializing component: servicemix-file
[java] INFO - ComponentMBeanImpl - Setting running state for Component: servicemix-ftp to Started
[java] INFO - ComponentMBeanImpl - Initializing component: servicemix-ftp
[java] INFO - ComponentMBeanImpl - Setting running state for Component: servicemix-http to Started
[java] INFO - ComponentMBeanImpl - Initializing component: servicemix-http
[java] INFO - ComponentMBeanImpl - Setting running state for Component: servicemix-jms to Started
[java] INFO - ComponentMBeanImpl - Initializing component: servicemix-jms
[java] INFO - ComponentMBeanImpl - Setting running state for Component: servicemix-jsr181 to Started
[java] INFO - ComponentMBeanImpl - Initializing component: servicemix-jsr181
[java] INFO - ComponentMBeanImpl - Setting running state for Component: servicemix-lwcontainer to Star
ted
[java] INFO - ComponentMBeanImpl - Initializing component: servicemix-lwcontainer
[java] INFO - ComponentMBeanImpl - Setting running state for Component: servicemix-quartz to Started
[java] INFO - ComponentMBeanImpl - Initializing component: servicemix-quartz
[java] 1 name = quartz.properties
[java] INFO - SimpleThreadPool - Job execution threads will use class loader of thread: main
[java] INFO - QuartzScheduler - Quartz Scheduler v.1.5.2 created.
[java] INFO - RAMJobStore - RAMJobStore initialized.
[java] INFO - StdSchedulerFactory - Quartz scheduler 'DefaultQuartzScheduler' initialized from default
resource file in Quartz package: 'quartz.properties'
[java] INFO - StdSchedulerFactory - Quartz scheduler version: 1.5.2
[java] INFO - QuartzScheduler - Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
[java] INFO - ComponentMBeanImpl - Setting running state for Component: servicemix-saxon to Started
[java] INFO - ComponentMBeanImpl - Initializing component: servicemix-saxon
[java] INFO - ComponentMBeanImpl - Setting running state for Component: servicemix-script to Started
[java] INFO - ComponentMBeanImpl - Initializing component: servicemix-script
[java] INFO - ComponentMBeanImpl - Setting running state for Component: servicemix-truezip to Started
[java] INFO - ComponentMBeanImpl - Initializing component: servicemix-truezip
[java] INFO - ComponentMBeanImpl - Setting running state for Component: servicemix-wsn2005 to Started
[java] INFO - ComponentMBeanImpl - Initializing component: servicemix-wsn2005
[java] INFO - ComponentMBeanImpl - Setting running state for Component: servicemix-xmpp to Started
[java] INFO - ComponentMBeanImpl - Initializing component: servicemix-xmpp
[java] INFO - ServiceAssemblyLifeCycle - Starting service assembly: Chapter3-JMSBindingService
[java] INFO - ServiceUnitLifeCycle - Initializing service unit: SU-BEAN
[java] INFO - ServiceUnitLifeCycle - Initializing service unit: SU-JMS-Queue
[java] INFO - ServiceUnitLifeCycle - Initializing service unit: SU-JMS-File
[java] INFO - ServiceUnitLifeCycle - Starting service unit: SU-BEAN
[java] INFO - ServiceUnitLifeCycle - Starting service unit: SU-JMS-Queue
[java] INFO - ServiceUnitLifeCycle - Starting service unit: SU-JMS-File
[java] INFO - ServiceAssemblyLifeCycle - Starting service assembly: simple-sa
[java] INFO - ServiceUnitLifeCycle - Initializing service unit: cheapflow-jms-su
[java] INFO - ServiceUnitLifeCycle - Initializing service unit: cheapflow-routing-su
[java] INFO - ServiceUnitLifeCycle - Initializing service unit: cheapflow-bean-su
[java] INFO - ServiceUnitLifeCycle - Initializing service unit: cheapflow-xslt-su
[java] INFO - ServiceUnitLifeCycle - Starting service unit: cheapflow-jms-su
[java] INFO - ServiceUnitLifeCycle - Starting service unit: cheapflow-routing-su
[java] INFO - ServiceUnitLifeCycle - Starting service unit: cheapflow-bean-su
[java] INFO - ServiceUnitLifeCycle - Starting service unit: cheapflow-xslt-su
[java] INFO - JBIContainer - ServiceMix JBI Container (ServiceMix) started
[java] INFO - JDBCAdapterFactory - Database driver recognized: [apache_derby_embedded_jdbc_driver]
[java] INFO - MessageLogger - received payload <isbn>9999999999</isbn>
[java] Warning: at xsl:stylesheet of :
[java] Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor
[java] INFO - AggregateMessageLogger - received quote 9999999999, 33.5, Amazon
[java] INFO - AggregateMessageLogger - state is not active so ignoring call
[java] Warning: at xsl:stylesheet of :
[java] Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor
[java] INFO - AggregateMessageLogger - received quote 9999999999, 31.2, BarnesAndNoble
[java] INFO - AggregateMessageLogger - state is not active so ignoring call
[java] INFO - CheapestPriceCalculator - state is not active so ignoring call
pv1999 (7) [Avatar] Offline
#2
Re: Problem with Chapter 4 ServiceMix Messageflow
Well looks like I broke it even more. Thought I'd start fresh, ran the gn:undeploy-SA, gn:clean-SA and gn:clean-cache and removed the work directory (noticed it still had all the old stuff, maybe I needed something there?) Restarted servicemix and redeployed the messageflow and now I get this error...

[java] INFO - ServiceUnitLifeCycle - Starting service unit: cheapflow-xslt-su
[java] INFO - JBIContainer - ServiceMix JBI Container (ServiceMix) started
[java] INFO - JDBCAdapterFactory - Database driver recognized: [apache_derby_embedded_jdbc_driver]
[java] INFO - MessageLogger - received payload <isbn>9999999999</isbn>
[java] Warning: at xsl:stylesheet of :
[java] Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor
[java] ERROR - SedaQueue - org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@b522aa got erro
r processing InOut[
[java] id: ID:192.168.1.133-11f75a2d846-7:4
[java] status: Active
[java] role: provider
[java] service: {http://esbinaction.com/examples}aggregateLoggerComponent
[java] endpoint: aggregateLoggerEndpoint
[java] in: <?xml version="1.0" encoding="UTF-8"?><book-quote><isbn>9999999999</isbn><price>33.5</price><bookstore >
>Amazon</bookstore></book-quote>
[java] ]
[java] java.lang.NoClassDefFoundError: org/jibx/runtime/IUnmarshallable
[java] at java.lang.ClassLoader.defineClass1(Native Method)
[java] at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
[java] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
[java] at org.apache.xbean.classloader.JarFileClassLoader.access$200(JarFileClassLoader.java:4smilie
[java] at org.apache.xbean.classloader.JarFileClassLoader$6.run(JarFileClassLoader.java:272)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at org.apache.xbean.classloader.JarFileClassLoader.findClass(JarFileClassLoader.java:224)
[java] at org.apache.xbean.classloader.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:200)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
[java] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
[java] at esb.chapter4.messageflow.service.util.QuoteMessageHelper.unmarshallQuote(QuoteMessageHelper.java:73)
[java] at esb.chapter4.messageflow.servicemix.AggregateMessageLogger.onMessageExchange(AggregateMessageLogger.j
ava:40)
[java] at org.apache.servicemix.bean.BeanEndpoint.onProviderExchange(BeanEndpoint.java:235)
[java] at org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:211)
[java] at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:53smilie
[java] at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490)
[java] at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
[java] at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
[java] at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170)
[java] at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167)
[java] at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
[java] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
[java] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:90smilie
[java] at java.lang.Thread.run(Thread.java:619)
[java] Caused by: java.lang.ClassNotFoundException: org.jibx.runtime.IUnmarshallable in classloader org.jibx.runtim
e.IUnmarshallable
[java] at org.apache.xbean.classloader.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:206)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
[java] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
[java] ... 24 more
[java] Warning: at xsl:stylesheet of :
[java] Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor
[java] ERROR - SedaQueue - org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@1f24ca4 got err
or processing InOut[
[java] id: ID:192.168.1.133-11f75a2d846-7:8
[java] status: Active
[java] role: provider
[java] service: {http://esbinaction.com/examples}aggregateLoggerComponent
[java] endpoint: aggregateLoggerEndpoint
[java] in: <?xml version="1.0" encoding="UTF-8"?><book-quote><isbn>9999999999</isbn><price>31.2</price><bookstore >
>BarnesAndNoble</bookstore></book-quote>
[java] ]
[java] java.lang.NoClassDefFoundError: esb/chapter4/messageflow/domain/BookQuote
[java] at esb.chapter4.messageflow.service.util.QuoteMessageHelper.unmarshallQuote(QuoteMessageHelper.java:73)
[java] at esb.chapter4.messageflow.servicemix.AggregateMessageLogger.onMessageExchange(AggregateMessageLogger.j
ava:40)
[java] at org.apache.servicemix.bean.BeanEndpoint.onProviderExchange(BeanEndpoint.java:235)
[java] at org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:211)
[java] at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:53smilie
[java] at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490)
[java] at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
[java] at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
[java] at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170)
[java] at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167)
[java] at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
[java] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
[java] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:90smilie
[java] at java.lang.Thread.run(Thread.java:619)
pv1999 (7) [Avatar] Offline
#3
Re: Problem with Chapter 4 ServiceMix Messageflow
OK back to where I was. Seems Chapter 4 example was using left overs from Chapter 3. I included the JiBX resources in the bean service unit build and added the classpath additions to the xbean.xml. Still can't get past the "not active" state....

[java] INFO - AutoDeploymentService - Directory: hotdeploy: Finished installation of archive: cheapflow-
sa.zip
[java] INFO - MessageLogger - received payload <isbn>9999999999</isbn>
[java] Warning: at xsl:stylesheet of :
[java] Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor
[java] INFO - AggregateMessageLogger - received quote 9999999999, 33.5, Amazon
[java] INFO - AggregateMessageLogger - state is not active so ignoring call
[java] Warning: at xsl:stylesheet of :
[java] Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor
[java] INFO - AggregateMessageLogger - received quote 9999999999, 31.2, BarnesAndNoble
[java] INFO - AggregateMessageLogger - state is not active so ignoring call
[java] INFO - CheapestPriceCalculator - state is not active so ignoring call
pv1999 (7) [Avatar] Offline
#4
Re: Problem with Chapter 4 ServiceMix Messageflow
Ok, the light finally came on. A combination of how the splitAggregator works as explained here (http://www.manning-sandbox.com/thread.jspa?messageID=77036𒳬) and the fact that onMessageExchage gets called twice any way therefore generating the other "state not active" messages.
tijs.rademakers (494) [Avatar] Offline
#5
Re: Problem with Chapter 4 ServiceMix Messageflow
Excuse me for not responding earlier. Did you get a price response back now?

Best regards,

Tijs
pv1999 (7) [Avatar] Offline
#6
Re: Problem with Chapter 4 ServiceMix Messageflow
Yes, I got the response for the first attempt. I think I was originally thrown by the "not active messages" and the lack of response after the first.

Regards,
Perry