I’‘ve been playing around with Whack and Openfire recently (both really nice products btw). I’‘ve managed to get the Whack weather sample to compile and register correctly with Openfire. However, when I try to send a message to the component the weather app throws an exception “No ComponentManager implementation available” and doesn’'t return anything to the client:
$ java -classpath ./weather-comp.jar org.jivesoftware.weather.ExternalWeatherComponent
log4j:WARN No appenders could be found for logger (net.sf.jweather).
log4j:WARN Please initialize the log4j system properly.
Exception in thread “pool-1-thread-1” java.lang.NullPointerException: No ComponentManager implementation available.
at org.xmpp.component.ComponentManagerFactory.getComponentManager(ComponentManager Factory.java:65)
at org.jivesoftware.weather.WeatherComponent.processPacket(WeatherComponent.java:9 1)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java: 885)
Digging around the source code the offending line at WeatherComponent.java:processPacket() is:
Where the component is trying to return the result to the client.
It seems that the component manager factory can’'t create an instance of a component manager,
i.e. the following line at ComponentManagerFactory.getComponentManager() evaluates to null:
String className = System.getProperty(“whack.componentManagerClass”);
I tried manually setting the whack.componentManagerClass property to various values, but couldn’'t get it right.
Any idea how to fix this? I have a feeling that this is a simple configuration problem that I’'m just not getting…
Message was edited by: TK - The original message was truncated.