Exception : ArrayIndexOutOfBoundsException at com.tibco.cep.functions.channel.as.ASSpaceHelper.lock(ASSpaceHelper.java:697) occurs at BE runtime.

Exception : ArrayIndexOutOfBoundsException at com.tibco.cep.functions.channel.as.ASSpaceHelper.lock(ASSpaceHelper.java:697) occurs at BE runtime.

book

Article ID: KB0088741

calendar_today

Updated On:

Products Versions
TIBCO BusinessEvents Enterprise Edition -
Not Applicable -

Description

Description:
Exception : ArrayIndexOutOfBoundsException at com.tibco.cep.functions.channel.as.ASSpaceHelper.lock(ASSpaceHelper.java:697) occurs at BE runtime. Here is the complete error trace:

+++++++++++++++++++++++++++++++++++++++++++

2014 Feb 21 16:56:00:955 GMT +5 pkorhale-t420.apac.tibco.com Info [HTTP-NIO-Worker-1-1] - [user] [inference-class] #### Created account Bob

2014 Feb 21 16:56:00:957 GMT +5 pkorhale-t420.apac.tibco.com Error [HTTP-NIO-Worker-1-1] - [runtime.service] [inference-class] Got runtime exception while executing Rule be.gen.Rules.CreateAccount(Rules.CreateAccount) Action be.gen.Rules.CreateAccount$formula($CreateAccount_a)@37715f3f Objects <be.gen.Events.CreateAccount@id=3>

java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: 1

            at com.tibco.cep.functions.channel.as.ASSpaceHelper.lock(ASSpaceHelper.java:697)

            at be.gen.Rules.CreateAccount$formula($CreateAccount_a.execute)(CreateAccount.java:33)

            at com.tibco.cep.kernel.core.rete.ReteWM.resolveConflict(SourceFile:322)

            at com.tibco.cep.kernel.core.rete.ReteWM$7.doTxnWork(SourceFile:1485)

            at com.tibco.cep.kernel.core.rete.BeTransaction.run(SourceFile:141)

            at com.tibco.cep.kernel.core.rete.BeTransaction.execute(SourceFile:101)

            at com.tibco.cep.kernel.core.rete.ReteWM.executeRules(SourceFile:1392)

            at com.tibco.cep.runtime.session.impl.RuleSessionImpl$4.doTxnWork(RuleSessionImpl.java:1086)

            at com.tibco.cep.kernel.core.rete.BeTransaction.run(SourceFile:141)

            at com.tibco.cep.kernel.core.rete.BeTransaction.execute(SourceFile:101)

            at com.tibco.cep.runtime.session.impl.RuleSessionImpl.preprocessPassthru(RuleSessionImpl.java:1064)

            at com.tibco.cep.runtime.scheduler.impl.DefaultTaskController.processEvent(DefaultTaskController.java:116)

            at com.tibco.cep.runtime.scheduler.impl.WorkerBasedControllerV2.superProcessEvent(WorkerBasedControllerV2.java:324)

            at com.tibco.cep.runtime.scheduler.impl.WorkerBasedControllerV2$1.doTxnWork(WorkerBasedControllerV2.java:337)

            at com.tibco.cep.kernel.core.rete.BeTransaction.run(SourceFile:156)

            at com.tibco.cep.kernel.core.rete.BeTransaction.execute(SourceFile:101)

            at com.tibco.cep.runtime.scheduler.impl.WorkerBasedControllerV2.processEvent(WorkerBasedControllerV2.java:331)

            at com.tibco.cep.runtime.service.cluster.ClusterTaskController.processEvent(ClusterTaskController.java:121)

            at com.tibco.cep.runtime.channel.impl.AbstractDestination.onMessage(AbstractDestination.java:229)

            at com.tibco.cep.runtime.channel.impl.AbstractDestination.onMessage(AbstractDestination.java:206)

            at com.tibco.cep.driver.http.HttpDestination.processMessage(SourceFile:188)

            at com.tibco.cep.driver.http.server.impl.tomcat.servlet.HTTPChannelAsyncServlet.doGet(SourceFile:83)

            at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)

            at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)

            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)

            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

            at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)

            at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487)

            at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:412)

            at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)

            at com.tibco.cep.driver.http.server.impl.tomcat.servlet.RequestDispatcherFilter.a(SourceFile:99)

            at com.tibco.cep.driver.http.server.impl.tomcat.servlet.RequestDispatcherFilter.doFilter(SourceFile:68)

            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)

            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)

            at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)

            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)

            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)

            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)

            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)

            at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)

            at org.apache.coyote.AbstractProtocol$formula($AbstractConnectionHandler.process)(AbstractProtocol.java:589)

            at org.apache.tomcat.util.net.NioEndpoint$formula($SocketProcessor.run)(NioEndpoint.java:1686)

            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)

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

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

Caused by: java.lang.ArrayIndexOutOfBoundsException: 1

            at com.tibco.cep.functions.channel.as.ASSpaceHelper.getSpace(ASSpaceHelper.java:1075)

            at com.tibco.cep.functions.channel.as.ASSpaceHelper.lock(ASSpaceHelper.java:692)

            ... 46 more

+++++++++++++++++++++++++++++++++++++++++++

 


Symptoms:

The above ArrayIndexOutOfBoundsException (description section) is seen during run-time of the BE project:



Cause:
Customer was using RuleFunction named lock(), which is a keyword / reserved word, and was invoking a similar method from the BE code instead of the customer RuleFunction . BE 5.x will not allow creation a RuleFunction with a namde lock. However, the customer had migrated their BE 4.x project to 5.x and the keyword was not caught by the editor and was allowed to create a RuleFunction. Otherwise studio will not allow to create a rule function with a named lock.

Issue/Introduction

Exception : ArrayIndexOutOfBoundsException at com.tibco.cep.functions.channel.as.ASSpaceHelper.lock(ASSpaceHelper.java:697) occurs at BE runtime.

Resolution

Try not to use any reserved words and/or keywords or search for such words in a migrated project to avoid future issues.

Additional Information

BE Developer's Guide > Chapter 19 Rule Language Grammar : Keywords and Other Reserved Words