Products | Versions |
---|---|
TIBCO BusinessEvents Enterprise Edition | - |
Not Applicable | - |
Resolution:
Description:
============
Implementing Load Balancer followed according to the TIB_be-standard_4.0.2_relnotes.
The sendWithAck function was invoked from the RouteCustomerEvent preprocessor on the Router side:
LoadBalancer.Router.sendWithAck(CustomerDetailsloadBalancer,customerdetails,customerdetails.PassPortNo,routekey,"");
At runtime, router got the following exception while executing the sendWithAck function:
>>>>>>>>>>>>>>>
2012 Mar 19 15:42:57:719 GMT +8 testLoadBalancer Info [com.tibco.cep.runtime.service.debug.DebuggerService] - [runtime.service] Creating debug task...
2012 Mar 19 15:42:57:720 GMT +8 testLoadBalancer Info [com.tibco.cep.runtime.service.debug.DebuggerService] - [runtime.service] Starting debug task...
2012 Mar 19 15:42:57:720 GMT +8 testLoadBalancer Debug [com.tibco.cep.runtime.service.debug.DebuggerService] - [runtime.service] <?xml version="1.0" encoding="UTF-8"?>
<ns0:CustomerDetails xmlns:ns0="www.tibco.com/be/ontology/Events/CustomerDetails">
<Name>testA</Name>
<Age>21</Age>
<PassPortNo>12345</PassPortNo>
</ns0:CustomerDetails>
2012 Mar 19 15:42:57:745 GMT +8 testLoadBalancer Info [com.tibco.cep.runtime.service.debug.DebuggerService] - [runtime.service] Creating entity: /Events/CustomerDetails
2012 Mar 19 15:42:57:747 GMT +8 testLoadBalancer Info [com.tibco.cep.runtime.service.debug.DebuggerService] - [runtime.service] Debug task executed...
2012 Mar 19 15:42:57:749 GMT +8 testLoadBalancer Info [$default.be.mt$.Thread.1] - [user] [Router] *******************Received Customer Details Events for Passport No12345
2012 Mar 19 15:42:57:752 GMT +8 testLoadBalancer Error [$default.be.mt$.Thread.1] - [runtime.session] [Router] Router got exception [java.lang.RuntimeException: java.lang.NoSuchFieldException: __routing_key__] while executing preprocessor [void RuleFunctions.RouteCustomerEvent(be.gen.Events.CustomerDetails customerdetails)] for event [be.gen.Events.CustomerDetails@id=2]
java.lang.RuntimeException: java.lang.NoSuchFieldException: __routing_key__
at com.tibco.cep.loadbalancer.functions.router.RoutingFunctions.sendWithAck(RoutingFunctions.java:129)
at be.gen.RuleFunctions.nullRouteCustomerEvent$9y002fEvents$9y002fCustomerDetails$.RouteCustomerEvent(nullRouteCustomerEvent$9y002fEvents$9y002fCustomerDetails$.java:16)
at be.gen.RuleFunctions.RouteCustomerEvent.invoke(RouteCustomerEvent.java:13)
at com.tibco.cep.runtime.session.impl.RuleSessionImpl.preprocessPassthru(RuleSessionImpl.java:947)
at com.tibco.cep.runtime.service.om.coherence.cluster.agents.ClusterTaskController.executeTask(ClusterTaskController.java:63)
at com.tibco.cep.runtime.scheduler.impl.WorkerBasedControllerV2$WorkerTask.run(WorkerBasedControllerV2.java:386)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at com.tibco.cep.runtime.util.CustomBEManagedThread.run(CustomBEManagedThread.java:23)
Caused by: java.lang.NoSuchFieldException: __routing_key__
at be.gen.Events.CustomerDetails.setProperty(CustomerDetails.java:107)
at com.tibco.cep.loadbalancer.functions.router.RoutingFunctions.sendWithAck(RoutingFunctions.java:121)
... 8 more
2012 Mar 19 15:42:57:768 GMT +8 testLoadBalancer Debug [$default.be.mt$.Thread.1] - [testLoadBalancer] [Router] Asserted Object >>> be.gen.Events.CustomerDetails@id=2
2012 Mar 19 15:42:57:770 GMT +8 testLoadBalancer Debug [$default.be.mt$.Thread.1] - [kernel.core] [Router] RTC Operations: [Object=be.gen.Events.CustomerDetails@id=2, RtcOps=100101]
2012 Mar 19 15:42:57:770 GMT +8 testLoadBalancer Debug [$default.be.mt$.Thread.1] - [runtime.service] [Router] InferenceAgent: Applying Changes...
2012 Mar 19 15:42:57:770 GMT +8 testLoadBalancer Debug [$default.be.mt$.Thread.1] - [runtime.service] [Router] CoherenceStore: No Operations....
<<<<<<<<<<<<<<<
Environment:
============
BusinessEvents 4.0.2 Load Balancer
Symptoms:
=========
On the Router side, while executing LoadBalancer.Router.sendWithAck(CustomerDetailsloadBalancer,customerdetails,customerdetails.PassPortNo,routekey,""); function, router engine got runtime exception [java.lang.RuntimeException: java.lang.NoSuchFieldException: __routing_key__].
If adding the property "__routing_key__" to CustomerDetails Event(route event), on runtime, the exception will chang to [java.lang.RuntimeException: java.lang.NoSuchFieldException: __loadbalancer_id__]
Resolution:
===========
The following properties are needed to be defined with the event:
>>>>>>>>>>
__callback_URI__ String
__loadbalancer_id__ String
__router_id__ String
__routing_key__ String
__content_id__ String
<<<<<<<<<<<
You do not need to specify values for these properties. ust define them in the event.
Also consider the following points:
1). You will need to create an invocation scheme called LoadbalancerInvocationService in your coherence-cache-config.xml/coherence-cache-config-jdbc.xml. This file is inside the coherence.jar. The coherence-cache-config.xml is for using oracle strategy backing store and coherence-cache-config-jdbc.xml for using jdbc strategy backing store. If you are using the jdbc strategy backing store, then you will need to add the invocation scheme to coherence-cache-config-jdbc.xml.
<invocation-scheme>
<scheme-name>loadbalancer-invocation</scheme-name>
<service-name>LoadbalancerInvocationService</service-name>
<autostart>true</autostart>
</invocation-scheme>
2). Also look at http://coherence.oracle.com/display/COH34UG/invocation-scheme. You will possibly need a thread-count element in your invocation-scheme to handle a large volume of events.
3). It is recommended that the receiver side should use the “shared queue” threading model on the local channel.