camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ravi Gupta 7 <rgupt...@sapient.com>
Subject BAM Support in Camel - ActivityMonitorEngine-- Failed to process expiration of: ActivityState[19 on ProcessInstance[44] Activity[1 name: bamB]]. Reason: java.lang.NullPointerException
Date Tue, 16 Sep 2014 11:00:23 GMT
I have created two activeMQ [bamA and bamB].
Also created a AcctInqProfileCheckActivity as a routeBuilder under camel context.
Below is the overridden configure () method. 

When I send a message to bamA using ActiveMQ then it is giving me below error. I am sending
message to bam2 after 3 seconds too.

ActivityMonitorEngine               - Failed to process expiration of: ActivityState[19 on
ProcessInstance[44] Activity[1 name: bamB]]. Reason: java.lang.NullPointerException
2014-09-16 15:32:36,793 [tyMonitorEngine] ERROR ActivityMonitorEngine          -         
  -            - Failed to process expiration of: ActivityState[19 on ProcessInstance[44]
Activity[1 name: b
java.lang.NullPointerException
        at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:322)
        at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:105)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:60)
        at org.apache.camel.bam.rules.TemporalRule.processExpired(TemporalRule.java:147)
        at org.apache.camel.bam.rules.ActivityRules.processExpired(ActivityRules.java:57)
        at org.apache.camel.bam.rules.ProcessRules.processExpired(ProcessRules.java:38)
        at org.apache.camel.bam.processor.ActivityMonitorEngine$2.execute(ActivityMonitorEngine.java:123)
        at org.apache.camel.bam.EntityManagerTemplate.execute(EntityManagerTemplate.java:41)
        at org.apache.camel.bam.processor.ActivityMonitorEngine.fireExpiredEvent(ActivityMonitorEngine.java:113)
        at org.apache.camel.bam.processor.ActivityMonitorEngine$1.doInTransactionWithoutResult(ActivityMonitorEngine.java:90)
        at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33)
        at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:131)
        at org.apache.camel.bam.processor.ActivityMonitorEngine.run(ActivityMonitorEngine.java:80)
        at java.lang.Thread.run(Thread.java:745)
@Override
public void configure() throws Exception {
		log.debug("Activity running.........");
		System.out.println("Activity running.........");

		// let's define some activities, correlating on an XPath on the message
		// bodies
		ActivityBuilder customerEnquiryActivity = activity("activemq:bamA")
				.name("bamA").correlate(header("JMSCorrelationId"));

		ActivityBuilder customerProfileCheck = activity("activemq:bamB").name(
				"bamB").correlate(header("JMSCorrelationId"));

		// now let's add some BAM rules

		customerProfileCheck
				.starts()
				.after(customerEnquiryActivity.completes())
				.expectWithin(seconds(this.expectedTime))
				.errorIfOver(seconds(this.timeOut))
				.log(LoggingLevel.DEBUG, log,
						"Time Out Error" + header("JMSCorrelationId"))
				.throwException(
						new BusinessException("Time Out Error :: "
								+ header("JMSCorrelationId")))
				.to("activemq:bamC");

	}

Thanks
RG
Mime
View raw message