JBoss Community

HornetQ taskclient connection exceptions.

created by Arun Selva in jBPM - View the full discussion

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

Start a new discussion in jBPM at Community