
Originally Posted by
oleg.zhurakousky
Can you verify that the following method is invoked:
Code:
...
errorChannel.send(MessageBuilder.withPayload(auditEvent).build());
...
Can you put a log statement there?
I put a system.out in that section, but it is not even reaching that part, when I run my junit. It actually errors out while loading the bean definition from the xml file. It gives an out of memory error for the Java heap space, and seems like it is actually erroring out while loading the error Channel beans or something associated with it, like the selector or so. Here is the stack trace:
Code:
org.springframework.integration.scheduling.SimpleTaskScheduler destroy
INFO: shutting down TaskExecutor
Jun 16, 2010 9:29:51 AM org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor shutdown
INFO: Shutting down ThreadPoolExecutor
Jun 16, 2010 9:29:51 AM org.springframework.beans.factory.support.DefaultSingletonBeanRegistry destroySingletons
INFO: Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1549f94: defining beans [errorChannel,org.springframework.integration.channel.MessagePublishingErrorHandler#0,taskScheduler,org.springframework.integration.selector.PayloadTypeSelector#0,org.springframework.integration.channel.interceptor.MessageSelectingInterceptor#0,annotatorChannel,org.springframework.integration.selector.PayloadTypeSelector#1,org.springframework.integration.channel.interceptor.MessageSelectingInterceptor#1,destinationChannel,org.springframework.integration.selector.PayloadTypeSelector#2,org.springframework.integration.channel.interceptor.MessageSelectingInterceptor#2,org.springframework.integration.scheduling.IntervalTrigger#0,defaultPoller,org.springframework.integration.handler.MethodInvokingMessageHandler#0,org.springframework.integration.config.ConsumerEndpointFactoryBean#0,org.springframework.integration.transformer.MethodInvokingTransformer#0,org.springframework.integration.transformer.MessageTransformingHandler#0,annotationTransformer,org.springframework.integration.transformer.HeaderEnricher#0,org.springframework.integration.transformer.MessageTransformingHandler#1,org.springframework.integration.handler.ServiceActivatingHandler#0,annotationAdapter,destinationAdapter,com.comp.asdf.auditing.auditservice.AuditService,destinationAdapter1,persistenceInterceptor,sensageDestination,angulataAnnotator]; root of factory hierarchy
Jun 16, 2010 9:29:51 AM org.springframework.integration.scheduling.SimpleTaskScheduler destroy
INFO: shutting down TaskExecutor
Jun 16, 2010 9:29:51 AM org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor shutdown
INFO: Shutting down ThreadPoolExecutor
java.lang.OutOfMemoryError: Java heap space
at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:99)
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:393)
at java.lang.StringBuffer.append(StringBuffer.java:225)
at java.io.StringWriter.write(StringWriter.java:90)
at java.io.PrintWriter.write(PrintWriter.java:384)
at java.io.PrintWriter.write(PrintWriter.java:401)
at java.io.PrintWriter.print(PrintWriter.java:532)
at java.io.PrintWriter.println(PrintWriter.java:669)
at java.lang.Throwable.printStackTraceAsCause(Throwable.java:539)
at java.lang.Throwable.printStackTraceAsCause(Throwable.java:546)
at java.lang.Throwable.printStackTraceAsCause(Throwable.java:546)
at java.lang.Throwable.printStackTraceAsCause(Throwable.java:546)
at java.lang.Throwable.printStackTraceAsCause(Throwable.java:546)
.
.
.
.
So seems like something regarding the error Channel is configured incorrectly.