[mule-user] MuleEventMulticaster problem

1 view
Skip to first unread message

jwray

unread,
Jul 1, 2008, 9:08:27 PM7/1/08
to us...@mule.codehaus.org

Hi,

I having a similar problem as the following thread while trying to migrate
to Mule 2. I thought I'd start a new thread as the previous appeared to have
multiple confused issues.

http://www.nabble.com/Please-help-migrating-to-Mule-2.-Really-important-td16853208.html#a16878810

I have a standalone (swing) application with an embedded mule server using
mule enabled spring events to communicate both within the application and to
external services. Works great under 1.4.x but I'm getting the
NullPointerException when trying to convert to 2.0.1. The mule server is
configured in the same application context file as the
applicationEventMulticaster, and the rest of my spring beans. From a brief
debugging it appears the setMuleContext is not getting called.

Any suggestions gratefully received.
thanks
Jonny

Relevant part of my application context configuration:
http://www.nabble.com/file/p18228367/config.xml config.xml

Exception:

java.lang.NullPointerException
at
org.mule.module.spring.events.MuleEventMulticaster.getDefaultService(MuleEventMulticaster.java:686)
at
org.mule.module.spring.events.MuleEventMulticaster.registerMulticasterComponent(MuleEventMulticaster.java:534)
at
org.mule.module.spring.events.MuleEventMulticaster.multicastEvent(MuleEventMulticaster.java:282)
at
org.guanxi.core.LocalMuleEventMulticaster.multicastEvent(LocalMuleEventMulticaster.java:15)
at
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:260)FATAL
[org.guanxi.core.Guanxi] - java.lang.NullPointerException

at
org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:744)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:372)
at
org.springframework.richclient.application.ApplicationLauncher.loadRootApplicationContext(ApplicationLauncher.java:262)
at
org.springframework.richclient.application.ApplicationLauncher.<init>(ApplicationLauncher.java:158)


--
View this message in context: http://www.nabble.com/MuleEventMulticaster-problem-tp18228367p18228367.html
Sent from the Mule - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


jwray

unread,
Jul 2, 2008, 4:31:27 PM7/2/08
to us...@mule.codehaus.org

Hi,

to reply to my own thread. I can get my application to run without the
mentioned exception by splitting my application context configuration into
two, one for the beans for my application and the other for the Mule beans,
then using SpringXmlConfigurationBuilder to configure and start Mule.

However, this results in a serious problem in that my application. I'm using
Spring Rich Client which uses Spring to configure and start a swing
application and thus my application and Mule are configured in different
application contexts whereas need them to be in the same; beans in my
application context are both listeners and publishers of events, but since
they are in different contexts they cannot communicate anymore. Setting the
parent context in the builder configuration method does not work either
since events are published into the parent, and listeners are defined in the
parent.

Is there any way of overcoming this limitation either by allowing event
propagation and listener configuration to occur across contexts, or by
configuring Mule from another application context?

thanks
Jonny

--
View this message in context: http://www.nabble.com/MuleEventMulticaster-problem-tp18228367p18246136.html

Reply all
Reply to author
Forward
0 new messages