如何解决javax.naming.NameNotFoundException:JMeter中的com.ibm.mq.jms.MQQueueConnectionFactory错误 [英] How to resolve javax.naming.NameNotFoundException: com.ibm.mq.jms.MQQueueConnectionFactory error in JMeter

查看:514
本文介绍了如何解决javax.naming.NameNotFoundException:JMeter中的com.ibm.mq.jms.MQQueueConnectionFactory错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用JMeter连接到Websphere MQ,以将多个消息放置到队列中.我已经尝试过以下

I am using JMeter to connect to Websphere MQ for placing multiple messages to the Queue. I have tried the below

  1. 将以下jars下载到单独的路径中,并在jmeter.properties中启用user.classpath变量,并将jars路径附加到其后

  1. Downloaded the below jars into a separate path and enabled the user.classpath variable in jmeter.properties and appended the jars path to it

a)com.ibm.mq.jar

a) com.ibm.mq.jar

b)com.ibm.mqjms.jar

b) com.ibm.mqjms.jar

c)dhbcore.jar

c) dhbcore.jar

d)fscontext.jar

d) fscontext.jar

e)javax.jms.jar

e) javax.jms.jar

f)jms.jar

f) jms.jar

g)providerutil.jar

g) providerutil.jar

  1. 使用了JMS Publisher采样器并设置了所需的详细信息

  1. Used JMS Publisher Sampler and have set the required details

运行采样器,我得到错误,原因是javax.naming.NameNotFoundException: com.ibm.mq.jms.MQQueueConnectionFactory

Ran the Sampler and I am getting error as javax.naming.NameNotFoundException: com.ibm.mq.jms.MQQueueConnectionFactory

我尝试下载Internet上不同论坛中指定的其他多个jar.他们似乎都无法解决此问题. com.ibm.mq.jms.MQQueueConnectionFactory类确实存在于下载的MQ jar中.不知道为什么JMeter找不到此类.

I have tried downloading multiple other jars as specified in different forums on the internet. None of them seems to resolve this issue. The class com.ibm.mq.jms.MQQueueConnectionFactory is indeed present in the MQ jars downloaded. Not sure why JMeter is unable to find this class.

对此有任何帮助吗?

推荐答案

javax.naming.NameNotFoundException与类无关.如果Java找不到该类,那么您将收到ClassNotFoundException.

javax.naming.NameNotFoundException isn't anything to do with classes. If Java couldn't find the class then you'd get a ClassNotFoundException.

javax.naming.NameNotFoundException是一个JNDI异常,指示JNDI无法使用您传入的名称找到任何东西.

javax.naming.NameNotFoundException is a JNDI exception indicating that JNDI couldn't find anything with the name you passed in.

我希望UI中的'ConnectionFactory'字段不是在寻找类名,而是在寻找ConnectionFactory的JNDI名称,您已经使用必需的参数配置了ConnectionFactory的JNDI名称以连接到MQ队列管理器.因此,是MQQueueConnectionFactory的实例,而不是其类文件.

I expect the 'ConnectionFactory' field in the UI isn't looking for a class name, but is really looking for the JNDI name of the ConnectionFactory which you've configured with the required parameters to connect to your MQ queue manager. So an instance of MQQueueConnectionFactory rather than its class file.

这篇关于如何解决javax.naming.NameNotFoundException:JMeter中的com.ibm.mq.jms.MQQueueConnectionFactory错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆