Hi Dushan, Thanks for the suggestions. In fact i did remote debug the code and couldn't yet identify what's causing the issue. I extracted a fresh ESB and now the class mediator is working when it's put in to the main sequence and invoked from a scheduled task. The same code is working as expected in this case. I think i might have messed with the synapse configuration somehow.
This class mediator calls upon a REST api via HTTP POST and parses the xml returned as the result. Then the contents of this xml is inserted to the soap body of the MessageContext and sent to an aggregator mediator which will aggregate similar soap messages. More info about the project can be found at [1] in the architecture@. Thanks. [1] [Training Project] Monitoring WSO2 cloud with CEP and BAM - System Overview - http://markmail.org/message/fka2zrb6qbq3b77i /Gayashan On Sat, May 31, 2014 at 8:30 PM, Dushan Abeyruwan <[email protected]> wrote: > ute(MessageInjector.java:315) >> at >> org.apache.synapse.startup.quartz.SimpleQuartzJob.execute(SimpleQuartzJob.java:88) >> at org.quartz.core.JobRunShell.run(JobRunShell.java:213) >> at >> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557) >> Caused by: java.lang.NullPointerException >> at >> org.wso2.cloud.monitor.agent.esb.mediators.icinga.IcingaAdapter.mediate(IcingaAdapter.java:89) >> > > what this class mediator does ? its obvious theat error thrown from > your class mediator, debug it. > > >> at >> org.apache.synapse.mediators.ext.ClassMediator.mediate(ClassMediator.java:78) >> ... 11 more >> [2014-05-30 15:16:12,137] ERROR - ErrorLogger Job >> (synapse.simple.quartz.TriggerSequence threw an exception. >> org.quartz.SchedulerException: Job threw an unhandled exception. [See >> nested exception: org.apache.synapse.SynapseException: Error occured in the >> mediation of the class mediator] >> at org.quartz.core.JobRunShell.run(JobRunShell.java:224) >> at >> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557) >> Caused by: org.apache.synapse.SynapseException: Error occured in the >> mediation of the class mediator >> at >> org.apache.synapse.mediators.ext.ClassMediator.mediate(ClassMediator.java:82) >> at >> org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:77) >> at >> org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:47) >> at >> org.apache.synapse.mediators.filters.InMediator.mediate(InMediator.java:61) >> at >> org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:77) >> at >> org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:47) >> at >> org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:131) >> at >> org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:228) >> at >> org.apache.synapse.startup.tasks.MessageInjector.execute(MessageInjector.java:315) >> at >> org.apache.synapse.startup.quartz.SimpleQuartzJob.execute(SimpleQuartzJob.java:88) >> at org.quartz.core.JobRunShell.run(JobRunShell.java:213) >> ... 1 more >> Caused by: java.lang.NullPointerException >> at >> org.wso2.cloud.monitor.agent.esb.mediators.icinga.IcingaAdapter.mediate(IcingaAdapter.java:89) >> at >> org.apache.synapse.mediators.ext.ClassMediator.mediate(ClassMediator.java:78) >> ... 11 more >> >> >> Any help would be much appreciated! >> >> Thanks. >> >> /Gayashan >> >> -- >> Gayashan Amarasinghe >> Software Engineer >> WSO2, Inc. ; http://wso2.com >> lean. enterprise. middleware >> >> Mobile: +94718314517 >> Blog: gayashan-a.blogspot.com >> >> _______________________________________________ >> Dev mailing list >> [email protected] >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > Dushan Abeyruwan | Associate Tech Lead > Integration Technologies Team > PMC Member Apache Synpase > WSO2 Inc. http://wso2.com/ > Blog:http://dushansview.blogspot.com/ > Mobile:(0094)713942042 > > -- Gayashan Amarasinghe Software Engineer WSO2, Inc. ; http://wso2.com lean. enterprise. middleware Mobile: +94718314517 Blog: gayashan-a.blogspot.com
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
