powered by Jive Software

Whack weather sample: "No ComponentManager implementation available"

Hi,

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 org.jivesoftware.whack.ExternalComponent$1.run(ExternalComponent.java:214)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java: 885)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)

at java.lang.Thread.run(Thread.java:619)

Digging around the source code the offending line at WeatherComponent.java:processPacket() is:

ComponentManagerFactory.getComponentManager().sendPacket(this, reply);

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…

Thanks,

-TK

Message was edited by: TK - The original message was truncated.

I’‘m playing with Whack as well and found basically the same thing. I’‘m guessing that whack is a work-in-progress from the fact that we had to sneak it from the SVN repository and it’'s not published anywhere.

In addition, I was only able to get the component to bind when it was run on the same system as the openfire server.

I’‘m starting to dig in to learn both whack and the weather component example. Let me know if you’'re interested in trading questions, and maybe answers.