我有一个小问题,但在任何地方都找不到答案 - 当使用 mule jar 将 mule 应用程序(war)部署到 tomcat 中时,我看到以下消息:
SEVERE: Exception sending context initialized event to listener instance of class org.mule.config.builders.MuleXmlBuilderContextListener
java.lang.ClassCastException: Notification class must be of type: org.mule.api.context.notification.ServerNotification. Offending class is: org.mule.context.notification.MuleContextNotification
at org.mule.lifecycle.NotificationLifecycleObject.(NotificationLifecycleObject.java:49)
at org.mule.lifecycle.phases.MuleContextStopPhase.(MuleContextStopPhase.java:66)
at org.mule.lifecycle.phases.MuleContextStopPhase.(MuleContextStopPhase.java:56)
at org.mule.lifecycle.RegistryBrokerLifecycleManager.registerPhases(RegistryBrokerLifecycleManager.java:43)
at org.mule.lifecycle.RegistryLifecycleManager.(RegistryLifecycleManager.java:57)
at org.mule.lifecycle.RegistryBrokerLifecycleManager.(RegistryBrokerLifecycleManager.java:33)
at org.mule.registry.AbstractRegistryBroker.(AbstractRegistryBroker.java:37)
at org.mule.registry.DefaultRegistryBroker.(DefaultRegistryBroker.java:27)
at org.mule.DefaultMuleContext.createRegistryBroker(DefaultMuleContext.java:176)
at org.mule.DefaultMuleContext.(DefaultMuleContext.java:167)
at org.mule.context.DefaultMuleContextBuilder.buildMuleContext(DefaultMuleContextBuilder.java:97)
at org.mule.context.DefaultMuleContextFactory.buildMuleContext(DefaultMuleContextFactory.java:215)
at org.mule.context.DefaultMuleContextFactory.doCreateMuleContext(DefaultMuleContextFactory.java:201)
at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:100)
at org.mule.config.builders.MuleXmlBuilderContextListener.createMuleContext(MuleXmlBuilderContextListener.java:169)
at org.mule.config.builders.MuleXmlBuilderContextListener.initialize(MuleXmlBuilderContextListener.java:98)
at org.mule.config.builders.MuleXmlBuilderContextListener.contextInitialized(MuleXmlBuilderContextListener.java:74)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4779)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:962)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1603)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
2013-08-11 23:11:43 org.apache.catalina.core.ApplicationContext log
这很糟糕,因为 org.mule.context.notification.MuleContextNotification 正在扩展 org.mule.api.context.notification.ServerNotification。我在这里想念什么?
我的 web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
<context-param>
<param-name>org.mule.config</param-name>
<param-value>mule-config.xml</param-value>
</context-param>
<listener>
<listener-class>org.mule.config.builders.MuleXmlBuilderContextListener</listener-class>
</listener>
<servlet>
<servlet-name>muleServlet</servlet-name>
<servlet-class>org.mule.transport.servlet.MuleReceiverServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>muleServlet</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
</web-app>