Discussion:
[jboss-user] [jBPM] - HornetQ taskclient connection exceptions.
Arun Selva
2012-07-03 10:50:26 UTC
Permalink
Arun Selva [https://community.jboss.org/people/arselv] created the discussion

"HornetQ taskclient connection exceptions."

To view the discussion, visit: https://community.jboss.org/message/745707#745707

--------------------------------------------------------------
1. When im connecting to the HornetQ task service with



+String name = "client 1" ;+
+TaskClient client = new TaskClient(new HornetQTaskClientConnector(name, new HornetQTaskClientHandler(SystemEventListenerFactory.getSystemEventListener())));+

and operate on the tasks with client.start() and client.complete(), im getting this classcastexception.

+Exception in thread "Thread-2" java.lang.RuntimeException: Client Exception with class class org.jbpm.task.service.hornetq.HornetQTaskClientConnector$1 using port 5445+
+          at org.jbpm.task.service.hornetq.HornetQTaskClientConnector$1.run(HornetQTaskClientConnector.java:134)+
+          at java.lang.Thread.run(Unknown Source)+
+Caused by: java.lang.ClassCastException: org.jbpm.task.service.responsehandlers.BlockingQueryGenericResponseHandler cannot be cast to org.jbpm.task.service.TaskClientHandler$TaskOperationResponseHandler+
+          at org.jbpm.task.service.TaskClientHandler.messageReceived(TaskClientHandler.java:64)+
+          at org.jbpm.task.service.hornetq.HornetQTaskClientHandler.messageReceived(HornetQTaskClientHandler.java:56)+
+          at org.jbpm.task.service.hornetq.HornetQTaskClientConnector$1.run(HornetQTaskClientConnector.java:120)+

2. But if i connect to the service with adding a random number.

+String name = "client 1" ++UUID.randomUUID();+
+TaskClient client = new TaskClient(new HornetQTaskClientConnector(name, new HornetQTaskClientHandler(SystemEventListenerFactory.getSystemEventListener())));+

Im getting java heap space issue with too many open client session.

Is it a problem because as im not disconnecting client (client.disconnect()) .?
Is there any simple example of using HornetQ.?

Kinldy help in this issue.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/745707#745707]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Arun Selva
2012-07-03 13:25:01 UTC
Permalink
Arun Selva [https://community.jboss.org/people/arselv] created the discussion

"Re: HornetQ taskclient connection exceptions."

To view the discussion, visit: https://community.jboss.org/message/745771#745771

--------------------------------------------------------------
I have also found two types of client connections.

1.     AsyncTaskService  client = new AsyncHornetQTaskClient();
        client.connect("127.0.0.1", 5445);

2.     TaskService  client = new SyncTaskServiceWrapper(new AsyncHornetQTaskClient());
        client.connect("127.0.0.1", 5445);

which one should i prefer, at which scenarios.?
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/745771#745771]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Mauricio Salatino
2012-07-03 13:32:29 UTC
Permalink
Mauricio Salatino [https://community.jboss.org/people/salaboy21] created the discussion

"Re: HornetQ taskclient connection exceptions."

To view the discussion, visit: https://community.jboss.org/message/745774#745774

--------------------------------------------------------------
1.     AsyncTaskService  client = new AsyncHornetQTaskClient();
        client.connect("127.0.0.1", 5445);
This is an Async Client, if you are using hornetQ that's probably what you want to have. 

2.     TaskService  client = new SyncTaskServiceWrapper(new AsyncHornetQTaskClient());
        client.connect("127.0.0.1", 5445);
THis is the same but wrapped by a layer which abstract the async behaviour of HornetQ, it's up to you. Look at the methods that are exposed.
For the AsyncTaskService you will need to provide a handler that will be called when you receive a response. The SyncWrapper hide those handlers.

About the expcetion:
+String name = "client 1" ++UUID.randomUUID();+
+TaskClient client = new TaskClient(new HornetQTaskClientConnector(name, new HornetQTaskClientHandler(SystemEventListenerFactory.getSystemEventListener())));+

+Are you creating too much clients? When are you creating them? you should close them, if you are not using them anymore or reuse them.+
+
+
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/745774#745774]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Arun Selva
2012-07-03 14:09:45 UTC
Permalink
Arun Selva [https://community.jboss.org/people/arselv] created the discussion

"Re: HornetQ taskclient connection exceptions."

To view the discussion, visit: https://community.jboss.org/message/745795#745795

--------------------------------------------------------------
Thanks Mauricio.

1. Actually im creating one client and reusing them. Have to probe further into that exception.

2.Currently im trying the async client AsyncTaskService  client = new AsyncHornetQTaskClient(); . But im getting time out exception.

     java.lang.RuntimeException: Timeout : unable to retrieve results
     at org.jbpm.task.service.responsehandlers.BlockingTaskSummaryResponseHandler.getResults(BlockingTaskSummaryResponseHandler.java:41)

why could that be.? Kindly suggest a way out.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/745795#745795]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Mauricio Salatino
2012-07-03 14:11:18 UTC
Permalink
Mauricio Salatino [https://community.jboss.org/people/salaboy21] created the discussion

"Re: HornetQ taskclient connection exceptions."

To view the discussion, visit: https://community.jboss.org/message/745796#745796

--------------------------------------------------------------
It could be a failure in the server side..
Which version are you using? Did you check the latest snapshots to see if you have the same troubles?
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/745796#745796]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Arun Selva
2012-07-03 14:30:24 UTC
Permalink
Arun Selva [https://community.jboss.org/people/arselv] created the discussion

"Re: HornetQ taskclient connection exceptions."

To view the discussion, visit: https://community.jboss.org/message/745805#745805

--------------------------------------------------------------
Im using JBPM 5.3.
I was using Mina with JBPM 5.2 but with 5.3 im trying Hornetq to check any improved performance.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/745805#745805]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Joshua Godwin
2012-09-20 07:41:57 UTC
Permalink
Joshua Godwin [https://community.jboss.org/people/josh_godwin] created the discussion

"Re: HornetQ taskclient connection exceptions."

To view the discussion, visit: https://community.jboss.org/message/760522#760522

--------------------------------------------------------------
Hi Krish ,
Any luck solving this problem, i just started evaluating JBPM 5.3, so i am not too sure how to proceed with this.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/760522#760522]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Jose Miguel Loor
2013-02-08 21:57:21 UTC
Permalink
Jose Miguel Loor [https://community.jboss.org/people/jmiguel77] created the discussion

"Re: HornetQ taskclient connection exceptions."

To view the discussion, visit: https://community.jboss.org/message/796835#796835

--------------------------------------------------------------
hI

I am struggling with almost the same thing. I have BRMS server on testing. I modified the web.xml in the jbpm-human-task.war/WEB-INF with this values:

<init-param>
        <param-name>mina.host</param-name>
        <param-value>192.168.0.95</param-value>
      </init-param>
      <init-param>
        <param-name>mina.port</param-name>
        <param-value>9123</param-value>
      </init-param>

and this code:

CommandBasedHornetQWSHumanTaskHandler hornetTaskHandler = new CommandBasedHornetQWSHumanTaskHandler(this.ksession);
hornetTaskHandler.setConnection("192.168.0.95", 9123);
hornetTaskHandler.connect();
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/796835#796835]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Diego Santiviago
2013-02-26 14:26:49 UTC
Permalink
Diego Santiviago [https://community.jboss.org/people/diegosantiviago] created the discussion

"Re: HornetQ taskclient connection exceptions."

To view the discussion, visit: https://community.jboss.org/message/799629#799629

--------------------------------------------------------------
This is Mina configuration:

<init-param>
     <param-name>mina.host</param-name>
     <param-value>192.168.0.95</param-value>
</init-param>
<init-param>
    <param-name>mina.port</param-name>
    <param-value>9123</param-value>
</init-param>

And you use HornetQ configuration:

CommandBasedHornetQWSHumanTaskHandler hornetTaskHandler = new CommandBasedHornetQWSHumanTaskHandler(this.ksession);
hornetTaskHandler.setConnection("192.168.0.95", 9123);
hornetTaskHandler.connect();
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/799629#799629]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Loading...