JIRA

  • Log In Access more options
    • Online Help
    • GreenHopper Help
    • Agile Answers
    • Use Agile By Default
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Agile Access more options (Alt+g)
  • Create Issue
  • Mule
  • MULE-4906

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

  • Agile Board
  • More Actions
  • Views
    • XML
    • Word
    • Printable

Details

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

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

  • User impact:
    Medium
  • Similar Issues:
    None

Description

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

http://www.mulesoft.org/display/MULE2USER/Hot+Deploying+Mule+Applications

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 org.mule.config.builders.DeployableMuleXmlContextListener
java.lang.RuntimeException: MuleContext is not available
at org.mule.config.builders.DeployableMuleXmlContextListener.initialize(DeployableMuleXmlContextListener.java:67)
at org.mule.config.builders.DeployableMuleXmlContextListener.contextInitialized(DeployableMuleXmlContextListener.java:42)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:905)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:740)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:500)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:519)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

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:
<listener-class>org.mule.config.builders.MuleXmlBuilderContextListener</listener-class>
to:
<listener-class>org.mule.config.builders.DeployableMuleXmlContextListener</listener-class>
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:

SERVICE_UNAVAILABLE

NOTE:
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:
http://www.mulesoft.org/display/MULECDEV/Hot+Deployment - Discussion of Mule 3
http://old.nabble.com/Mule-2.x-User-Guide-%3E-Hot-Deploying-Mule-Applications-td27348341.html - Discussion of Mule 2.x - page removed by Jackie Wheeler
http://old.nabble.com/Mule-2.x-User-Guide-%3E-Copy-of-Hot-Deploying-Mule-Applications-NEW-DF-p27209187.html - same as above, Mule 2.x, but not removed

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
  • Transitions
  • Commits
  • Source
  • Builds
Hide
Permalink
Dale Booth added a comment - 12/Apr/10 10:38 AM

I talked with Eugene this morning and he created a simple webapp example and was able to get Hot Deployment to work. He then commented that the Mule webapp example includes mule jars in the web-inf directory and that this would cause the MuleContext is not available issue that is being seen..

Modifying the current Hot Deployment steps might be as easy as adding a NOTE that states that the Mule webapp (mule-examples.war) will not work with Hot Deployment. In the future, updated steps need to be added on what needs to be performed to get the Mule webapp working with Hot Deployment.
The NOTE needs to be BOLDED or in RED to make it stand out a bit.

Show
Dale Booth added a comment - 12/Apr/10 10:38 AM I talked with Eugene this morning and he created a simple webapp example and was able to get Hot Deployment to work. He then commented that the Mule webapp example includes mule jars in the web-inf directory and that this would cause the MuleContext is not available issue that is being seen.. Modifying the current Hot Deployment steps might be as easy as adding a NOTE that states that the Mule webapp (mule-examples.war) will not work with Hot Deployment. In the future, updated steps need to be added on what needs to be performed to get the Mule webapp working with Hot Deployment. The NOTE needs to be BOLDED or in RED to make it stand out a bit.
Hide
Permalink
Julien Eluard added a comment - 14/Jun/10 08:11 AM

This is not related to MMC but Hot Deployment.

Show
Julien Eluard added a comment - 14/Jun/10 08:11 AM This is not related to MMC but Hot Deployment.
Hide
Permalink
Ken Yagen added a comment - 14/Jun/10 08:38 AM

repopening and moving to Mule

Show
Ken Yagen added a comment - 14/Jun/10 08:38 AM repopening and moving to Mule
Hide
Permalink
Andrew Perepelytsya added a comment - 14/Jun/10 08:42 AM

http://www.mulesoft.org/documentation/display/MULE2USER/Deploying+Mule+as+a+Service+to+Tomcat

From the steps above, one is missing - Mule hasn't been properly integrated with Tomcat in this setup.

Show
Andrew Perepelytsya added a comment - 14/Jun/10 08:42 AM http://www.mulesoft.org/documentation/display/MULE2USER/Deploying+Mule+as+a+Service+to+Tomcat From the steps above, one is missing - Mule hasn't been properly integrated with Tomcat in this setup.

People

  • Assignee:
    Andrew Perepelytsya
    Reporter:
    Dale Booth
Vote (0)
Watch (0)

Dates

  • Created:
    06/Apr/10 10:33 AM
    Updated:
    14/Jun/10 08:42 AM
    Resolved:
    14/Jun/10 08:42 AM

Agile

  • View on Board
  • Atlassian JIRA (v5.0.7#734-sha1:8ad78a6)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for MuleForge. Try JIRA - bug tracking software for your team.