4 Replies Latest reply on Apr 11, 2011 9:01 AM by Daniel Yang

    A push-demo problem

    Daniel Yang Novice

      I use jsf 2.0.4.FCS and Jboss AS 6 to run RF4 push demo, I can logon and send messages to the irc server( freenode.org or my local irc server) by the demo application, but I can't recceive others' messages from the server or push demo application, also, "Disconnection" button did nothing.

       

      In spite of the messages from the demo application or from irc server,my netbeans shows an error(from jboss AS) like this:

       

      14:20:50,625 severity  [org.richfaces.log.Application] chat : java.lang.IllegalArgumentException: chat

      at org.richfaces.application.push.TopicKey.<init>(TopicKey.java:76)

      at org.richfaces.application.push.TopicKey.<init>(TopicKey.java:62)

      at org.richfaces.application.push.impl.jms.RequestImpl.onMessage(RequestImpl.java:103)

      at org.richfaces.application.push.impl.jms.SessionImpl$JMSToPushListenerAdaptor.onMessage(SessionImpl.java:71)

      at org.hornetq.jms.client.JMSMessageListenerWrapper.onMessage(JMSMessageListenerWrapper.java:91) [:6.0.0.Final]

      at org.hornetq.core.client.impl.ClientConsumerImpl.callOnMessage(ClientConsumerImpl.java:822) [:6.0.0.Final]

      at org.hornetq.core.client.impl.ClientConsumerImpl.access$100(ClientConsumerImpl.java:46) [:6.0.0.Final]

      at org.hornetq.core.client.impl.ClientConsumerImpl$Runner.run(ClientConsumerImpl.java:940) [:6.0.0.Final]

      at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:100) [:6.0.0.Final]

      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_23]

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_23]

      push.gif

      I sent a message "Hello" to my local irc server, I can see it from my irc client xchat, but I can't see it from my push demo page. If I sent a message using irc client(nick name is "Nemo"), my push demo page can't receive it either, I don't know exactly reason about it, but the error above shows when every message arrived.

       

      Can you guys help me?

       

        • 1. A push-demo problem
          Rocky S Master

          did you set up these topic connections which are required to set up in order to receive the messages and followed below instructions-

           

          =======================================================================

           

           

                                RichFaces - Ajax enabled JSF 2.0 component library

           

           

                                             RichFaces 4.0.Final irc-client sample

                                                                                http://richfaces.org

                                                                        March 2011

                               This software is distributed under the terms of the

                                      FSF Lesser Gnu Public License (see lgpl.txt)

           

           

          ========================================================================

           

           

          IRC Client Application is a sample which shows RichFaces Push in action.

           

           

          Targetted to JBoss AS 6

          * Run mvn install

           

           

          * Place war file into "JBoss AS 6/server/default/deploy" folder

           

           

          * Run JBoss AS

           

           

          JMS Configuration should be done prior to running application.

           

           

          * Start Admin console going to http://localhost:8080/admin-console

           

           

          * Setup new JMS Topic with the folowing properties:

             Name: chat

             JNDI name: /topic/chat

             All the others: by default.

           

           

          * Add role to that topic

             Name: guest

             Send: yes

             Consume: yes

             create subscriber: yes

             delete subscriber: yes

             create durable subscriber: yes

             delete durable subscriber: yes

           

           

          Running application

          * Enjoy playing with the client at http://localhost:8080/irc-client

          • 2. A push-demo problem
            Daniel Yang Novice

            Hi, Aman S,

            thanks for the reply.

            Yes, I've set up  the jms topic "chat" with jndi name "/topic/chat" in admin console of  jboss AS 6.

            I can see 2 web users in chat topic.

             

            chat-topic.gif

            • 3. A push-demo problem
              Ilya Shaikovsky Master

              you do not changed anything at demo?

               

              then please show the configuration screen of the JMS

              • 4. A push-demo problem
                Daniel Yang Novice

                I changed nothing!

                my jms config:

                 

                jmsconf1.jpg

                jmsconf2.jpg

                I debuged it and found the exception from the pushlish method of org.richfaces.application.push.impl.jms.TopicImpl, I can't debug deeper.

                This line throws the exception.

                producer.send(textMessage);