org.mule.api.transformer.TransformerException: The object transformed is of type : "NullPayload", but the expected return type is "String"

MuleSoft JIRA | Daniel Zapata | 8 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Steps to reproduce: * Build the webapp example using ant * deploy the webapp to your tomcat container * Go to http://localhost:8080/mule-examples * Click on 'REST Hello World' link in the left menu * Type some text in the box and click post You will see a blank response in the browser The tomcat logs show: [07-17 14:16:11] INFO StdioMessageDispatcher [SystemStreamConnector.dispatcher. 3]: Connected: endpoint.outbound.stdio://system.err ExceptionMessage{message=payload=Post, context={Host=localhost:8080, accept-enco ding=gzip,deflate, referer=http://localhost:8080/mule-examples/resthelloworld.js p, connection=keep-alive, accept-charset=ISO-8859-1,utf-8;q=0.7,*;q=0.7, endpoin t=greeter, MULE_ENCODING=UTF-8, content-type=application/x-www-form-urlencoded, cookie=JSESSIONID=3EA3E4CBBCF25193DC81F3B1B3D86C9A, keep-alive=300, MULE_REMOTE_ SYNC=true, org.mule.servlet.payload.param=payload, content-length=12, accept-lan guage=en-us,en;q=0.5, user-agent=Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10, MULE_ORIGINATING_ENDPOINT=endpoin t.servlet.rest, accept=text/html,application/xhtml+xml,application/xml;q=0.9,*/* ;q=0.8}exception=org.mule.api.service.ServiceException: Component that caused ex ception is: SedaService{GreeterUMO}. Message payload is of type: CoyoteInputStre am, componentName='GreeterUMO', endpointUri=http://localhost:8080/restnull?endpo int=greeter, timeStamp=Fri Jul 17 14:16:11 PDT 2009}[07-17 14:45:40] ERROR Defau ltServiceExceptionStrategy [http-8080-3]: ******************************************************************************** Message : The object transformed is of type: "NullPayload", but th e expected return type is "String" Type : org.mule.api.transformer.TransformerException Code : MULE_ERROR-65053 Transformer : HttpRequestToParameter{this=143a083, name='HttpRequestTo Parameter', ignoreBadInput=false, returnClass=class java.lang.String, sourceType s=[class java.lang.Object]} JavaDoc : http://www.mulesource.org/docs/site/current2/apidocs/org /mule/api/transformer/TransformerException.html ******************************************************************************** Exception stack is: 1. The object transformed is of type: "NullPayload", but the expected return typ e is "String" (org.mule.api.transformer.TransformerException) org.mule.transformer.AbstractTransformer:87 (http://www.mulesource.org/docs/si te/current2/apidocs/org/mule/api/transformer/TransformerException.html) ******************************************************************************** Root Exception stack trace: org.mule.api.transformer.TransformerException: The object transformed is of type : "NullPayload", but the expected return type is "String" at org.mule.transformer.AbstractTransformer.checkReturnClass(AbstractTra nsformer.java:87) at org.mule.transformer.AbstractTransformer.transform(AbstractTransforme r.java:267) at org.mule.DefaultMuleMessage.applyAllTransformers(DefaultMuleMessage.j ava:639) at org.mule.DefaultMuleMessage.applyTransformers(DefaultMuleMessage.java :600) at org.mule.DefaultMuleMessage.applyTransformers(DefaultMuleMessage.java :593) at org.mule.DefaultMuleEvent.transformMessage(DefaultMuleEvent.java:326) at org.mule.DefaultMuleEvent.transformMessage(DefaultMuleEvent.java:321) at org.mule.DefaultMuleEventContext.transformMessage(DefaultMuleEventCon text.java:91) at org.mule.model.resolvers.AbstractEntryPointResolver.getPayloadFromMes sage(AbstractEntryPointResolver.java:122) at org.mule.model.resolvers.ReflectionEntryPointResolver.invoke(Reflecti onEntryPointResolver.java:118) at org.mule.model.resolvers.DefaultEntryPointResolverSet.invoke(DefaultE ntryPointResolverSet.java:50) at org.mule.component.DefaultLifecycleAdapter.invoke(DefaultLifecycleAda pter.java:205) at org.mule.component.AbstractJavaComponent.invokeComponentInstance(Abst ractJavaComponent.java:83) at org.mule.component.AbstractJavaComponent.doInvoke(AbstractJavaCompone nt.java:74) at org.mule.component.AbstractComponent.invokeInternal(AbstractComponent .java:133) at org.mule.component.AbstractComponent.invoke(AbstractComponent.java:16 1) at org.mule.service.AbstractService.invokeComponent(AbstractService.java :929) at org.mule.model.seda.SedaService.doSend(SedaService.java:260) at org.mule.service.AbstractService.sendEvent(AbstractService.java:500) at org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java:354) at org.mule.routing.inbound.DefaultInboundRouterCollection.send(DefaultI nboundRouterCollection.java:228) at org.mule.routing.inbound.DefaultInboundRouterCollection.route(Default InboundRouterCollection.java:188) at org.mule.transport.AbstractMessageReceiver$DefaultInternalMessageList ener.onMessage(AbstractMessageReceiver.java:359) at org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessa geReceiver.java:252) at org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessa geReceiver.java:175) at org.mule.transport.servlet.MuleRESTReceiverServlet.doPost(MuleRESTRec eiverServlet.java:103) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV alve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV alve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j ava:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j ava:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal ve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav a:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java :849) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce ss(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:45 4) at java.lang.Thread.run(Thread.java:595) ********************************************************************************

    MuleSoft JIRA | 8 years ago | Daniel Zapata
    org.mule.api.transformer.TransformerException: The object transformed is of type : "NullPayload", but the expected return type is "String"
  2. 0

    Steps to reproduce: * Build the webapp example using ant * deploy the webapp to your tomcat container * Go to http://localhost:8080/mule-examples * Click on 'REST Hello World' link in the left menu * Type some text in the box and click post You will see a blank response in the browser The tomcat logs show: [07-17 14:16:11] INFO StdioMessageDispatcher [SystemStreamConnector.dispatcher. 3]: Connected: endpoint.outbound.stdio://system.err ExceptionMessage{message=payload=Post, context={Host=localhost:8080, accept-enco ding=gzip,deflate, referer=http://localhost:8080/mule-examples/resthelloworld.js p, connection=keep-alive, accept-charset=ISO-8859-1,utf-8;q=0.7,*;q=0.7, endpoin t=greeter, MULE_ENCODING=UTF-8, content-type=application/x-www-form-urlencoded, cookie=JSESSIONID=3EA3E4CBBCF25193DC81F3B1B3D86C9A, keep-alive=300, MULE_REMOTE_ SYNC=true, org.mule.servlet.payload.param=payload, content-length=12, accept-lan guage=en-us,en;q=0.5, user-agent=Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10, MULE_ORIGINATING_ENDPOINT=endpoin t.servlet.rest, accept=text/html,application/xhtml+xml,application/xml;q=0.9,*/* ;q=0.8}exception=org.mule.api.service.ServiceException: Component that caused ex ception is: SedaService{GreeterUMO}. Message payload is of type: CoyoteInputStre am, componentName='GreeterUMO', endpointUri=http://localhost:8080/restnull?endpo int=greeter, timeStamp=Fri Jul 17 14:16:11 PDT 2009}[07-17 14:45:40] ERROR Defau ltServiceExceptionStrategy [http-8080-3]: ******************************************************************************** Message : The object transformed is of type: "NullPayload", but th e expected return type is "String" Type : org.mule.api.transformer.TransformerException Code : MULE_ERROR-65053 Transformer : HttpRequestToParameter{this=143a083, name='HttpRequestTo Parameter', ignoreBadInput=false, returnClass=class java.lang.String, sourceType s=[class java.lang.Object]} JavaDoc : http://www.mulesource.org/docs/site/current2/apidocs/org /mule/api/transformer/TransformerException.html ******************************************************************************** Exception stack is: 1. The object transformed is of type: "NullPayload", but the expected return typ e is "String" (org.mule.api.transformer.TransformerException) org.mule.transformer.AbstractTransformer:87 (http://www.mulesource.org/docs/si te/current2/apidocs/org/mule/api/transformer/TransformerException.html) ******************************************************************************** Root Exception stack trace: org.mule.api.transformer.TransformerException: The object transformed is of type : "NullPayload", but the expected return type is "String" at org.mule.transformer.AbstractTransformer.checkReturnClass(AbstractTra nsformer.java:87) at org.mule.transformer.AbstractTransformer.transform(AbstractTransforme r.java:267) at org.mule.DefaultMuleMessage.applyAllTransformers(DefaultMuleMessage.j ava:639) at org.mule.DefaultMuleMessage.applyTransformers(DefaultMuleMessage.java :600) at org.mule.DefaultMuleMessage.applyTransformers(DefaultMuleMessage.java :593) at org.mule.DefaultMuleEvent.transformMessage(DefaultMuleEvent.java:326) at org.mule.DefaultMuleEvent.transformMessage(DefaultMuleEvent.java:321) at org.mule.DefaultMuleEventContext.transformMessage(DefaultMuleEventCon text.java:91) at org.mule.model.resolvers.AbstractEntryPointResolver.getPayloadFromMes sage(AbstractEntryPointResolver.java:122) at org.mule.model.resolvers.ReflectionEntryPointResolver.invoke(Reflecti onEntryPointResolver.java:118) at org.mule.model.resolvers.DefaultEntryPointResolverSet.invoke(DefaultE ntryPointResolverSet.java:50) at org.mule.component.DefaultLifecycleAdapter.invoke(DefaultLifecycleAda pter.java:205) at org.mule.component.AbstractJavaComponent.invokeComponentInstance(Abst ractJavaComponent.java:83) at org.mule.component.AbstractJavaComponent.doInvoke(AbstractJavaCompone nt.java:74) at org.mule.component.AbstractComponent.invokeInternal(AbstractComponent .java:133) at org.mule.component.AbstractComponent.invoke(AbstractComponent.java:16 1) at org.mule.service.AbstractService.invokeComponent(AbstractService.java :929) at org.mule.model.seda.SedaService.doSend(SedaService.java:260) at org.mule.service.AbstractService.sendEvent(AbstractService.java:500) at org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java:354) at org.mule.routing.inbound.DefaultInboundRouterCollection.send(DefaultI nboundRouterCollection.java:228) at org.mule.routing.inbound.DefaultInboundRouterCollection.route(Default InboundRouterCollection.java:188) at org.mule.transport.AbstractMessageReceiver$DefaultInternalMessageList ener.onMessage(AbstractMessageReceiver.java:359) at org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessa geReceiver.java:252) at org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessa geReceiver.java:175) at org.mule.transport.servlet.MuleRESTReceiverServlet.doPost(MuleRESTRec eiverServlet.java:103) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV alve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV alve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j ava:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j ava:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal ve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav a:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java :849) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce ss(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:45 4) at java.lang.Thread.run(Thread.java:595) ********************************************************************************

    MuleSoft JIRA | 8 years ago | Daniel Zapata
    org.mule.api.transformer.TransformerException: The object transformed is of type : "NullPayload", but the expected return type is "String"

    Root Cause Analysis

    1. org.mule.api.transformer.TransformerException

      The object transformed is of type : "NullPayload", but the expected return type is "String"

      at org.mule.transformer.AbstractTransformer.checkReturnClass()
    2. Mule Core
      DefaultMuleSession.sendEvent
      1. org.mule.transformer.AbstractTransformer.checkReturnClass(AbstractTransformer.java:87)
      2. org.mule.transformer.AbstractTransformer.transform(AbstractTransformer.java:267)
      3. org.mule.DefaultMuleMessage.applyAllTransformers(DefaultMuleMessage.java:639)
      4. org.mule.DefaultMuleMessage.applyTransformers(DefaultMuleMessage.java:600)
      5. org.mule.DefaultMuleMessage.applyTransformers(DefaultMuleMessage.java:593)
      6. org.mule.DefaultMuleEvent.transformMessage(DefaultMuleEvent.java:326)
      7. org.mule.DefaultMuleEvent.transformMessage(DefaultMuleEvent.java:321)
      8. org.mule.DefaultMuleEventContext.transformMessage(DefaultMuleEventContext.java:91)
      9. org.mule.model.resolvers.AbstractEntryPointResolver.getPayloadFromMessage(AbstractEntryPointResolver.java:122)
      10. org.mule.model.resolvers.ReflectionEntryPointResolver.invoke(ReflectionEntryPointResolver.java:118)
      11. org.mule.model.resolvers.DefaultEntryPointResolverSet.invoke(DefaultEntryPointResolverSet.java:50)
      12. org.mule.component.DefaultLifecycleAdapter.invoke(DefaultLifecycleAdapter.java:205)
      13. org.mule.component.AbstractJavaComponent.invokeComponentInstance(AbstractJavaComponent.java:83)
      14. org.mule.component.AbstractJavaComponent.doInvoke(AbstractJavaComponent.java:74)
      15. org.mule.component.AbstractComponent.invokeInternal(AbstractComponent.java:133)
      16. org.mule.component.AbstractComponent.invoke(AbstractComponent.java:161)
      17. org.mule.service.AbstractService.invokeComponent(AbstractService.java:929)
      18. org.mule.model.seda.SedaService.doSend(SedaService.java:260)
      19. org.mule.service.AbstractService.sendEvent(AbstractService.java:500)
      20. org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java:354)
      20 frames
    3. org.mule.routing
      DefaultInboundRouterCollection.route
      1. org.mule.routing.inbound.DefaultInboundRouterCollection.send(DefaultInboundRouterCollection.java:228)
      2. org.mule.routing.inbound.DefaultInboundRouterCollection.route(DefaultInboundRouterCollection.java:188)
      2 frames
    4. Mule Core
      AbstractMessageReceiver.routeMessage
      1. org.mule.transport.AbstractMessageReceiver$DefaultInternalMessageListener.onMessage(AbstractMessageReceiver.java:359)
      2. org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:252)
      3. org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:175)
      3 frames
    5. Servlet Transport
      MuleRESTReceiverServlet.doPost
      1. org.mule.transport.servlet.MuleRESTReceiverServlet.doPost(MuleRESTReceiverServlet.java:103)
      1 frame
    6. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
      2. javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      2 frames
    7. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      5. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      6. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      7. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      8. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
      8 frames
    8. Grizzly HTTP
      JIoEndpoint$Worker.run
      1. org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
      2. org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      3. org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
      3 frames
    9. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:595)
      1 frame