I won’t be able to use the Swing monitor on the server I’m deploying to since it has no interface.  However, I did start enabling logging in various places and it does seem that my services weren’t getting started.  I was lacking an ErraiApp.properties which I guess is used as the root for where it should start looking for services.  After adding that, they started and stuff started to go through.  Does the client keep a record of services or something then?  Why wouldn’t it try to contact the service and then fail that it couldn’t find it?

 

Also, looking at the revised Message API, how do you listen for the reply in a conversation?  Do I need to create a separate listener?  Before you could specify a MessageCallback to get the response in the conversation, but I can’t find anywhere in the call chain to do that and it’s not covered in the SVN book.

 

From: Mike Brock [mailto:cbrock@redhat.com]
Sent: Monday, January 11, 2010 3:16 PM
To: Kevin Jordan
Cc: errai-users@lists.jboss.org
Subject: Re: [errai-users] Trouble sending messages

 

Kevin,

 

I'm not sure how you're launching your app, but can you provide this command line option which will bring up the bus monitor, and at least tell me if you've probably deployed your services: -Derrai.bus.showmonitor=true

 

Also, can you email me the log output from when your startup the application?

 

On 2010-01-11, at 3:35 PM, Kevin Jordan wrote:



Changing to a createCall and making a @Endpoint annotated method on the server seems to make it send something again:

{"CommandType":"RemoteSubscribe","ToSubject":"ServerBus","Subject":"Items.getItem:RespondTo:1","PriorityProcessing":"1"}

 

With a response of:

[{"HeartBeat":null}]

 

However, I still so nowhere where it passes the parameter I give it with:

MessageBuilder.createCall().call("Items").endpoint("getItem", serialInput.getValue()).respondTo(Item.class, new RemoteCallback<Item>() {

 

                           @Override

                           public void callback(Item response) {

                                //throw new UnsupportedOperationException("Not supported yet.");

                                MessageBox.alert("Return",item.getSerialNumber().toString(),null);

                           }

 

                     }).noErrorHandling().sendNowWith(bus);

 

 

 

From: errai-users-bounces@lists.jboss.org [mailto:errai-users-bounces@lists.jboss.org] On Behalf Of Kevin Jordan
Sent: Monday, January 11, 2010 1:46 PM
To: 'Mike Brock'
Cc: errai-users@lists.jboss.org
Subject: Re: [errai-users] Trouble sending messages

 

Made the changes specified in the userguide, but now it doesn’t send anything.  I’m using the following:

MessageBuilder.createMessage().toSubject("Items").signalling().with("SerialNumber", "Test").noErrorHandling().sendNowWith(bus);

 

It still seems to be set up just fine since the in.erraiBus servlet is created and the client long polls it, but the code above doesn’t seem to send anything.  I’m using the following way to make it for the DefaultBlockingServlet:

<listener>

     <listener-class>org.jboss.errai.bus.server.ErraiServletConfig</listener-class>

</listener>

 

Should I be using that?  I figure it shouldn’t affect the client any though unless the servlet is incorrectly set up as a consequence, which it doesn’t seem to be since they communicate just fine for the initial setup.  What should I look at to see why it’s not sending?

 

From: Mike Brock [mailto:cbrock@redhat.com] 
Sent: Monday, January 11, 2010 12:43 PM
To: Kevin Jordan
Cc: 'Heiko Braun'; errai-users@lists.jboss.org
Subject: Re: [errai-users] Trouble sending messages

 

You should be aware we have made changes and are retiring the use of the CommandMessage API.  Be sure to read the documentation in the userguide/src/main/docbook/en/master.xml file.  You can use: mvn jdocbook:generate to create an HTML file from the userguide/ directory.

 

On 2010-01-11, at 1:09 PM, Kevin Jordan wrote:

 

Just updated and it compiled fine.  Now to see if any of my connection problems are fixed.

 

From: Heiko Braun [mailto:hbraun@redhat.com] 
Sent: Monday, January 11, 2010 8:59 AM
To: Kevin Jordan
Cc: errai-users@lists.jboss.org
Subject: Re: [errai-users] Trouble sending messages

 

 

Hi Kevin, the compilation problems should be fixed already.

 

 

On Jan 11, 2010, at 3:36 PM, Kevin Jordan wrote:




Yes, I am using trunk.  Is there a more stable branch/version I should be using?  I had updated again hoping it was just something with the time I checked out and then ran into the problems Heiko Braun ran into compiling it.

 

From: Mike Brock [mailto:cbrock@redhat.com] 
Sent: Friday, January 08, 2010 8:52 PM
To: Kevin Jordan
Cc: errai-users@lists.jboss.org
Subject: Re: [errai-users] Trouble sending messages

 

What version of ErraiBus are you using? Are you getting it from trunk?

 

On 2010-01-08, at 5:37 PM, Kevin Jordan wrote:

 

DefaultBlockingServlet seems to have the same effect.

 

From: Mike Brock [mailto:cbrock@redhat.com] 
Sent: Friday, January 08, 2010 2:56 PM
To: Kevin Jordan
Cc: errai-users@lists.jboss.org
Subject: Re: [errai-users] Trouble sending messages

 

I will check into this.  We're still working on getting the AIO stuff sorted, and I wouldn't consider the Tomcat or JBoss adapters to be production ready.  You're best to use the DefaultBlockingServlet -- which will provide adequate performance for development while we get the AIO adapters squared away over the next few days.

 

On 2010-01-08, at 2:34 PM, Kevin Jordan wrote:





I’m having trouble getting a message to go through using ErraiBus.  I’m using this on the client side:

                     CommandMessage msg = (CommandMessage) CommandMessage.create().toSubject("Items").set("SerialNumber", serialInput.getValue());

                     bus.conversationWith(msg, new MessageCallback() {

 

                           @Override

                           public void callback(Message message) {

                                //throw new UnsupportedOperationException("Not supported yet.");

                                Item item = message.get(Item.class, "Item");

                                MessageBox.alert("Errai", item.getSerialNumber().toString(), null);

                           }

                     });

 

With this on the server side:

@Service("Items")

public class Items implements MessageCallback {

     private MessageBus bus;

 

     @Inject

     public Items(MessageBus bus) {

           this.bus = bus;

           System.out.println("Got a bus...");

     }

 

     @Override

     public void callback(Message message) {

           //throw new UnsupportedOperationException("Not supported yet.");

           System.out.println("Incoming message...");

           Long serialNum = message.get(Long.class, "SerialNumber");

           System.out.println(serialNum);

           Item item = new Item();

           item.setSerialNumber(serialNum);

           ConversationMessage.create(message).set("Item",item).sendNowWith(bus);

     }

 

}

 

However, all it seems to send is:

{"CommandType":"RemoteSubscribe","ToSubject":"ServerBus","Subject":"temp:Conversation:2","PriorityProcessing":"1"}

 

I don’t see where it actually sends my body or the subject that I fill out in my message.  Nothing also gets to the Service class.  Am I doing something wrong?  I have Tomcat running NIO and everything else seems set up correctly.  It will keep a GET connection open and do the POST of the JSON above, but nowhere does it seem to send what I want it to.  I also seem to be getting these occasionally, usually on some of the first requests to in.erraiBus:

java.lang.NullPointerException

        at org.jboss.errai.bus.server.servlet.TomcatCometServlet.event(TomcatCometServlet.java:105)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilterEvent(Unknown Source)

        at org.apache.catalina.core.ApplicationFilterChain.doFilterEvent(Unknown Source)

        at org.apache.catalina.core.StandardWrapperValve.event(Unknown Source)

        at org.apache.catalina.core.StandardContextValve.event(Unknown Source)

        at org.apache.catalina.core.StandardHostValve.event(Unknown Source)

        at org.apache.catalina.valves.ValveBase.event(Unknown Source)

        at org.apache.catalina.core.StandardEngineValve.event(Unknown Source)

        at org.apache.catalina.connector.CoyoteAdapter.event(Unknown Source)

        at org.apache.coyote.http11.Http11NioProcessor.event(Unknown Source)

        at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.event(Unknown Source)

        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(Unknown Source)

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

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

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

 

Can anyone point me at what I’m missing?

_______________________________________________
errai-users mailing list
errai-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/errai-users

 

 

_______________________________________________
errai-users mailing list
errai-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/errai-users

 

_______________________________________________
errai-users mailing list
errai-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/errai-users