Hi,

I suggest you try upgrading wicket, wicket-atmosphere and atmosphere to 
more recent versions first. The version of wicket-atmosphere you are using 
is almost a year old. The most recent version is 0.12. Several bugs have 
been fixed since then.

Best regards,
Emond

On Friday 09 August 2013 14:04:36 souvikbhattacharyas wrote:
> Hi,
>    Recently I am stuck with problem of Wicket-atmosphere and it seems 
to be
> very strange to me.
> In my application, I am publishing data through Hazelcast and after
> HazelCast receives data, it uses wicket atmosphere's EventBus.post() 
method
> to push the data and then methods with @subscribe annotation 
receives the
> same and process. Now it's working fine but sometime it's giving 
nullpointer
> exception. There is no proper scenario when EventBus.post() will 
through
> null pointer exception but suddenly it's giving nullpointer exception for
> few EventBus.post() and after few exception EventBus.post() again start
> working. This become very strange thing to me now. I am giving all the 
code
> below. Please help me to identify the issue why I am getting the error.
> 
> *hazelcast.verison = 2.2
> wicket-atmosphere.version = 0.5
> atmosphere.version = 1.0.4*
> 
> *Web.xml*
> 
>     <servlet>
>             <servlet-name>wicket</servlet-name>
> 
> <servlet-class>org.atmosphere.cpr.AtmosphereServlet</servlet-class>
>             <init-param>
>                 <param-name>applicationClassName</param-name>
>                 <param-value>WebPortal</param-value>
>             </init-param>
>             <init-param>
>                 <param-name>listings</param-name>
>                 <param-value>false</param-value>
>             </init-param>
>             <init-param>
>                 <param-name>configuration</param-name>
>                 <param-value>deployment</param-value>
>             </init-param>
>             <init-param>
>                 <param-name>org.atmosphere.useWebSocket</param-
name>
>                 <param-value>false</param-value>
>             </init-param>
>             <init-param>
>                 <param-name>org.atmosphere.useNative</param-name>
>                 <param-value>true</param-value>
>             </init-param>
>             <init-param>
>                 <param-name>org.atmosphere.cpr.sessionSupport</param-
name>
>                 <param-value>true</param-value>
>             </init-param>
>             <init-param>
>                 <param-name>filterMappingUrlPattern</param-name>
>                 <param-value>/ssp/*</param-value>
>             </init-param>
>             <init-param>
> 
> <param-name>org.atmosphere.cpr.broadcastFilterClasses</param-
name>
> 
> <param-value>org.atmosphere.client.TrackMessageSizeFilter</param-
value>
>             </init-param>
>             <load-on-startup>0</load-on-startup>
>         </servlet>
> 
> *atmosphere.xml*
> 
>     <atmosphere-handlers>
>         <atmosphere-handler context-root="/*"
>             class-
name="org.atmosphere.handler.ReflectorServletProcessor">
>             <property name="filterClassName"
> value="org.apache.wicket.protocol.http.WicketFilter" />
>         </atmosphere-handler>
>     </atmosphere-handlers>
> 
> *WebPortal object:*
> 
>     public class WebPortal extends AuthenticatedWebApplication {
> 
>         public WebPortal() {
> 
>             EventBus eventbus = new EventBus(this);
>             HazelcastBroadcaster bc = (HazelcastBroadcaster)
> BroadcasterFactory.getDefault()
>                     .get(HazelcastBroadcaster.class, "confEvnt");
>             bc.setApplication(this);
>             bc.getBroadcasterConfig().addFilter(new
> TrackMessageSizeFilter());
>             bc.getBroadcasterConfig().setBroadcasterCache(new
> HeaderBroadcasterCache());
>         }
>     }
> 
> *HazelcastBroadcaster*
> 
>     public class HazelcastBroadcaster extends AbstractBroadcasterProxy 
{
> 
>         private ITopic topic;
>         private WebApplication application;
>         private static HazelcastInstance hazelcastInstance =
> SspHazelcast.getInstance();
> 
>         public HazelcastBroadcaster(String id, AtmosphereConfig config) {
>             this(id, URI.create("http://localhost:6379";), config);
>        }
> 
>         public HazelcastBroadcaster(String id, URI uri, AtmosphereConfig
> config) {
>             super(id, uri, config);
>         }
> 
>         @Override
>         public void incomingBroadcast() {
>             topic.addMessageListener(new MessageListener<String>() {
>                 @Override
>                 public void onMessage(Message<String> message) {

Reply via email to