1. Mule
  2. MULE-4906

Hot Deployment documentation steps cause RuntimeException: MuleContext is not available msg (Hot Deployed app doesn't work)


    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Won't Fix or Usage Issue
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Examples / Tutorials
    • Labels:
    • Environment:

      OS: Windows, CentOS
      Browser: N/A
      Build: 2.2.5-SNAPSHOT (4/5/2010)

    • User impact:
    • Similar Issues:
      MULE-4381stdio transport fails with hot deployment
      MULE-5423after hot deployment, jms message will not be processed.
      MULE-8635ConcurrentModificationException when hot deploying
      MULE-5348Document the hot deployment monitor changes
      MULE-4792XStream XmlToObject transformer unable to load classes when running in hot deployment mode
      MULE-400Hot deployment of components and other artifacts
      MULE-4715Re-test transport hot deployment with CXF
      MULE-5053After configuration exception, hot deploy no longer refreshes
      MULE-5018Loanbroker ESB example needs updating for hot deployment changes
      MULE-4797GroovyExpressionEvaluator script is unable to load user classes when used with hot deployment


      While trying to get the Hot Deployment working using the steps documented at the following site:

      using the Mule webapp example, mule-examples.war, the following exception occurs in the localhost...log file:

      Apr 6, 2010 7:57:42 AM org.apache.catalina.core.StandardContext listenerStart
      SEVERE: Exception sending context initialized event to listener instance of class
      java.lang.RuntimeException: MuleContext is not available
      at org.apache.catalina.core.StandardContext.listenerStart(
      at org.apache.catalina.core.StandardContext.start(
      at org.apache.catalina.core.ContainerBase.addChildInternal(
      at org.apache.catalina.core.ContainerBase.addChild(
      at org.apache.catalina.core.StandardHost.addChild(
      at org.apache.catalina.startup.HostConfig.deployWAR(
      at org.apache.catalina.startup.HostConfig.deployWARs(
      at org.apache.catalina.startup.HostConfig.deployApps(
      at org.apache.catalina.startup.HostConfig.start(
      at org.apache.catalina.startup.HostConfig.lifecycleEvent(
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(
      at org.apache.catalina.core.ContainerBase.start(
      at org.apache.catalina.core.StandardHost.start(
      at org.apache.catalina.core.ContainerBase.start(
      at org.apache.catalina.core.StandardEngine.start(
      at org.apache.catalina.core.StandardService.start(
      at org.apache.catalina.core.StandardServer.start(
      at org.apache.catalina.startup.Catalina.start(
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(
      at java.lang.reflect.Method.invoke(
      at org.apache.catalina.startup.Bootstrap.start(
      at org.apache.catalina.startup.Bootstrap.main(

      NOTE: The only step that I did not perform in the Hot Deployment steps was deploying the JCA Adapter. This is not required to run the webapp example when not using Hot Deployment.

      Steps to reproduce the issue:
      1) Build all of the Mule examples, but leave the webapp example for last
      2) Prior to building the webapp example edit the file: ..\examples\webapp\src\main\webapp\WEB-INF\web.xml
      3) Change the listener from:
      4) Build the webapp example using "mvn"
      On my system when I attempted the above step with "mvn" I got the java.lang.RuntimeException: MuleContext is not available. I initially got this when I deployed the mule-examples.war file to Tomcat but started working my way back to where I removed the MMC jar files and started with the default webapp example. Once I change the listener to the Deployable listener then the Exception begins to occur.

      The complete output from starting the "mvn" command to the exception and then Jetty appearing to start can be found in the Log Output section below.

      NOTE: The webapp example works fine if you do not change to the Hot Deployable listener.
      When deploying the mule-example.war file in a Tomcat instance the Exception is outputted in the localhost...log file.

      5) Open a browser, even though Jetty appears to be up, and entering the URL: http://localhost:8090/mule-examples
      cause the error:

      HTTP ERROR: 503
      Problem accessing /mule-examples. Reason:


      I tried the following to get this to work:
      1) Redownladed Mule 2.2.5 from the MuleSoft web site
      2) Installed the latest JDK 1.6.0_19. Previously tested JDK 1.6.0_10.
      3) Made sure that the Maven version was 2.0.10
      4) Rebuilt all of the Mule Examples
      5) Verified that a non-hot-deployable mule-examples.war file worked first, then modified the web.xml file and restarted Tomcat.
      6) Went back to square one and attempted to build the Mule webapp example with hot deployment, which led to the opening of this Jira.
      7) Tried deploying Mule 2.2.5+HF1, still got same issue/error

      There are other web sites with steps for Hot Deployment: - Discussion of Mule 3 - Discussion of Mule 2.x - page removed by Jackie Wheeler - same as above, Mule 2.x, but not removed


        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        TO DO TO DO Resolved Resolved
        68d 21h 38m 1 Julien Eluard 14/Jun/10 08:11 AM
        Resolved Resolved Reopened Reopened
        26m 38s 1 Ken Yagen 14/Jun/10 08:38 AM
        Reopened Reopened Closed Closed
        4m 1 Andrew Perepelytsya 14/Jun/10 08:42 AM


          • Assignee:
            Andrew Perepelytsya
            Dale Booth
          • Votes:
            0 Vote for this issue
            0 Start watching this issue


            • Created: