Issue Details (XML | Word | Printable)

Key: MULE-4135
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Ross Mason
Reporter: Francois Staes
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Mule

Nested routers / bindings do not correctly handle NullPayload

Created: 30/Jan/09 01:16 PM   Updated: 02/Jul/10 10:43 AM
Component/s: Core: Routing / Filters
Affects Version/s: 2.1.1
Fix Version/s: 3.0.0-M1

Time Tracking:
Not Specified

File Attachments: 1. Zip Archive files.zip (4 kB)

Environment: JDK 1.5
Issue Links:
Duplicate
 

Labels: 22-candidates
User impact: Medium
Configuration:
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesource.org/schema/mule/core/2.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:vm="http://www.mulesource.org/schema/mule/vm/2.1"
xsi:schemaLocation="http://www.mulesource.org/schema/mule/core/2.1 http://www.mulesource.org/schema/mule/core/2.1/mule.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.mulesource.org/schema/mule/vm/2.1 http://www.mulesource.org/schema/mule/vm/2.1/mule-vm.xsd">

<spring:bean class="be.telenet.isps.server.MyComponent1" name="MyComponent"/>
<spring:bean class="be.telenet.isps.server.MyComponent2" name="MyBound"/>

<model name="testmodel">
<service name="Binding">
<inbound>
<vm:inbound-endpoint address="vm://bindingEP" remoteSync="true" synchronous="true">
</vm:inbound-endpoint>
</inbound>
<component>
<spring-object bean="MyComponent"></spring-object>
<binding interface="be.telenet.isps.server.MyInterface" >
<vm:outbound-endpoint address="vm://boundEP" remoteSync="true" synchronous="true"/>
</binding>
</component>
</service>

<service name="Bound">
<inbound><vm:inbound-endpoint address="vm://boundEP" remoteSync="true" synchronous="true"/></inbound>
<component><spring-object bean="MyBound"></spring-object></component>
</service>
</model>
</mule>

Log Output:

================================================================================
= Testing: binding (be.telenet.isps.server.BindingTest) =
================================================================================
INFO 2009-01-30 20:11:45,814 [main] org.mule.config.spring.MuleApplicationContext: Refreshing org.mule.config.spring.MuleApplicationContext@7667bd: display name [org.mule.config.spring.MuleApplicationContext@7667bd]; startup date [Fri Jan 30 20:11:45 CET 2009]; root of context hierarchy
INFO 2009-01-30 20:11:45,892 [main] org.springframework.beans.factory.xml.XmlBeanDefinitionReader: Loading XML bean definitions from URL [jar:file:/Users/fstaes/Documents/workspaces/workspaceTelenet/IspsMule/lib/mule-2.1.1/mule-module-spring-config-2.1.1.jar!/default-mule-config.xml]
INFO 2009-01-30 20:11:46,848 [main] org.springframework.beans.factory.support.DefaultListableBeanFactory: Overriding bean definition for bean '_muleConfiguration': replacing [Generic bean: class [org.mule.config.spring.MuleConfigurationConfigurator]; scope=singleton; abstract=false; lazyInit=false; autowireCandidate=true; autowireMode=0; dependencyCheck=0; factoryBeanName=null; factoryMethodName=null; initMethodName=initialise; destroyMethodName=null; defined in URL [jar:file:/Users/fstaes/Documents/workspaces/workspaceTelenet/IspsMule/lib/mule-2.1.1/mule-module-spring-config-2.1.1.jar!/default-mule-config.xml]] with [Generic bean: class [org.mule.config.spring.MuleConfigurationConfigurator]; scope=singleton; abstract=false; lazyInit=false; autowireCandidate=true; autowireMode=0; dependencyCheck=0; factoryBeanName=null; factoryMethodName=null; initMethodName=initialise; destroyMethodName=null; defined in URL [jar:file:/Users/fstaes/Documents/workspaces/workspaceTelenet/IspsMule/lib/mule-2.1.1/mule-module-spring-config-2.1.1.jar!/default-mule-config.xml]]
INFO 2009-01-30 20:11:46,851 [main] org.springframework.beans.factory.support.DefaultListableBeanFactory: Overriding bean definition for bean '_muleConfiguration': replacing [Generic bean: class [org.mule.config.spring.MuleConfigurationConfigurator]; scope=singleton; abstract=false; lazyInit=false; autowireCandidate=true; autowireMode=0; dependencyCheck=0; factoryBeanName=null; factoryMethodName=null; initMethodName=initialise; destroyMethodName=null; defined in URL [jar:file:/Users/fstaes/Documents/workspaces/workspaceTelenet/IspsMule/lib/mule-2.1.1/mule-module-spring-config-2.1.1.jar!/default-mule-config.xml]] with [Generic bean: class [org.mule.config.spring.MuleConfigurationConfigurator]; scope=singleton; abstract=false; lazyInit=false; autowireCandidate=true; autowireMode=0; dependencyCheck=0; factoryBeanName=null; factoryMethodName=null; initMethodName=initialise; destroyMethodName=null; defined in URL [jar:file:/Users/fstaes/Documents/workspaces/workspaceTelenet/IspsMule/lib/mule-2.1.1/mule-module-spring-config-2.1.1.jar!/default-mule-config.xml]]
INFO 2009-01-30 20:11:46,864 [main] org.springframework.beans.factory.support.DefaultListableBeanFactory: Overriding bean definition for bean '_muleNotificationManager': replacing [Generic bean: class [org.mule.config.spring.ServerNotificationManagerConfigurator]; scope=singleton; abstract=false; lazyInit=false; autowireCandidate=true; autowireMode=0; dependencyCheck=0; factoryBeanName=null; factoryMethodName=null; initMethodName=initialise; destroyMethodName=null; defined in URL [jar:file:/Users/fstaes/Documents/workspaces/workspaceTelenet/IspsMule/lib/mule-2.1.1/mule-module-spring-config-2.1.1.jar!/default-mule-config.xml]] with [Generic bean: class [org.mule.config.spring.ServerNotificationManagerConfigurator]; scope=singleton; abstract=false; lazyInit=false; autowireCandidate=true; autowireMode=0; dependencyCheck=0; factoryBeanName=null; factoryMethodName=null; initMethodName=initialise; destroyMethodName=null; defined in URL [jar:file:/Users/fstaes/Documents/workspaces/workspaceTelenet/IspsMule/lib/mule-2.1.1/mule-module-spring-config-2.1.1.jar!/default-mule-config.xml]]
INFO 2009-01-30 20:11:46,864 [main] org.springframework.beans.factory.support.DefaultListableBeanFactory: Overriding bean definition for bean '_muleNotificationManager': replacing [Generic bean: class [org.mule.config.spring.ServerNotificationManagerConfigurator]; scope=singleton; abstract=false; lazyInit=false; autowireCandidate=true; autowireMode=0; dependencyCheck=0; factoryBeanName=null; factoryMethodName=null; initMethodName=initialise; destroyMethodName=null; defined in URL [jar:file:/Users/fstaes/Documents/workspaces/workspaceTelenet/IspsMule/lib/mule-2.1.1/mule-module-spring-config-2.1.1.jar!/default-mule-config.xml]] with [Generic bean: class [org.mule.config.spring.ServerNotificationManagerConfigurator]; scope=singleton; abstract=false; lazyInit=false; autowireCandidate=true; autowireMode=0; dependencyCheck=0; factoryBeanName=null; factoryMethodName=null; initMethodName=initialise; destroyMethodName=null; defined in URL [jar:file:/Users/fstaes/Documents/workspaces/workspaceTelenet/IspsMule/lib/mule-2.1.1/mule-module-spring-config-2.1.1.jar!/default-mule-config.xml]]
INFO 2009-01-30 20:11:46,878 [main] org.springframework.beans.factory.support.DefaultListableBeanFactory: Overriding bean definition for bean '_muleSystemModel': replacing [Root bean: class [org.mule.model.seda.SedaModel]; scope=singleton; abstract=false; lazyInit=false; autowireCandidate=true; autowireMode=0; dependencyCheck=0; factoryBeanName=null; factoryMethodName=null; initMethodName=initialise; destroyMethodName=dispose] with [Root bean: class [org.mule.model.seda.SedaModel]; scope=singleton; abstract=false; lazyInit=false; autowireCandidate=true; autowireMode=0; dependencyCheck=0; factoryBeanName=null; factoryMethodName=null; initMethodName=initialise; destroyMethodName=dispose]
INFO 2009-01-30 20:11:46,888 [main] org.springframework.beans.factory.xml.XmlBeanDefinitionReader: Loading XML bean definitions from URL [file:/Users/fstaes/Documents/workspaces/workspaceTelenet/IspsMule/bin/binding.xml]
INFO 2009-01-30 20:11:47,041 [main] org.springframework.beans.factory.support.DefaultListableBeanFactory: Overriding bean definition for bean 'testmodel': replacing [Root bean: class [org.mule.model.seda.SedaModel]; scope=singleton; abstract=false; lazyInit=false; autowireCandidate=true; autowireMode=0; dependencyCheck=0; factoryBeanName=null; factoryMethodName=null; initMethodName=initialise; destroyMethodName=dispose] with [Root bean: class [org.mule.model.seda.SedaModel]; scope=singleton; abstract=false; lazyInit=false; autowireCandidate=true; autowireMode=0; dependencyCheck=0; factoryBeanName=null; factoryMethodName=null; initMethodName=initialise; destroyMethodName=dispose]
INFO 2009-01-30 20:11:47,109 [main] org.mule.config.spring.MuleApplicationContext: Bean factory for application context [org.mule.config.spring.MuleApplicationContext@7667bd]: org.springframework.beans.factory.support.DefaultListableBeanFactory@dbe530
INFO 2009-01-30 20:11:47,273 [main] org.springframework.beans.factory.support.DefaultListableBeanFactory: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@dbe530: defining beans [customEditorConfigurer,_muleObjectNameProcessor,_mulePropertyPlaceholderProcessor,_muleSimpleRegistryBootstrap,_muleNotificationManager,_muleConfiguration,._muleNotificationManager:notification.1,._muleNotificationManager:notification.2,._muleNotificationManager:notification.3,._muleNotificationManager:notification.4,._muleNotificationManager:notification.5,._muleNotificationManager:notification.6,._muleNotificationManager:notification.7,._muleNotificationManager:notification.8,._muleNotificationManager:notification.9,._muleNotificationManager:notification.10,_muleSystemModel,_muleQueueManager,_muleSecurityManager,_muleProperties,_muleEndpointFactory,_muleStreamCloserService,_defaultThreadingProfile,_defaultMessageDispatcherThreadingProfile,_defaultMessageRequesterThreadingProfile,_defaultMessageReceiverThreadingProfile,_defaultServiceThreadingProfile,_defaultRetryPolicyTemplate,MyComponent,MyBound,testmodel,Binding,.Binding:inbound.11,.Binding:inbound.11:inbound-endpoint.12,.Binding:component.13,.Binding:component.13:spring-object.14,.Binding:component.13:binding.15,.Binding:component.13:binding.15:outbound-endpoint.16,Bound,.Bound:inbound.17,.Bound:inbound.17:inbound-endpoint.18,.Bound:component.19,.Bound:component.19:spring-object.20]; root of factory hierarchy
WARN 2009-01-30 20:11:47,405 [main] org.mule.registry.TransientRegistry: TransientRegistry already contains an object named '_ServletRequestToOutputHandler'. The previous object will be overwritten.
WARN 2009-01-30 20:11:47,406 [main] org.mule.registry.TransientRegistry: TransientRegistry already contains an object named '_ObjectToString'. The previous object will be overwritten.
WARN 2009-01-30 20:11:47,407 [main] org.mule.registry.TransientRegistry: TransientRegistry already contains an object named '_ObjectToByteArray'. The previous object will be overwritten.
WARN 2009-01-30 20:11:47,409 [main] org.mule.registry.TransientRegistry: TransientRegistry already contains an object named '_ObjectToOutputHandler'. The previous object will be overwritten.
WARN 2009-01-30 20:11:47,409 [main] org.mule.registry.TransientRegistry: TransientRegistry already contains an object named '_ObjectToInputStream'. The previous object will be overwritten.
WARN 2009-01-30 20:11:47,417 [main] org.mule.registry.TransientRegistry: TransientRegistry already contains an object named '_XmlToOutputHandler'. The previous object will be overwritten.
WARN 2009-01-30 20:11:47,419 [main] org.mule.registry.TransientRegistry: TransientRegistry already contains an object named '_DomDocumentToString'. The previous object will be overwritten.
WARN 2009-01-30 20:11:47,420 [main] org.mule.registry.TransientRegistry: TransientRegistry already contains an object named '_XmlToDocumentResult'. The previous object will be overwritten.
WARN 2009-01-30 20:11:47,421 [main] org.mule.registry.TransientRegistry: TransientRegistry already contains an object named 'XmlToDom4jDocument'. The previous object will be overwritten.
WARN 2009-01-30 20:11:47,422 [main] org.mule.registry.TransientRegistry: TransientRegistry already contains an object named 'XmlToW3CDocument'. The previous object will be overwritten.
WARN 2009-01-30 20:11:47,424 [main] org.mule.registry.TransientRegistry: TransientRegistry already contains an object named '_ServletRequestToOutputHandler'. The previous object will be overwritten.
WARN 2009-01-30 20:11:47,424 [main] org.mule.registry.TransientRegistry: TransientRegistry already contains an object named '_JMSMessageToByteArray'. The previous object will be overwritten.
WARN 2009-01-30 20:11:47,425 [main] org.mule.registry.TransientRegistry: TransientRegistry already contains an object named '_JMSMessageToString'. The previous object will be overwritten.
WARN 2009-01-30 20:11:47,426 [main] org.mule.registry.TransientRegistry: TransientRegistry already contains an object named '_JMSMessageToHashtable'. The previous object will be overwritten.
WARN 2009-01-30 20:11:47,426 [main] org.mule.registry.TransientRegistry: TransientRegistry already contains an object named '_JMSMessageToVector'. The previous object will be overwritten.
WARN 2009-01-30 20:11:47,426 [main] org.mule.registry.TransientRegistry: TransientRegistry already contains an object named '_JMSMessageToObject'. The previous object will be overwritten.
WARN 2009-01-30 20:11:47,427 [main] org.mule.registry.TransientRegistry: TransientRegistry already contains an object named '_ObjectToMessage'. The previous object will be overwritten.
INFO 2009-01-30 20:11:47,661 [main] org.mule.transport.vm.VMConnector: Initialising: VMConnector{this=7ec736, started=false, initialised=false, name='connector.VM.0', disposed=false, numberOfConcurrentTransactedReceivers=4, createMultipleTransactedReceivers=true, connected=false, supportedProtocols=[vm], serviceOverrides=null}
INFO 2009-01-30 20:11:47,666 [main] org.mule.DefaultExceptionStrategy: Initialising exception listener: org.mule.DefaultExceptionStrategy@a30a0b
INFO 2009-01-30 20:11:47,727 [main] org.mule.component.DefaultJavaComponent: Initialising: org.mule.component.DefaultJavaComponent component for: null
INFO 2009-01-30 20:11:47,738 [main] org.mule.component.DefaultJavaComponent: Initialising: org.mule.component.DefaultJavaComponent component for: null
INFO 2009-01-30 20:11:47,739 [main] org.mule.config.builders.AutoConfigurationBuilder: Configured Mule using "org.mule.config.spring.SpringXmlConfigurationBuilder" with configuration resource(s): "[ConfigResource{resourceName='binding.xml'}]"
INFO 2009-01-30 20:11:47,759 [main] org.mule.transport.vm.VMConnector: Starting: VMConnector{this=7ec736, started=false, initialised=true, name='connector.VM.0', disposed=false, numberOfConcurrentTransactedReceivers=4, createMultipleTransactedReceivers=true, connected=true, supportedProtocols=[vm], serviceOverrides=null}
INFO 2009-01-30 20:11:47,763 [main] org.mule.transport.vm.VMConnector: Started: VMConnector{this=7ec736, started=true, initialised=true, name='connector.VM.0', disposed=false, numberOfConcurrentTransactedReceivers=4, createMultipleTransactedReceivers=true, connected=true, supportedProtocols=[vm], serviceOverrides=null}
INFO 2009-01-30 20:11:47,764 [main] org.mule.component.DefaultJavaComponent: Starting: org.mule.component.DefaultJavaComponent component for: Binding
INFO 2009-01-30 20:11:47,782 [main] org.mule.transport.vm.VMConnector: Registering listener: Binding on endpointUri: vm://bindingEP
INFO 2009-01-30 20:11:47,792 [main] org.mule.model.seda.SedaService: Service Binding has been started successfully
INFO 2009-01-30 20:11:47,792 [main] org.mule.component.DefaultJavaComponent: Starting: org.mule.component.DefaultJavaComponent component for: Bound
INFO 2009-01-30 20:11:47,792 [main] org.mule.transport.vm.VMConnector: Registering listener: Bound on endpointUri: vm://boundEP
INFO 2009-01-30 20:11:47,793 [main] org.mule.model.seda.SedaService: Service Bound has been started successfully
INFO 2009-01-30 20:11:47,793 [main] org.mule.util.queue.TransactionalQueueManager: Starting ResourceManager
INFO 2009-01-30 20:11:47,793 [main] org.mule.util.queue.TransactionalQueueManager: Started ResourceManager
INFO 2009-01-30 20:11:47,810 [main] org.mule.DefaultMuleContext:
**********************************************************************
* Mule ESB and Integration Platform *
* Version: 2.1.1 Build: 13103 *
* MuleSource, Inc. *
* For more information go to http://mule.mulesource.org *
* *
* Server started: 1/30/09 8:11 PM *
* Server ID: d60cc694-ef01-11dd-93e8-93ac486185ea *
* JDK: 1.5.0_16 (mixed mode, sharing) *
* Encoding: OS: MacRoman, Mule: UTF-8 *
* OS: Mac OS X (10.5.6, i386) *
* Host: new-host-7.linksys (192.168.1.112) *
* *
* Agents Running: None *
**********************************************************************
INFO 2009-01-30 20:11:47,816 [main] org.mule.module.client.MuleClient: Using existing MuleContext: org.mule.DefaultMuleContext@9f7a91
Calling nested router, passing
Executed myMethod on component by nested router with arg Hello, returning null
ERROR 2009-01-30 20:11:47,876 [main] org.mule.service.DefaultServiceExceptionStrategy:
********************************************************************************
Message : Component that caused exception is: Binding. Message payload is of type: NullPayload
Type : org.mule.api.service.ServiceException
Code : MULE_ERROR--2
JavaDoc : http://www.mulesource.org/docs/site/current2/apidocs/org/mule/api/service/ServiceException.html
Payload : {NullPayload}
********************************************************************************
Exception stack is:
1. org.mule.transport.NullPayload (java.lang.ClassCastException)
  be.telenet.isps.server.$Proxy0:-1 (http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ClassCastException.html)
2. Component that caused exception is: Binding. Message payload is of type: NullPayload (org.mule.api.service.ServiceException)
  org.mule.component.DefaultLifecycleAdapter:208 (http://www.mulesource.org/docs/site/current2/apidocs/org/mule/api/service/ServiceException.html)
********************************************************************************
Root Exception stack trace:
java.lang.ClassCastException: org.mule.transport.NullPayload
at be.telenet.isps.server.$Proxy0.myMethod(Unknown Source)
at be.telenet.isps.server.MyComponent1.doit(MyComponent1.java:14)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.mule.model.resolvers.AbstractEntryPointResolver.invokeMethod(AbstractEntryPointResolver.java:154)
at org.mule.model.resolvers.ReflectionEntryPointResolver.invoke(ReflectionEntryPointResolver.java:178)
at org.mule.model.resolvers.DefaultEntryPointResolverSet.invoke(DefaultEntryPointResolverSet.java:50)
at org.mule.component.DefaultLifecycleAdapter.invoke(DefaultLifecycleAdapter.java:197)
at org.mule.component.AbstractJavaComponent.invokeComponentInstance(AbstractJavaComponent.java:83)
at org.mule.component.AbstractJavaComponent.doInvoke(AbstractJavaComponent.java:74)
at org.mule.component.AbstractComponent.invokeInternal(AbstractComponent.java:125)
at org.mule.component.AbstractComponent.invoke(AbstractComponent.java:153)
at org.mule.service.AbstractService.invokeComponent(AbstractService.java:932)
at org.mule.model.seda.SedaService.doSend(SedaService.java:229)
at org.mule.service.AbstractService.sendEvent(AbstractService.java:505)
at org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java:354)
at org.mule.routing.inbound.DefaultInboundRouterCollection.send(DefaultInboundRouterCollection.java:220)
at org.mule.routing.inbound.DefaultInboundRouterCollection.route(DefaultInboundRouterCollection.java:180)
at org.mule.transport.AbstractMessageReceiver$DefaultInternalMessageListener.onMessage(AbstractMessageReceiver.java:365)
at org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:253)
at org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:176)
at org.mule.transport.vm.VMMessageReceiver.onCall(VMMessageReceiver.java:107)
at org.mule.transport.vm.VMMessageDispatcher$2.doInTransaction(VMMessageDispatcher.java:125)
at org.mule.transaction.TransactionTemplate.execute(TransactionTemplate.java:99)
at org.mule.transport.vm.VMMessageDispatcher.doSend(VMMessageDispatcher.java:128)
at org.mule.transport.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:168)
at org.mule.transport.AbstractConnector.send(AbstractConnector.java:1910)
at org.mule.endpoint.DefaultOutboundEndpoint.send(DefaultOutboundEndpoint.java:77)
at org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java:327)
at org.mule.module.client.MuleClient.send(MuleClient.java:650)
at org.mule.module.client.MuleClient.send(MuleClient.java:596)
at be.telenet.isps.server.BindingTest.testBinding(BindingTest.java:20)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at org.mule.tck.AbstractMuleTestCase.runBare(AbstractMuleTestCase.java:235)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at org.mule.tck.AbstractMuleTestCase.run(AbstractMuleTestCase.java:215)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:79)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

********************************************************************************

WARN 2009-01-30 20:11:47,881 [main] org.mule.config.ExceptionHelper: Failed to load error mappings from: META-INF/services/org/mule/config/vm-exception-mappings.properties This may be because there are no error code mappings for protocol: vm
INFO 2009-01-30 20:11:47,901 [main] org.mule.transport.vm.VMConnector: Removing listener on endpointUri: vm://bindingEP
INFO 2009-01-30 20:11:47,901 [main] org.mule.transport.vm.VMMessageReceiver: Disconnected: VMMessageReceiver{this=4a2e75, receiverKey=bindingEP, endpoint=vm://bindingEP}
INFO 2009-01-30 20:11:47,902 [main] org.mule.component.DefaultJavaComponent: Stopping: org.mule.component.DefaultJavaComponent component for: Binding
INFO 2009-01-30 20:11:47,902 [main] org.mule.model.seda.SedaService: Mule Service Binding has been stopped successfully
INFO 2009-01-30 20:11:47,903 [main] org.mule.transport.vm.VMConnector: Removing listener on endpointUri: vm://boundEP
INFO 2009-01-30 20:11:47,903 [main] org.mule.transport.vm.VMMessageReceiver: Disconnected: VMMessageReceiver{this=62a9bf, receiverKey=boundEP, endpoint=vm://boundEP}
INFO 2009-01-30 20:11:47,904 [main] org.mule.component.DefaultJavaComponent: Stopping: org.mule.component.DefaultJavaComponent component for: Bound
INFO 2009-01-30 20:11:47,904 [main] org.mule.model.seda.SedaService: Mule Service Bound has been stopped successfully
INFO 2009-01-30 20:11:47,904 [main] org.mule.transport.vm.VMConnector: Stopping: VMConnector{this=7ec736, started=true, initialised=true, name='connector.VM.0', disposed=false, numberOfConcurrentTransactedReceivers=4, createMultipleTransactedReceivers=true, connected=true, supportedProtocols=[vm], serviceOverrides=null}
INFO 2009-01-30 20:11:47,904 [main] org.mule.transport.vm.VMConnector: Stopped: VMConnector{this=7ec736, started=false, initialised=true, name='connector.VM.0', disposed=false, numberOfConcurrentTransactedReceivers=4, createMultipleTransactedReceivers=true, connected=false, supportedProtocols=[vm], serviceOverrides=null}
INFO 2009-01-30 20:11:47,904 [main] org.mule.transport.vm.VMConnector: Disconnected: VMConnector{this=7ec736, started=false, initialised=true, name='connector.VM.0', disposed=false, numberOfConcurrentTransactedReceivers=4, createMultipleTransactedReceivers=true, connected=false, supportedProtocols=[vm], serviceOverrides=null}
INFO 2009-01-30 20:11:47,904 [main] org.mule.transport.vm.VMConnector: Stopped: VMConnector{this=7ec736, started=false, initialised=true, name='connector.VM.0', disposed=false, numberOfConcurrentTransactedReceivers=4, createMultipleTransactedReceivers=true, connected=false, supportedProtocols=[vm], serviceOverrides=null}
INFO 2009-01-30 20:11:47,905 [main] org.mule.util.queue.TransactionalQueueManager: Stopping ResourceManager
INFO 2009-01-30 20:11:47,905 [main] org.mule.util.queue.TransactionalQueueManager: Stopped ResourceManager
INFO 2009-01-30 20:11:47,933 [main] org.mule.transport.vm.VMConnector: Disposing: VMConnector{this=7ec736, started=false, initialised=true, name='connector.VM.0', disposed=false, numberOfConcurrentTransactedReceivers=4, createMultipleTransactedReceivers=true, connected=false, supportedProtocols=[vm], serviceOverrides=null}
INFO 2009-01-30 20:11:47,933 [main] org.mule.transport.vm.VMConnector: Stopped: VMConnector{this=7ec736, started=false, initialised=true, name='connector.VM.0', disposed=false, numberOfConcurrentTransactedReceivers=4, createMultipleTransactedReceivers=true, connected=false, supportedProtocols=[vm], serviceOverrides=null}
INFO 2009-01-30 20:11:47,934 [main] org.mule.transport.vm.VMMessageDispatcher: Disconnected: VMMessageDispatcher{this=4ab6e3, endpoint=vm://boundEP, disposed=false}
INFO 2009-01-30 20:11:47,934 [main] org.mule.transport.vm.VMMessageDispatcher: Disconnected: VMMessageDispatcher{this=7cbe54, endpoint=vm://bindingEP, disposed=false}
INFO 2009-01-30 20:11:47,934 [main] org.mule.transport.vm.VMConnector: Disposed: VMConnector{this=7ec736, started=false, initialised=false, name='connector.VM.0', disposed=true, numberOfConcurrentTransactedReceivers=4, createMultipleTransactedReceivers=true, connected=false, supportedProtocols=[vm], serviceOverrides=null}
INFO 2009-01-30 20:11:47,934 [main] org.mule.config.spring.MuleApplicationContext: Closing org.mule.config.spring.MuleApplicationContext@7667bd: display name [org.mule.config.spring.MuleApplicationContext@7667bd]; startup date [Fri Jan 30 20:11:45 CET 2009]; root of context hierarchy
INFO 2009-01-30 20:11:47,934 [main] org.springframework.beans.factory.support.DefaultListableBeanFactory: Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@dbe530: defining beans [customEditorConfigurer,_muleObjectNameProcessor,_mulePropertyPlaceholderProcessor,_muleSimpleRegistryBootstrap,_muleNotificationManager,_muleConfiguration,._muleNotificationManager:notification.1,._muleNotificationManager:notification.2,._muleNotificationManager:notification.3,._muleNotificationManager:notification.4,._muleNotificationManager:notification.5,._muleNotificationManager:notification.6,._muleNotificationManager:notification.7,._muleNotificationManager:notification.8,._muleNotificationManager:notification.9,._muleNotificationManager:notification.10,_muleSystemModel,_muleQueueManager,_muleSecurityManager,_muleProperties,_muleEndpointFactory,_muleStreamCloserService,_defaultThreadingProfile,_defaultMessageDispatcherThreadingProfile,_defaultMessageRequesterThreadingProfile,_defaultMessageReceiverThreadingProfile,_defaultServiceThreadingProfile,_defaultRetryPolicyTemplate,MyComponent,MyBound,testmodel,Binding,.Binding:inbound.11,.Binding:inbound.11:inbound-endpoint.12,.Binding:component.13,.Binding:component.13:spring-object.14,.Binding:component.13:binding.15,.Binding:component.13:binding.15:outbound-endpoint.16,Bound,.Bound:inbound.17,.Bound:inbound.17:inbound-endpoint.18,.Bound:component.19,.Bound:component.19:spring-object.20]; root of factory hierarchy
WARN 2009-01-30 20:11:47,935 [MuleServer.1] org.mule.context.notification.ServerNotificationManager: Notification not delivered after ServerNotificationManager disposal: ServiceNotification{action=service disposed, resourceId=Bound, serverId=Bound, timestamp=1233342707935}
INFO 2009-01-30 20:11:47,939 [main] org.mule.DefaultMuleContext:
**********************************************************************
* Mule shut down normally on: 1/30/09 8:11 PM *
* Server was up for: 0 days, 0 hours, 0 mins, 0.197 sec *
**********************************************************************
Migration Impact:
Proposed patch:

NestedInvocationHandler.java, around line 120:

        if (reply != null)
        {
            if (reply.getExceptionPayload() != null)
            {
                throw reply.getExceptionPayload().getException();
            }
 ++ else if (reply.getPayload() == NullPayload.getInstance() && !method.getReturnType().isInstance(reply.getPayload()))
 ++ {
 ++ return null;
 ++ }
            else
            {
                 return reply.getPayload();
            }
        }
        else
        {
            return null;
        }
Similar Issues: MULE-3319 Implement script component bindings using expressions
MULE-3455 Groovy script component could support component bindings
MULE-3422 Bindings on the script component are not well defined


 Description  « Hide
When synchronously invoking a method on a nested router, and the invoked component returns null, one gets a ClassCastException.

Used Java classes:


package be.telenet.isps.server;

import java.util.Map;

import org.mule.DefaultMuleMessage;
import org.mule.api.MuleException;
import org.mule.api.MuleMessage;
import org.mule.module.client.MuleClient;
import org.mule.tck.FunctionalTestCase;

public class BindingTest extends FunctionalTestCase {

@Override
protected String getConfigResources() { return "binding.xml"; }

public void testBinding() throws MuleException { MuleClient client = new MuleClient(); MuleMessage result = client.send("vm://bindingEP",new DefaultMuleMessage("", (Map)null)); }

}
--------
package be.telenet.isps.server;

import java.util.Date;

interface MyInterface {
public Date myMethod(String s);
}
--------
package be.telenet.isps.server;

import java.util.Date;

public class MyComponent1 {

private MyInterface iface;

public void setMyInterface(MyInterface i) { this.iface = i; }
public String doit(String s) { System.out.println("Calling nested router, passing " + s); Date result = iface.myMethod("Hello"); System.out.println("Received " + result + " from nested router"); return ""; }
}
------
package be.telenet.isps.server;

import java.util.Date;

public class MyComponent2 {
public Date myMethod(String s) { System.out.println("Executed myMethod on component by nested router with arg " + s + ", returning null"); return null; }
}



 All   Comments   Work Log   Change History   Transitions   FishEye      Sort Order: Ascending order - Click to sort in descending order
Daniel Zapata added a comment - 03/Feb/09 11:35 AM
AP suspects it is fixed in 2.2

Francois Staes added a comment - 12/Feb/09 11:12 AM
Same problem exists in the 2.2 snapshot.
Same proposed change can be applied to 2.2's BindingInvocationHandler to resolve the issue.

Ross Mason added a comment - 09/May/09 02:16 PM
Thanks for reporting. This is fixed: http://fisheye.codehaus.org/changelog/mule/?cs=14676.
Now just need to merge it

Andrew Perepelytsya added a comment - 16/Jun/09 08:57 AM
Ross, have you ever merged it? See the dup issue too.

Eugene Berman added a comment - 02/Jul/10 10:43 AM
Folks, is this merged in 2.2.x? What is the changelog (the one in Ross comment is for tests, but where is the actual fix?)
Customer needs patch for 2.2.1 CE.