Tibco error: ClassNotFoundException: com.tibco.tibjms.naming.TibjmsInitialContextFactory

坚强是说给别人听的谎言 提交于 2019-12-11 03:22:49

问题


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>

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>

The error i am getting is

 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.


回答1:


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

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.

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




回答2:


You are missing tibjms.jar from the classpath. If any security options on the EMS server are enabled, please make sure you add tibcrypt.jar as well.




回答3:


  1. Close the TIBCO designer.
  2. Open the designer.tra file located in the path C: \ tibco \ designer \ 5.10 \ bin
  3. Add this path;% TRA_HOME% / lib / TIBCOjms.jar in the final part of ## this will be prepended to tibco.class.path.extended
  4. Copy the accompanying booklet in the path C: \ tibco \ tra \ 5.10 \ lib
  5. Ready with this should work, just start the designer and go.

download the jar is TIBCOjms.jar




回答4:


In my case, issue was very silly. There was a space at the end of class path. i.e, "com.tibco.tibjms.TibjmsQueueConnectionFactory "



来源:https://stackoverflow.com/questions/11651709/tibco-error-classnotfoundexception-com-tibco-tibjms-naming-tibjmsinitialcontex

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!