How to resolve "java.lang.VerifyError: Cannot inherit from final class" exception while using XPATH 2.0 functions in TIBCO BusinessEvents.
book
Article ID: KB0079537
calendar_today
Updated On:
Products
Versions
TIBCO BusinessEvents Enterprise Edition
5.5.0
Description
The exception "java.lang.VerifyError:" occurs when there are conflicting versions of the same classes/jars are on the class path. For instance when trying to create an Event using Event.createEvent with XPATH 2.0, the below error occurs. ######### java.lang.VerifyError: Cannot inherit from final class at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:763) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:467) at java.net.URLClassLoader.access$100(URLClassLoader.java:73) at java.net.URLClassLoader$1.run(URLClassLoader.java:368) at java.net.URLClassLoader$1.run(URLClassLoader.java:362) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:361) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at com.tibco.genxdm.bridge.xinode.atomic.XiAtomBridge.<init>(XiAtomBridge.java:139) at com.tibco.genxdm.bridge.xinode.typed.XiTypedContext.<init>(XiTypedContext.java:49) at com.tibco.genxdm.bridge.xinode.XiProcessingContext.getTypedContext(XiProcessingContext.java:156) at com.tibco.be.functions.xpath.BESchemaComponentCacheManager.getTypedContext(BESchemaComponentCacheManager.java:273) at com.tibco.be.functions.xpath.XSLT2Helper.doTransform(XSLT2Helper.java:55) at com.tibco.be.functions.event.EventHelper.createEvent3(EventHelper.java:275) at com.tibco.be.functions.event.EventHelper.createEvent(EventHelper.java:240) at com.tibco.be.functions.event.EventHelper.createEvent2(EventHelper.java:207) at be.gen.RuleFunctions.Preprocessors.Internal.nullonSRUSessionEndPreprocessor$9y002fEvents$9y002fAbstract$9y002fNotifyEndOfSession$.onSRUSessionEndPreprocessor(nullonSRUSessionEndPreprocessor$9y002fEvents$9y002fAbstract$9y002fNotifyEndOfSession$.java:40) at be.gen.RuleFunctions.Preprocessors.Internal.onSRUSessionEndPreprocessor.invoke(onSRUSessionEndPreprocessor.java:11) at com.tibco.cep.runtime.session.impl.RuleSessionImpl$4.doTxnWork(RuleSessionImpl.java:1152) at com.tibco.cep.kernel.core.rete.BeTransaction.run(BeTransaction.java:141) at com.tibco.cep.kernel.core.rete.BeTransaction.execute(BeTransaction.java:101) at com.tibco.cep.runtime.session.impl.RuleSessionImpl.preprocessPassthru(RuleSessionImpl.java:1176) at com.tibco.cep.runtime.service.cluster.ClusterTaskController$1.doTxnWork(ClusterTaskController.java:78) at com.tibco.cep.kernel.core.rete.BeTransaction.run(BeTransaction.java:156) at com.tibco.cep.kernel.core.rete.BeTransaction.execute(BeTransaction.java:101) at com.tibco.cep.runtime.service.cluster.ClusterTaskController.executeTask(ClusterTaskController.java:103) at com.tibco.cep.runtime.scheduler.impl.WorkerBasedControllerV2$WorkerTask.run(WorkerBasedControllerV2.java:521) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at com.tibco.cep.runtime.util.CustomBEManagedThread.run(CustomBEManagedThread.java:24) #########
This was because of class path issue with the environment, where conflicting versions of the same classes/jars are on the class path. Therefore while loading the classes a parent class, marked as a final class, is loaded from the incorrect jar.
Issue/Introduction
How to resolve "java.lang.VerifyError: Cannot inherit from final class" exception while using XPATH 2.0 functions in TIBCO BusinessEvents.
Environment
TIBCO BusinessEvents 5.5.x
All Operating systems.
Resolution
In the above scenario , 'TIBCOxml.jar' from the %TRA_HOME%/lib directory got added to the BE classpath by the be-engiine.tra file and causing the jar conflicts during run-time. De-reference the TRA jars 'TIBCOxml.jar' from BE class path to resolve this issue.