Use of Global Varibles (GV) for ackMode in TIBCO BusinessEvents (BE) gives java.lang.NumberFormatException: For input string at runtime

Use of Global Varibles (GV) for ackMode in TIBCO BusinessEvents (BE) gives java.lang.NumberFormatException: For input string at runtime

book

Article ID: KB0084332

calendar_today

Updated On:

Products Versions
TIBCO BusinessEvents Enterprise Edition 5.x

Description

Symptom:  BE fails to start and throws the following error stack:
2016 Oct 29 07:47:24:809 GMT +2 Cache Fatal [main] - [container.standalone] For input string: "NO_ACKNOWLEDGE"
java.lang.NumberFormatException: For input string: "NO_ACKNOWLEDGE"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.lang.Integer.parseInt(Integer.java:580)
	at java.lang.Integer.parseInt(Integer.java:615)
	at com.tibco.cep.driver.jms.JmsDestinationConfig.<init>(SourceFile:84)
	at com.tibco.cep.driver.jms.JMSDestination.<init>(SourceFile:55)
	at com.tibco.cep.driver.jms.BaseJMSChannel.<init>(SourceFile:98)
	at com.tibco.cep.driver.jms.JMSChannel.<init>(SourceFile:31)
	at com.tibco.cep.driver.jms.JMSDriver.createChannel(SourceFile:28)
	at com.tibco.cep.runtime.channel.impl.ChannelManagerImpl.registerChannel(ChannelManagerImpl.java:112)
	at com.tibco.cep.runtime.channel.impl.ChannelManagerImpl.init(ChannelManagerImpl.java:104)
	at com.tibco.cep.runtime.session.impl.RuleServiceProviderImpl.initChannels(RuleServiceProviderImpl.java:1125)
	at com.tibco.cep.runtime.session.impl.RuleServiceProviderImpl.initCluster(RuleServiceProviderImpl.java:772)
	at com.tibco.cep.runtime.session.impl.RuleServiceProviderImpl.configure(RuleServiceProviderImpl.java:295)
	at com.tibco.cep.container.standalone.BEMain.jumpStart(SourceFile:165)
	at com.tibco.cep.container.standalone.BEMain.main(SourceFile:71)
The 'input string' may be defined differently.

The GV for ackMode for the JMS channel was defined as a string "NO_ACKNOWLEDGE". However, the BE Developers Guide gives a reference that ackMode is an Integer and the GV must be an Integer rather than a string.

Issue/Introduction

Use of global variables, unless done carefully, can produce runtime errors.

Environment

All

Resolution

Change the GV to a integer and use the following values for "ackmode":

1  -> AUTO_ACKNOWLEDGE
2  -> CLIENT_ACKNOWLEDGE
3  -> DUPS_OK_ACKNOWLEDGE
23 -> EXPLICIT_CLIENT_ACKNOWLEDGE (TIBCO Proprietary)
24 -> EXPLICIT_CLIENT_DUPS_OK_ACKNOWLEDGE (TIBCO Proprietary)
22 -> NO_ACKNOWLEDGE (TIBCO Proprietary)
 

Additional Information

See pages 74 - 75 of "TIBCO BusinessEvents Developer's Guide" PDF or https://docs.tibco.com/pub/businessevents-standard/5.3.0/doc/html/GUID-0FE17DCF-554E-4860-8490-980FDBC94D15.html