{"action":"closed","issue":{"url":"https://api.github.com/repos/mulesoft/munit/issues/141","labels_url":"https://api.github.com/repos/mulesoft/munit/issues/141/labels{/name}","comments_url":"https://api.github.com/repos/mulesoft/munit/issues/141/comments","events_url":"https://api.github.com/repos/mulesoft/munit/issues/141/events","html_url":"https://github.com/mulesoft/munit/issues/141","id":50681734,"number":141,"title":"Cannot process event as \"jdbcConnector\" is stopped","user":{"login":"jasonchw","id":6822246,"avatar_url":"https://avatars.githubusercontent.com/u/6822246?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonchw","html_url":"https://github.com/jasonchw","followers_url":"https://api.github.com/users/jasonchw/followers","following_url":"https://api.github.com/users/jasonchw/following{/other_user}","gists_url":"https://api.github.com/users/jasonchw/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonchw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonchw/subscriptions","organizations_url":"https://api.github.com/users/jasonchw/orgs","repos_url":"https://api.github.com/users/jasonchw/repos","events_url":"https://api.github.com/users/jasonchw/events{/privacy}","received_events_url":"https://api.github.com/users/jasonchw/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mulesoft/munit/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2014-12-02T16:58:53Z","updated_at":"2015-01-06T18:38:58Z","closed_at":"2015-01-06T18:38:58Z","body":"I was trying to test a flow with JDBC outbound endpoint in Studio, but got error \"Cannot process event as \"jdbcConnector\" is stopped\".\r\n\r\nThe following is the mule config,\r\n```\r\n    <spring:beans>\r\n        <spring:bean id=\"h2DataSource\" class=\"org.enhydra.jdbc.standard.StandardDataSource\" destroy-method=\"shutdown\">\r\n            <spring:property name=\"driverName\" value=\"org.h2.Driver\" />\r\n            <spring:property name=\"url\" value=\"jdbc:h2:mem:test\" />\r\n            <spring:property name=\"user\" value=\"sa\" />\r\n            <spring:property name=\"password\" value=\"\" />\r\n        </spring:bean>\r\n    </spring:beans>\r\n\r\n    <jdbc-ee:connector name=\"jdbcConnector\" dataSource-ref=\"h2DataSource\" doc:name=\"Database\">\r\n        <jdbc-ee:query key=\"lookupJob\" value=\"SELECT * FROM jobtitlelookup WHERE jobtitleid = #[variable:jobid]\"></jdbc-ee:query>\r\n    </jdbc-ee:connector>\r\n\r\n    <flow name=\"jdbcFlow\" doc:name=\"jdbcFlow\">\r\n        <set-variable variableName=\"jobid\" value=\"123456\" doc:name=\"Variable\" />\r\n        <jdbc-ee:outbound-endpoint exchange-pattern=\"one-way\" queryTimeout=\"-1\" doc:name=\"Database\" connector-ref=\"jdbcConnector\"\r\n            queryKey=\"lookupJob\">\r\n            <jdbc-ee:transaction action=\"JOIN_IF_POSSIBLE\" />\r\n        </jdbc-ee:outbound-endpoint>\r\n        <logger level=\"INFO\" doc:name=\"Logger\" message=\"#[payload]\" />\r\n    </flow>\r\n```\r\n\r\nThe JavaTest class,\r\n```\r\npackage org.mule.java;\r\n\r\nimport static junit.framework.Assert.assertEquals;\r\nimport static org.mule.munit.common.mocking.Attribute.attribute;\r\n\r\nimport org.junit.Test;\r\nimport org.mule.api.MuleEvent;\r\nimport org.mule.munit.runner.functional.FunctionalMunitSuite;\r\n\r\npublic class JdbcTest extends FunctionalMunitSuite {\r\n    @Override\r\n    protected String getConfigResources() {\r\n        return \"jdbc.xml\";\r\n    }\r\n\r\n    @Test\r\n    public void testJdbcFlow() throws Exception {\r\n        MuleEvent eventResult = runFlow(\"jdbcFlow\", testEvent(null));\r\n        assertEquals(\"pass munitSubFlow\", eventResult.getMessage().getPayloadAsString());\r\n\r\n        verifyCallOfMessageProcessor(\"outbound-endpoint\").ofNamespace(\"jdbc-ee\")\r\n                .withAttributes(attribute(\"name\").ofNamespace(\"doc\").withValue(\"Database\"))\r\n                .atLeastOnce();\r\n    }\r\n}\r\n```\r\n\r\nAnd the error message from Studio,\r\n```\r\n[12-02 11:32:11] ERROR DefaultMessagingExceptionStrategy [main]: \r\n********************************************************************************\r\nMessage               : Cannot process event as \"jdbcConnector\" is stopped\r\nType                  : org.mule.api.lifecycle.LifecycleException\r\nCode                  : MULE_ERROR-166\r\nJavaDoc               : http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/lifecycle/LifecycleException.html\r\n********************************************************************************\r\nException stack is:\r\n1. Cannot process event as \"jdbcConnector\" is stopped (org.mule.api.lifecycle.LifecycleException)\r\n  org.mule.lifecycle.processor.ProcessIfStartedMessageProcessor:42 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/lifecycle/LifecycleException.html)\r\n********************************************************************************\r\nRoot Exception stack trace:\r\norg.mule.api.lifecycle.LifecycleException: Cannot process event as \"jdbcConnector\" is stopped\r\n\tat org.mule.lifecycle.processor.ProcessIfStartedMessageProcessor.handleUnaccepted(ProcessIfStartedMessageProcessor.java:42)\r\n\tat org.mule.processor.AbstractFilteringMessageProcessor.process(AbstractFilteringMessageProcessor.java:48)\r\n\tat org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27)\r\n\tat org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:61)\r\n\tat org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:47)\r\n\tat org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27)\r\n\tat org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:61)\r\n\tat org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:47)\r\n\tat org.mule.endpoint.DefaultOutboundEndpoint.process(DefaultOutboundEndpoint.java:96)\r\n\tat org.mule.munit.common.endpoint.MockOutboundEndpoint.process(MockOutboundEndpoint.java:231)\r\n\tat org.mule.munit.common.endpoint.MockOutboundEndpoint$$FastClassByCGLIB$$cc824ca5.invoke(<generated>)\r\n\tat net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)\r\n\tat org.mule.munit.common.mp.WrapperMunitMessageProcessorInterceptor.invokeSuper(WrapperMunitMessageProcessorInterceptor.java:71)\r\n\tat org.mule.munit.common.mp.MunitMessageProcessorInterceptor.process(MunitMessageProcessorInterceptor.java:59)\r\n\tat org.mule.munit.common.mp.WrapperMunitMessageProcessorInterceptor.intercept(WrapperMunitMessageProcessorInterceptor.java:46)\r\n\tat org.mule.munit.common.endpoint.MockOutboundEndpoint$$EnhancerByMUNIT$$cc824ca5.process(<generated>)\r\n\tat org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27)\r\n\tat org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:61)\r\n\tat org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:47)\r\n\tat org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27)\r\n\tat org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:47)\r\n\tat org.mule.processor.AsyncInterceptingMessageProcessor.process(AsyncInterceptingMessageProcessor.java:101)\r\n\tat org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27)\r\n\tat org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:61)\r\n\tat org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:47)\r\n\tat org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27)\r\n\tat org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:47)\r\n\tat org.mule.interceptor.AbstractEnvelopeInterceptor.process(AbstractEnvelopeInterceptor.java:55)\r\n\tat org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27)\r\n\tat org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:61)\r\n\tat org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:47)\r\n\tat org.mule.processor.AbstractFilteringMessageProcessor.process(AbstractFilteringMessageProcessor.java:44)\r\n\tat org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27)\r\n\tat org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:61)\r\n\tat org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:47)\r\n\tat org.mule.construct.AbstractPipeline$1.process(AbstractPipeline.java:112)\r\n\tat org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27)\r\n\tat org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:61)\r\n\tat org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:47)\r\n\tat org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27)\r\n\tat org.mule.execution.MessageProcessorNotificationExecutionInterceptor.exe...\r\n********************************************************************************\r\n```\r\n"}}