You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by Kamil Kukołowicz <ka...@gmail.com> on 2009/05/12 16:38:12 UTC

instanceof do not work properly

Hello,
I have problem running JMeter with MQseries.
jmeter.log

2009/05/12 16:34:15 ERROR - jmeter.threads.JMeterThread: Test failed!
java.lang.IllegalStateException: QueueConnectionFactory expected, but got
com.ibm.mq.jms.MQConnectionFactory
 at
org.apache.jmeter.protocol.jms.sampler.JMSSampler.threadStarted(JMSSampler.java:286)

I downloaded source code and find the line that caused problem:
JMSSampler.java line 283

Object obj = context.lookup(getQueueConnectionFactory());
   if (!(obj instanceof QueueConnectionFactory)) {
it returns false, although com.ibm.mq.jms.MQConnectionFactory implements
QueueConnectionFactory interface.
I put libraries to /lib directory of JMeter so the class is recognized and
loaded.

I wonder why is it?

Any ideas welcomed.

Kamil Kukołowicz from Poland.


-- 
Kamil Kukołowicz

Re: instanceof do not work properly

Posted by Kamil Kukołowicz <ka...@gmail.com>.
I solved this problem but I don't know how ;)
If I manage to reveal the reason I will write because I find it an 
interesting Java feature.


Bye,
Kamil Kukołowicz from Poland
sebb pisze:
> On 12/05/2009, Kamil Kukołowicz <ka...@gmail.com> wrote:
>   
>> Hello,
>>  I have problem running JMeter with MQseries.
>>  jmeter.log
>>
>>  2009/05/12 16:34:15 ERROR - jmeter.threads.JMeterThread: Test failed!
>>  java.lang.IllegalStateException: QueueConnectionFactory expected, but got
>>  com.ibm.mq.jms.MQConnectionFactory
>>   at
>>  org.apache.jmeter.protocol.jms.sampler.JMSSampler.threadStarted(JMSSampler.java:286)
>>
>>  I downloaded source code and find the line that caused problem:
>>  JMSSampler.java line 283
>>
>>  Object obj = context.lookup(getQueueConnectionFactory());
>>    if (!(obj instanceof QueueConnectionFactory)) {
>>  it returns false, although com.ibm.mq.jms.MQConnectionFactory implements
>>  QueueConnectionFactory interface.
>>  I put libraries to /lib directory of JMeter so the class is recognized and
>>  loaded.
>>
>>  I wonder why is it?
>>     
>
> Any other errors?
>
> What version of Java are you using?
>
> Could it be that the MQ jar needs a different version?
>
> This is really a Java question, rather than a JMeter one...
>
>   
>>  Any ideas welcomed.
>>
>>  Kamil Kukołowicz from Poland.
>>
>>
>>  --
>>
>> Kamil Kukołowicz
>>
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org


Re: instanceof do not work properly

Posted by sebb <se...@gmail.com>.
On 12/05/2009, Kamil Kukołowicz <ka...@gmail.com> wrote:
> Hello,
>  I have problem running JMeter with MQseries.
>  jmeter.log
>
>  2009/05/12 16:34:15 ERROR - jmeter.threads.JMeterThread: Test failed!
>  java.lang.IllegalStateException: QueueConnectionFactory expected, but got
>  com.ibm.mq.jms.MQConnectionFactory
>   at
>  org.apache.jmeter.protocol.jms.sampler.JMSSampler.threadStarted(JMSSampler.java:286)
>
>  I downloaded source code and find the line that caused problem:
>  JMSSampler.java line 283
>
>  Object obj = context.lookup(getQueueConnectionFactory());
>    if (!(obj instanceof QueueConnectionFactory)) {
>  it returns false, although com.ibm.mq.jms.MQConnectionFactory implements
>  QueueConnectionFactory interface.
>  I put libraries to /lib directory of JMeter so the class is recognized and
>  loaded.
>
>  I wonder why is it?

Any other errors?

What version of Java are you using?

Could it be that the MQ jar needs a different version?

This is really a Java question, rather than a JMeter one...

>  Any ideas welcomed.
>
>  Kamil Kukołowicz from Poland.
>
>
>  --
>
> Kamil Kukołowicz
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org