java.lang.RuntimeException: MuleContext is not available

MuleSoft JIRA | Dale Booth | 7 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

    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

    MuleSoft JIRA | 7 years ago | Dale Booth
    java.lang.RuntimeException: MuleContext is not available
  2. 0

    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

    MuleSoft JIRA | 7 years ago | Dale Booth
    java.lang.RuntimeException: MuleContext is not available
  3. 0

    Artifactory / Mailing Lists

    sourceforge.net | 1 year ago
    java.lang.RuntimeException: Failed to read object from stream. at org.artifactory.config.CentralConfigFactoryBean.afterPropertiesSet(CentralConfigFactoryBean.java:82) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1202) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1172) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:428) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:284) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352) at org.artifactory.webapp.servlet.ArtifactoryContextConfigurer.contextInitialized(ArtifactoryContextConfigurer.java:45) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3763) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4211) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:809) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:698) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:709) at org.apache.catalina.startup.Catalina.start(Catalina.java:551) 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:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.RuntimeException

      MuleContext is not available

      at org.mule.config.builders.DeployableMuleXmlContextListener.initialize()
    2. Mule Core
      DeployableMuleXmlContextListener.contextInitialized
      1. org.mule.config.builders.DeployableMuleXmlContextListener.initialize(DeployableMuleXmlContextListener.java:67)
      2. org.mule.config.builders.DeployableMuleXmlContextListener.contextInitialized(DeployableMuleXmlContextListener.java:42)
      2 frames
    3. Glassfish Core
      Catalina.start
      1. org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)
      2. org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
      3. org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
      4. org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
      5. org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
      6. org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:905)
      7. org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:740)
      8. org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:500)
      9. org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
      10. org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
      11. org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
      12. org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
      13. org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
      14. org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
      15. org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
      16. org.apache.catalina.core.StandardService.start(StandardService.java:519)
      17. org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
      18. org.apache.catalina.startup.Catalina.start(Catalina.java:581)
      18 frames
    4. 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
    5. Glassfish Core
      Bootstrap.main
      1. org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
      2. org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
      2 frames