You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Anand K Kalyanasundaram <an...@cavs.msstate.edu> on 2006/07/15 01:29:13 UTC

servicemix quartz example help

Hi,
I am a newbie to servicemix and jbi and I am trying to deploy the
quartz-logger test case ($SERVICEMIX_HOME/core/src/test) in servicemix
2.0.2. I just copied the logger component
(logger-component-1.0-jbi-installer.zip), quartz
component(quartz-component-1.0-jbi-installer.zip) and assembly
(sample-jbi.zip) files into the deploy directory. Service mix gave me a
message that said "done" was an illegal status for an in-only message.
Some googling revealed that "exchange.setStatus(ExchangeStatus.DONE)"
should not be done for an InOnly exchange, and I commented this code out
and redeployed it.

Now I get a message that says that the endpoint cannot be found (I had
to restart service mix to see this error):


-------------- Trace -------------
[INFO] JobRunShell - Job quartz-component.QuartzProvider threw a
JobExecutionExc
eption:  <org.quartz.JobExecutionException: Unable to create
InOnlyExchange and
publish message [See nested exception:
javax.jbi.messaging.MessagingException: C
ould not find route for exchange:
org.servicemix.jbi.messaging.InOnlyImpl@495a2d
c4 for service: null and interface:
null]>org.quartz.JobExecutionException: Unab
le to create InOnlyExchange and publish message [See nested exception:
javax.jbi
.messaging.MessagingException: Could not find route for exchange:
org.servicemix
.jbi.messaging.InOnlyImpl@495a2dc4 for service: null and interface: null]
        at
org.servicemix.component.quartz.QuartzJob.execute(QuartzJob.java:40)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
        at
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.j
ava:516)
* Nested Exception (Underlying Cause) ---------------
javax.jbi.messaging.MessagingException: Could not find route for
exchange: org.s
ervicemix.jbi.messaging.InOnlyImpl@495a2dc4 for service: null and
interface: nul
l
        at org.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java:303)
        at
org.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.j
ava:567)
        at
org.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChann
elImpl.java:347)
        at
org.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannel
Impl.java:387)
        at
org.servicemix.component.quartz.QuartzJob.execute(QuartzJob.java:36)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
        at
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.j
ava:516)
-------------------- Trace ends --------------------


Can someone please tell me what I could be doing wrong? I have attached
the complete startup log of service mix at the end of this message. Is
the message "Activating component for : [xxxx] with service : null"
supposed to be a sign that something was improperly deployed?

Thanks.
Anand

[INFO] JBIContainer - Activating component for:
[container=defaultJBI,name=#SubscriptionManager#,id=#SubscriptionManager#]
with service: null component:
org.servicemix.jbi.nmr.SubscriptionManager@31dd7736
[INFO] XBeanXmlBeanDefinitionReader - Loading XML bean definitions from
URL
[file://usr/java/jbi3/servicemix-2.0.2/bin/../wdir/defaultJBI/components/quartz-component/installation/META-INF/jbi.xml]
[INFO] FileSystemXmlApplicationContext - Bean factory for application
context
[org.xbean.spring.context.FileSystemXmlApplicationContext;hashCode=283788351]:
org.springframework.beans.factory.support.DefaultListableBeanFactory
defining beans [installationDescriptorExtension,jbi]; root of
BeanFactory hierarchy
[INFO] FileSystemXmlApplicationContext - 2 beans defined in application
context
[org.xbean.spring.context.FileSystemXmlApplicationContext;hashCode=283788351]
[INFO] FileSystemXmlApplicationContext - Unable to locate MessageSource
with name 'messageSource': using default
[org.springframework.context.support.DelegatingMessageSource@56f052d5]
[INFO] FileSystemXmlApplicationContext - Unable to locate
ApplicationEventMulticaster with name 'applicationEventMulticaster':
using default
[org.springframework.context.event.SimpleApplicationEventMulticaster@3bce4a8a]
[INFO] DefaultListableBeanFactory - Pre-instantiating singletons in
factory
[org.springframework.beans.factory.support.DefaultListableBeanFactory
defining beans [installationDescriptorExtension,jbi]; root of
BeanFactory hierarchy]
[INFO] JBIContainer - Activating component for:
[container=defaultJBI,name=quartz-component,id=quartz-component] with
service: null component:
org.servicemix.component.quartz.QuartzComponent@2e6f947b
[INFO] RAMJobStore - RAMJobStore initialized.
[INFO] StdSchedulerFactory - Quartz scheduler 'quartz-component'
initialized from an externally provided properties instance.
[INFO] StdSchedulerFactory - Quartz scheduler version: 1.4.5
[INFO] LocalComponentConnector - Setting running state for Component:
quartz-component to Running
[INFO] QuartzScheduler - Scheduler quartz-component_$_quartz-component
started.
[INFO] InstallationService - Created installer for existing component: 
quartz-component
[INFO] XBeanXmlBeanDefinitionReader - Loading XML bean definitions from
URL
[file://usr/java/jbi3/servicemix-2.0.2/bin/../wdir/defaultJBI/components/logger-component/installation/META-INF/jbi.xml]
[INFO] FileSystemXmlApplicationContext - Bean factory for application
context
[org.xbean.spring.context.FileSystemXmlApplicationContext;hashCode=1299509292]:
org.springframework.beans.factory.support.DefaultListableBeanFactory
defining beans [installationDescriptorExtension,jbi]; root of
BeanFactory hierarchy
[INFO] FileSystemXmlApplicationContext - 2 beans defined in application
context
[org.xbean.spring.context.FileSystemXmlApplicationContext;hashCode=1299509292]
[INFO] FileSystemXmlApplicationContext - Unable to locate MessageSource
with name 'messageSource': using default
[org.springframework.context.support.DelegatingMessageSource@1b1402c4]
[INFO] FileSystemXmlApplicationContext - Unable to locate
ApplicationEventMulticaster with name 'applicationEventMulticaster':
using default
[org.springframework.context.event.SimpleApplicationEventMulticaster@3ec19fbf]
[INFO] DefaultListableBeanFactory - Pre-instantiating singletons in
factory
[org.springframework.beans.factory.support.DefaultListableBeanFactory
defining beans [installationDescriptorExtension,jbi]; root of
BeanFactory hierarchy]
[INFO] JBIContainer - Activating component for:
[container=defaultJBI,name=logger-component,id=logger-component] with
service: null component:
org.servicemix.component.logger.LoggerComponent@75a9883d
[INFO] LocalComponentConnector - Setting running state for Component:
logger-component to Running
[INFO] InstallationService - Created installer for existing component: 
logger-component
[INFO] XBeanXmlBeanDefinitionReader - Loading XML bean definitions from
URL
[file://usr/java/jbi3/servicemix-2.0.2/bin/../wdir/defaultJBI/service-assemblies/SimpleJBIAssembly/META-INF/jbi.xml]
[INFO] FileSystemXmlApplicationContext - Bean factory for application
context
[org.xbean.spring.context.FileSystemXmlApplicationContext;hashCode=1834407880]:
org.springframework.beans.factory.support.DefaultListableBeanFactory
defining beans [jbi]; root of BeanFactory hierarchy
[INFO] FileSystemXmlApplicationContext - 1 beans defined in application
context
[org.xbean.spring.context.FileSystemXmlApplicationContext;hashCode=1834407880]
[INFO] FileSystemXmlApplicationContext - Unable to locate MessageSource
with name 'messageSource': using default
[org.springframework.context.support.DelegatingMessageSource@5a83b00f]
[INFO] FileSystemXmlApplicationContext - Unable to locate
ApplicationEventMulticaster with name 'applicationEventMulticaster':
using default
[org.springframework.context.event.SimpleApplicationEventMulticaster@7b9bd735]
[INFO] DefaultListableBeanFactory - Pre-instantiating singletons in
factory
[org.springframework.beans.factory.support.DefaultListableBeanFactory
defining beans [jbi]; root of BeanFactory hierarchy]
[INFO] QuartzComponent - Initializing Quartz JBI Service Unit
[QuartzProvider]
[INFO] ComponentContextImpl - Component: quartz-component activated
endpoint: {http://tempuri.org/quartz}QuartzProvider : Notification
[INFO] QuartzComponent - Starting the Quartz JBI Service Unit
[QuartzProvider]
[INFO] DeploymentService - Deployed ServiceUnit QuartzProvider to
Component: quartz-component
[INFO] LoggerComponent - Initializing Logger JBI Service Unit
[LoggerConsumer]
[INFO] ComponentContextImpl - Component: logger-component activated
endpoint: {http://tempuri.org/logger}LoggerConsumer : Consumer
[INFO] LoggerComponent - Starting the Logger JBI Service Unit
[LoggerConsumer]

[INFO] JobRunShell - Job quartz-component.QuartzProvider threw a
JobExecutionException:  <org.quartz.JobExecutionException: Unable to
create InOnlyExchange and publish message [See nested exception:
javax.jbi.messaging.MessagingException: Could not find route for
exchange: org.servicemix.jbi.messaging.InOnlyImpl@445ead9d for service:
null and interface: null]>org.quartz.JobExecutionException: Unable to
create InOnlyExchange and publish message [See nested exception:
javax.jbi.messaging.MessagingException: Could not find route for
exchange: org.servicemix.jbi.messaging.InOnlyImpl@445ead9d for service:
null and interface: null]
    at org.servicemix.component.quartz.QuartzJob.execute(QuartzJob.java:40)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
    at
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)
* Nested Exception (Underlying Cause) ---------------
javax.jbi.messaging.MessagingException: Could not find route for
exchange: org.servicemix.jbi.messaging.InOnlyImpl@445ead9d for service:
null and interface: null
    at org.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java:303)
    at
org.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:567)
    at
org.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:347)
    at
org.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:387)
    at org.servicemix.component.quartz.QuartzJob.execute(QuartzJob.java:36)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
    at
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)



RemoteServiceMixClient usage

Posted by Anand K Kalyanasundaram <an...@cavs.msstate.edu>.
Hi,
I am trying to create a remote client to the servicemix JBI container.
Is org.apache.servicemix.client.RemoteServiceMixClient the way to do it?

I tried the following piece of code:

    protected static ServiceMixClient getClient() throws Exception {
         return new RemoteServiceMixClient("rmi://localhost:1099/jmxrmi");
    }

    public static void main(String args[]) throws Exception {
         ServiceMixClient smc=getClient();
         ComponentContext componentContext=smc.getContext();
        // Component context returned is null!!!!
    }

I get a null for the component context. I would appreciate any pointers
or code samples for this.

Thanks.
Anand