jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: Problem with Connection Factory when using JMeter to test ActiveMQ JMS
Date Tue, 06 Apr 2010 01:36:13 GMT
On 05/04/2010, sebb <sebbaz@gmail.com> wrote:
> On 05/04/2010, Robert Schultheis <rschultheis@secondmarket.com> wrote:
>  > Hello,
>  >
>  >
>  >
>  >  I am attempting to get a simple proof-of-concept going using the JMS
>  >  Publisher sampler (the same issue is happening for all JMS Sampler types).
>  >  JMeter is failing to find the class for the connection factory (so it
>  >  claims..)
>  >
>  >
>  >
>  >  I am running the ActiveMQ broker locally, using all defaults.  I have the
>  >  simple ActiveMQ publisher / consumer example running just fine, so now I
>  >  am basically just attempting to replace the "publisher" with JMeter.
>  >
>
>
> Have you read:
>
>  http://activemq.apache.org/jndi-support.html#JNDISupport-ActiveMQJNDITutorial
>
>  This says:
>
>  "This means JMS clients need to use properties files to create a jndi
>  IntialContextFactory."
>
>  However, the sample code does not use a properties file.
>
>  That may solve your problem.

Not sure that is relevant, as the JMeter code creates the initial
context properties from the other parameters if it is not provided.

However, a bit of debugging shows that the name "ConnectionFactory"
seems to return a suitable object, so try that.

>
>  >
>  >  This is my sampler:
>  >
>  >  <PublisherSampler guiclass="JMSPublisherGui" testclass="PublisherSampler"
>  >  testname="JMS Publisher" enabled="true">
>  >
>  >           <stringProp name="jms.jndi_properties">false</stringProp>
>  >
>  >           <stringProp
>  >  name="jms.initial_context_factory">org.apache.activemq.jndi.ActiveMQInitia
>  >  lContextFactory</stringProp>
>  >
>  >           <stringProp
>  >  name="jms.provider_url">tcp://localhost:61616</stringProp>
>  >
>  >           <stringProp
>  >  name="jms.connection_factory">org.apache.activemq.ActiveMQConnectionFactor
>  >  y</stringProp>
>  >
>  >           <stringProp name="jms.topic">TEST.FOO</stringProp>
>  >
>  >           <stringProp name="jms.security_principle"></stringProp>
>  >
>  >           <stringProp name="jms.security_credentials"></stringProp>
>  >
>  >           <stringProp name="jms.text_message">123456789</stringProp>
>  >
>  >           <stringProp name="jms.input_file"></stringProp>
>  >
>  >           <stringProp name="jms.random_path"></stringProp>
>  >
>  >           <stringProp name="jms.config_choice">jms_use_text</stringProp>
>  >
>  >           <stringProp
>  >  name="jms.config_msg_type">jms_text_message</stringProp>
>  >
>  >           <stringProp name="jms.iterations"></stringProp>
>  >
>  >           <boolProp name="jms.authenticate">false</boolProp>
>  >
>  >         </PublisherSampler>
>  >
>  >
>  >
>  >
>  >
>  >  I have added activemq-all-5.3.0.jar into JMeter's \lib\ext directory, I
>  >  know it is working because it does correctly instantiate the
>  >  InititialContextFactory.   I do not believe I am missing any .jar files, I
>  >  have tried to get around this by copying all the activeMQ .jars into
>  >  lib/ext,  but the result is always the same.
>  >
>
>
> Should really be put into the lib/ directory, not lib/ext, but that
>  should not affect the outcome.
>
>
>  >
>  >  This is the error in JMeter.log:
>  >
>  >
>  >
>  >  2010/04/05 14:38:22 INFO  - jmeter.engine.StandardJMeterEngine: Listeners
>  >  will be started after enabling running version
>  >
>  >  2010/04/05 14:38:22 INFO  - jmeter.engine.StandardJMeterEngine: To revert
>  >  to the earlier behaviour, define jmeterengine.startlistenerslater=false
>  >
>  >  2010/04/05 14:38:22 INFO  - jmeter.engine.StandardJMeterEngine: Running
>  >  the test!
>  >
>  >  2010/04/05 14:38:22 INFO  - jmeter.gui.util.JMeterMenuBar:
>  >  setRunning(true,*local*)
>  >
>  >  2010/04/05 14:38:23 INFO  - jmeter.engine.StandardJMeterEngine: Starting 1
>  >  threads for group Thread Group. Ramp up = 1.
>  >
>  >  2010/04/05 14:38:23 INFO  - jmeter.engine.StandardJMeterEngine: Thread
>  >  will continue on error
>  >
>  >  2010/04/05 14:38:23 INFO  - jmeter.threads.JMeterThread:
>  >  jmeterthread.startearlier=true (see jmeter.properties)
>  >
>  >  2010/04/05 14:38:23 INFO  - jmeter.threads.JMeterThread: Running
>  >  PostProcessors in forward order
>  >
>  >  2010/04/05 14:38:23 INFO  - jmeter.engine.StandardJMeterEngine: All
>  >  threads have been started
>  >
>  >  2010/04/05 14:38:23 INFO  - jmeter.threads.JMeterThread: Thread started:
>  >  Thread Group 1-1
>  >
>  >  2010/04/05 14:38:23 INFO  -
>  >  jmeter.protocol.jms.client.InitialContextFactory: created the JNDI initial
>  >  context factory
>  >
>  >  2010/04/05 14:38:23 ERROR - jmeter.protocol.jms.client.ConnectionFactory:
>  >  Unable to find connection factory
>  >  org.apache.activemq.ActiveMQConnectionFactory, will retry. Error:
>  >  javax.naming.NameNotFoundException:
>  >  org.apache.activemq.ActiveMQConnectionFactory
>  >
>  >  2010/04/05 14:38:23 ERROR - jmeter.protocol.jms.client.ConnectionFactory:
>  >  Unable to find connection factory
>  >  org.apache.activemq.ActiveMQConnectionFactory, giving up. Error:
>  >  javax.naming.NameNotFoundException:
>  >  org.apache.activemq.ActiveMQConnectionFactory
>  >
>  >
>  >
>  >
>  >
>  >  Any help is greatly appreciated!
>  >
>  >
>  >
>  >  Thanks,
>  >
>  >
>  >  ROBERT SCHULTHEIS
>  >
>  >
>  >
>  >  ---------------------------------------------------------------------------
>  >
>  >  This message is intended only for the addressee. Please notify sender by
>  >  e-mail if you are not the intended recipient. If you are not the intended
>  >  recipient, you may not copy, disclose, or distribute this message or its
>  >  contents to any other person and any such actions may be unlawful.
>  >  SecondMarket, Inc. (Member FINRA/SIPC/MSRB) ("SecondMarket") does not
>  >  accept time sensitive, action-oriented messages or transaction orders,
>  >  including orders to purchase or sell securities, via e-mail. SecondMarket
>  >  reserves the right to monitor and review the content of all messages sent
>  >  to or from this e-mail address. Messages sent to or from this e-mail
>  >  address may be stored on the SecondMarket e-mail system and archived in
>  >  accordance with FINRA and SEC regulations.
>

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


Mime
View raw message