Seeing error "Rule Template loader init failed" when deploying application

Seeing error "Rule Template loader init failed" when deploying application

book

Article ID: KB0073497

calendar_today

Updated On:

Products Versions
TIBCO BusinessEvents Enterprise Edition 6.1

Description

When deploying our TIBCO BusinessEvents application, we see the following error:
<TIME STAMP > GMT Z edc ERROR [main] - [runtime.session] [cache-class] Rule Template loader init failed
java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at com.tibco.cep.runtime.session.impl.RuleSessionImpl.loadRuleTemplates(RuleSessionImpl.java:561)
	at com.tibco.cep.runtime.session.impl.RuleSessionImpl.loadRules(RuleSessionImpl.java:531)
	at com.tibco.cep.runtime.session.impl.RuleSessionImpl.init(RuleSessionImpl.java:482)
	at com.tibco.cep.runtime.session.impl.RuleSessionImpl.init(RuleSessionImpl.java:466)
	at com.tibco.cep.runtime.service.cluster.agent.InferenceAgent.onInit(InferenceAgent.java:1087)
	at com.tibco.cep.runtime.service.cluster.agent.NewInferenceAgent.onInit(NewInferenceAgent.java:69)
	at com.tibco.cep.runtime.service.cluster.agent.AbstractCacheAgent.init(AbstractCacheAgent.java:114)
	at com.tibco.cep.runtime.service.cluster.agent.InferenceAgent.init(InferenceAgent.java:278)
	at com.tibco.cep.runtime.service.cluster.agent.DefaultAgentManager.init(DefaultAgentManager.java:76)
	at com.tibco.cep.runtime.service.cluster.MultiAgentCluster.init(MultiAgentCluster.java:184)
	at com.tibco.cep.runtime.session.impl.RuleServiceProviderImpl.initCluster(RuleServiceProviderImpl.java:839)
	at com.tibco.cep.runtime.session.impl.RuleServiceProviderImpl.configure(RuleServiceProviderImpl.java:318)
	at com.tibco.cep.container.standalone.BEMain.jumpStart(SourceFile:167)
	at com.tibco.cep.container.standalone.BEMain.main(SourceFile:71)
Caused by: java.io.FileNotFoundException: /opt/tibco/be/6.1/bin/_annotations.idx (Permission denied)
	at java.base/java.io.FileOutputStream.open0(Native Method)
	at java.base/java.io.FileOutputStream.open(FileOutputStream.java:298)
	at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:237)
	at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:187)
	at com.tibco.be.model.functions.impl.JavaAnnotationLookup.writeAnnotationsFile(JavaAnnotationLookup.java:320)
	at com.tibco.be.model.functions.impl.JavaAnnotationLookup.lookupCatalog(JavaAnnotationLookup.java:249)
	at com.tibco.be.model.functions.impl.JavaAnnotationLookup.lookupCatalog(JavaAnnotationLookup.java:172)
	at com.tibco.be.model.functions.impl.FunctionsCatalog.getINSTANCE(FunctionsCatalog.java:163)
	at com.tibco.cep.query.model.impl.FunctionRegistryImpl.getCatalogFunctionMap(FunctionRegistryImpl.java:170)
	at com.tibco.cep.query.model.impl.FunctionRegistryImpl.resolveContext(FunctionRegistryImpl.java:98)
	at com.tibco.cep.query.model.impl.ProjectContextImpl.<init>(ProjectContextImpl.java:58)
	at com.tibco.cep.interpreter.template.TemplatedRuleFactory.<init>(TemplatedRuleFactory.java:29)
	at com.tibco.cep.interpreter.template.TemplatedRuleLoader.<init>(TemplatedRuleLoader.java:37)
	... 18 more
How can we eliminate this error and successfully deploy our application?

Issue/Introduction

How to avoid errors relating to the _annotations.idx file.

Environment

All Supported Platforms

Resolution

The key line in the above exception stack is..
Caused by: java.io.FileNotFoundException: /opt/tibco/be/6.1/bin/_annotations.idx (Permission denied)
To resolve the error, ensure that the Linux file permissions on the _annotations.idx file allow for access by the Linux user who starts the application. For example..
user@hostname:~$ ls -al /opt/tibco/be/6.1/bin
total 688
drwxrwxrwx  3 sbadmin sbadmin   4096 Apr  9 08:15 .
drwxrwxrwx 16 sbadmin sbadmin   4096 Mar  1 09:13 ..
-rwxrwxrwx  1 sbadmin sbadmin  30231 Apr  9 07:57 _annotations.idx
The Linux user sbadmin (shown above) is expected to be able to run BusinessEvents applications on this machine without error, as it owns the _annotations.idx file.  However, other users also have permissions to access the file as well (as the file permissions are set to 777 in the above example).