本文介绍了Tibco错误:ClassNotFoundException:com.tibco.tibjms.naming.TibjmsInitialContextFactory的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正面临这个问题. 我用以下配置(本地tibco)测试了tibco,它可以正常工作

I am facing this issue. I tested tibco with below configuration(local tibco) and it works

<jee:jndi-lookup id="connectionFactory" jndi-name="emsConnectionFactory">
    <jee:environment>
        java.naming.factory.initial=com.tibco.tibjms.naming.TibjmsInitialContextFactory
        java.naming.provider.url=tibjmsnaming://localhost:7222
    </jee:environment>
</jee:jndi-lookup>

<jee:jndi-lookup id="queue" jndi-name="emsQueue">
    <jee:environment>
        java.naming.factory.initial=com.tibco.tibjms.naming.TibjmsInitialContextFactory
        java.naming.provider.url=tibjmsnaming://localhost:7222
    </jee:environment>

但是当我尝试使用以下配置连接到中央tibco(仅提供商更改)时,出现classNotFound错误

But when i try to connect to the central tibco(only the provider changed) with below configuration i get classNotFound error

  <jee:jndi-lookup id="connectionFactory" jndi-name="XAQueueConnectionFactory">
    <jee:environment>
        java.naming.factory.initial=com.tibco.tibjms.naming.TibjmsInitialContextFactory
        java.naming.provider.url=tcp://xsdd.xxxxxxxxx.local:8333
    </jee:environment>
</jee:jndi-lookup>
<jee:jndi-lookup id="queue" jndi-name="ibalance/iBatch/ReBalances">
    <jee:environment>
        java.naming.factory.initial=com.tibco.tibjms.naming.TibjmsInitialContextFactory
        java.naming.provider.url=tcp://xxxxxxx.xxxxxxxxxxx.local:8333
    </jee:environment>
</jee:jndi-lookup>

我得到的错误是

 Caused by: java.lang.ClassNotFoundException: com.tibco.tibjms.naming.TibjmsInitialContextFactory
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1701)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1546)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:46)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:654)

任何建议都会有很大帮助.

Any suggestion would be of great help.

推荐答案

这显然是类路径错误.您是否都在本地计算机上运行?

This is clearly a classpath error. Are you running both on your local machine?

如果第二个正在某处的服务器上运行,请确保在类路径中引用了EMS jar库.我相信您所追求的是tibjms.jar.

If the second one is being run on a server somewhere, ensure the EMS jar libraries are referenced in the classpath. I believe the one you're after is tibjms.jar.

如何引用jar文件取决于您的环境和技术.

How you reference the jar file is dependent on your environment and technologies.

这篇关于Tibco错误:ClassNotFoundException:com.tibco.tibjms.naming.TibjmsInitialContextFactory的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-12 08:24