java.lang.reflect.InvocationTargetException

MuleSoft JIRA | Victor Bonillo | 6 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    1. Install mule. 2. Run notifications example. 3. Go to http://localhost:8082/services/notifications/ 4. Try to send a message as anonymous. You get nothing in the browser. 5. See the console output. You will see an exception as follows. Interesting fact: This is showing up on CONSOLE, but not on PER-APP-LOGS. {"timestamp":"Thu, 30 Jun 2011 19:29:44 GMT","id":"17","data":{},"channel":"/services/echo","clientId":"swwzr1bae4xf2pv82y"} java.lang.reflect.InvocationTargetException 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:597) at org.mortbay.cometd.BayeuxService.doInvoke(BayeuxService.java:357) at org.mortbay.cometd.BayeuxService.invoke(BayeuxService.java:309) at org.mortbay.cometd.BayeuxService.access$400(BayeuxService.java:59) at org.mortbay.cometd.BayeuxService$AsyncListen.deliver(BayeuxService.java:393) at org.mortbay.cometd.ClientImpl.notifyMessageListener(ClientImpl.java:214) at org.mortbay.cometd.ClientImpl.doDelivery(ClientImpl.java:194) at org.mortbay.cometd.ChannelImpl.deliverToSubscriber(ChannelImpl.java:502) at org.mortbay.cometd.ChannelImpl.doDelivery(ChannelImpl.java:464) at org.mortbay.cometd.ChannelImpl.doDelivery(ChannelImpl.java:494) at org.mortbay.cometd.ChannelImpl.doDelivery(ChannelImpl.java:494) at org.mortbay.cometd.AbstractBayeux$PublishHandler.handle(AbstractBayeux.java:1293) at org.mortbay.cometd.AbstractBayeux.handle(AbstractBayeux.java:287) at org.mortbay.cometd.continuation.ContinuationCometdServlet.service(ContinuationCometdServlet.java:171) at org.mule.transport.ajax.container.MuleAjaxServlet.service(MuleAjaxServlet.java:107) at org.mortbay.cometd.AbstractCometdServlet.service(AbstractCometdServlet.java:265) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) Caused by: org.mule.api.security.UnauthorisedException: Authentication failed for principal anonymous. Message payload is of type: HashMap at org.mule.example.notifications.DummySecurityFilter.authenticate(DummySecurityFilter.java:44) at org.mule.security.AbstractAuthenticationFilter.doFilter(AbstractAuthenticationFilter.java:59) at org.mule.processor.SecurityFilterMessageProcessor.process(SecurityFilterMessageProcessor.java:57) at org.mule.processor.chain.DefaultMessageProcessorChain.doProcess(DefaultMessageProcessorChain.java:88) at org.mule.processor.chain.AbstractMessageProcessorChain.process(AbstractMessageProcessorChain.java:89) at org.mule.processor.chain.InterceptingChainLifecycleWrapper.doProcess(InterceptingChainLifecycleWrapper.java:63) at org.mule.processor.chain.AbstractMessageProcessorChain.process(AbstractMessageProcessorChain.java:89) at org.mule.processor.chain.InterceptingChainLifecycleWrapper.process(InterceptingChainLifecycleWrapper.java:94) at org.mule.processor.chain.DefaultMessageProcessorChain.doProcess(DefaultMessageProcessorChain.java:88) at org.mule.processor.chain.AbstractMessageProcessorChain.process(AbstractMessageProcessorChain.java:89) at org.mule.processor.chain.InterceptingChainLifecycleWrapper.doProcess(InterceptingChainLifecycleWrapper.java:63) at org.mule.processor.chain.AbstractMessageProcessorChain.process(AbstractMessageProcessorChain.java:89) at org.mule.processor.chain.InterceptingChainLifecycleWrapper.process(InterceptingChainLifecycleWrapper.java:94) at org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:185) at org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:158) at org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:145) at org.mule.transport.ajax.AjaxMessageReceiver$ReceiverService.route(AjaxMessageReceiver.java:76) ... 32 more Caused by: org.mule.api.security.UnauthorisedException: Authentication failed for principal anonymous. Message payload is of type: HashMap at org.mule.example.notifications.DummySecurityFilter.authenticate(DummySecurityFilter.java:39) ... 48 more

    MuleSoft JIRA | 6 years ago | Victor Bonillo
    java.lang.reflect.InvocationTargetException
  2. 0

    1. Install mule. 2. Run notifications example. 3. Go to http://localhost:8082/services/notifications/ 4. Try to send a message as anonymous. You get nothing in the browser. 5. See the console output. You will see an exception as follows. Interesting fact: This is showing up on CONSOLE, but not on PER-APP-LOGS. {"timestamp":"Thu, 30 Jun 2011 19:29:44 GMT","id":"17","data":{},"channel":"/services/echo","clientId":"swwzr1bae4xf2pv82y"} java.lang.reflect.InvocationTargetException 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:597) at org.mortbay.cometd.BayeuxService.doInvoke(BayeuxService.java:357) at org.mortbay.cometd.BayeuxService.invoke(BayeuxService.java:309) at org.mortbay.cometd.BayeuxService.access$400(BayeuxService.java:59) at org.mortbay.cometd.BayeuxService$AsyncListen.deliver(BayeuxService.java:393) at org.mortbay.cometd.ClientImpl.notifyMessageListener(ClientImpl.java:214) at org.mortbay.cometd.ClientImpl.doDelivery(ClientImpl.java:194) at org.mortbay.cometd.ChannelImpl.deliverToSubscriber(ChannelImpl.java:502) at org.mortbay.cometd.ChannelImpl.doDelivery(ChannelImpl.java:464) at org.mortbay.cometd.ChannelImpl.doDelivery(ChannelImpl.java:494) at org.mortbay.cometd.ChannelImpl.doDelivery(ChannelImpl.java:494) at org.mortbay.cometd.AbstractBayeux$PublishHandler.handle(AbstractBayeux.java:1293) at org.mortbay.cometd.AbstractBayeux.handle(AbstractBayeux.java:287) at org.mortbay.cometd.continuation.ContinuationCometdServlet.service(ContinuationCometdServlet.java:171) at org.mule.transport.ajax.container.MuleAjaxServlet.service(MuleAjaxServlet.java:107) at org.mortbay.cometd.AbstractCometdServlet.service(AbstractCometdServlet.java:265) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) Caused by: org.mule.api.security.UnauthorisedException: Authentication failed for principal anonymous. Message payload is of type: HashMap at org.mule.example.notifications.DummySecurityFilter.authenticate(DummySecurityFilter.java:44) at org.mule.security.AbstractAuthenticationFilter.doFilter(AbstractAuthenticationFilter.java:59) at org.mule.processor.SecurityFilterMessageProcessor.process(SecurityFilterMessageProcessor.java:57) at org.mule.processor.chain.DefaultMessageProcessorChain.doProcess(DefaultMessageProcessorChain.java:88) at org.mule.processor.chain.AbstractMessageProcessorChain.process(AbstractMessageProcessorChain.java:89) at org.mule.processor.chain.InterceptingChainLifecycleWrapper.doProcess(InterceptingChainLifecycleWrapper.java:63) at org.mule.processor.chain.AbstractMessageProcessorChain.process(AbstractMessageProcessorChain.java:89) at org.mule.processor.chain.InterceptingChainLifecycleWrapper.process(InterceptingChainLifecycleWrapper.java:94) at org.mule.processor.chain.DefaultMessageProcessorChain.doProcess(DefaultMessageProcessorChain.java:88) at org.mule.processor.chain.AbstractMessageProcessorChain.process(AbstractMessageProcessorChain.java:89) at org.mule.processor.chain.InterceptingChainLifecycleWrapper.doProcess(InterceptingChainLifecycleWrapper.java:63) at org.mule.processor.chain.AbstractMessageProcessorChain.process(AbstractMessageProcessorChain.java:89) at org.mule.processor.chain.InterceptingChainLifecycleWrapper.process(InterceptingChainLifecycleWrapper.java:94) at org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:185) at org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:158) at org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:145) at org.mule.transport.ajax.AjaxMessageReceiver$ReceiverService.route(AjaxMessageReceiver.java:76) ... 32 more Caused by: org.mule.api.security.UnauthorisedException: Authentication failed for principal anonymous. Message payload is of type: HashMap at org.mule.example.notifications.DummySecurityFilter.authenticate(DummySecurityFilter.java:39) ... 48 more

    MuleSoft JIRA | 6 years ago | Victor Bonillo
    java.lang.reflect.InvocationTargetException

    Root Cause Analysis

    1. org.mule.api.security.UnauthorisedException

      Authentication failed for principal anonymous. Message payload is of type: HashMap

      at org.mule.example.notifications.DummySecurityFilter.authenticate()
    2. org.mule.example
      DummySecurityFilter.authenticate
      1. org.mule.example.notifications.DummySecurityFilter.authenticate(DummySecurityFilter.java:39)
      1 frame
    3. Mule Core
      AbstractMessageReceiver.routeMessage
      1. org.mule.security.AbstractAuthenticationFilter.doFilter(AbstractAuthenticationFilter.java:59)
      2. org.mule.processor.SecurityFilterMessageProcessor.process(SecurityFilterMessageProcessor.java:57)
      3. org.mule.processor.chain.DefaultMessageProcessorChain.doProcess(DefaultMessageProcessorChain.java:88)
      4. org.mule.processor.chain.AbstractMessageProcessorChain.process(AbstractMessageProcessorChain.java:89)
      5. org.mule.processor.chain.InterceptingChainLifecycleWrapper.doProcess(InterceptingChainLifecycleWrapper.java:63)
      6. org.mule.processor.chain.AbstractMessageProcessorChain.process(AbstractMessageProcessorChain.java:89)
      7. org.mule.processor.chain.InterceptingChainLifecycleWrapper.process(InterceptingChainLifecycleWrapper.java:94)
      8. org.mule.processor.chain.DefaultMessageProcessorChain.doProcess(DefaultMessageProcessorChain.java:88)
      9. org.mule.processor.chain.AbstractMessageProcessorChain.process(AbstractMessageProcessorChain.java:89)
      10. org.mule.processor.chain.InterceptingChainLifecycleWrapper.doProcess(InterceptingChainLifecycleWrapper.java:63)
      11. org.mule.processor.chain.AbstractMessageProcessorChain.process(AbstractMessageProcessorChain.java:89)
      12. org.mule.processor.chain.InterceptingChainLifecycleWrapper.process(InterceptingChainLifecycleWrapper.java:94)
      13. org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:185)
      14. org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:158)
      15. org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:145)
      15 frames
    4. Ajax Transport
      AjaxMessageReceiver$ReceiverService.route
      1. org.mule.transport.ajax.AjaxMessageReceiver$ReceiverService.route(AjaxMessageReceiver.java:76)
      1 frame
    5. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    6. Cometd :: Jetty :: Server
      ContinuationCometdServlet.service
      1. org.mortbay.cometd.BayeuxService.doInvoke(BayeuxService.java:357)
      2. org.mortbay.cometd.BayeuxService.invoke(BayeuxService.java:309)
      3. org.mortbay.cometd.BayeuxService.access$400(BayeuxService.java:59)
      4. org.mortbay.cometd.BayeuxService$AsyncListen.deliver(BayeuxService.java:393)
      5. org.mortbay.cometd.ClientImpl.notifyMessageListener(ClientImpl.java:214)
      6. org.mortbay.cometd.ClientImpl.doDelivery(ClientImpl.java:194)
      7. org.mortbay.cometd.ChannelImpl.deliverToSubscriber(ChannelImpl.java:502)
      8. org.mortbay.cometd.ChannelImpl.doDelivery(ChannelImpl.java:464)
      9. org.mortbay.cometd.ChannelImpl.doDelivery(ChannelImpl.java:494)
      10. org.mortbay.cometd.ChannelImpl.doDelivery(ChannelImpl.java:494)
      11. org.mortbay.cometd.AbstractBayeux$PublishHandler.handle(AbstractBayeux.java:1293)
      12. org.mortbay.cometd.AbstractBayeux.handle(AbstractBayeux.java:287)
      13. org.mortbay.cometd.continuation.ContinuationCometdServlet.service(ContinuationCometdServlet.java:171)
      13 frames
    7. Ajax Transport
      MuleAjaxServlet.service
      1. org.mule.transport.ajax.container.MuleAjaxServlet.service(MuleAjaxServlet.java:107)
      1 frame
    8. Cometd :: Jetty :: Server
      AbstractCometdServlet.service
      1. org.mortbay.cometd.AbstractCometdServlet.service(AbstractCometdServlet.java:265)
      1 frame
    9. Jetty Server
      SelectChannelEndPoint.run
      1. org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
      2. org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
      3. org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
      4. org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
      5. org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
      6. org.mortbay.jetty.Server.handle(Server.java:326)
      7. org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
      8. org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945)
      9. org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
      10. org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
      11. org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
      12. org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
      12 frames
    10. Jetty Util
      QueuedThreadPool$PoolThread.run
      1. org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
      1 frame