2 Replies Latest reply on Aug 10, 2010 1:42 PM by peterj

    JMeter with JBoss 5.1.0 GA Problems

    porter1983

      Hi together,

      in my current project I have to do a stress test regarding JMS. I tried to get JMeter with JBoss AS 5.1.0 GA running. But it fails with the following error message:

       

      2010/08/06 15:46:39 ERROR - jmeter.protocol.jms.sampler.JMSSampler: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory  javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory  [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory ]
          at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
          at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
          at javax.naming.InitialContext.init(Unknown Source)
          at javax.naming.InitialContext.<init>(Unknown Source)
          at org.apache.jmeter.protocol.jms.sampler.JMSSampler.getInitialContext(JMSSampler.java:424)
          at org.apache.jmeter.protocol.jms.sampler.JMSSampler.threadStarted(JMSSampler.java:317)
          at org.apache.jmeter.threads.JMeterThread$ThreadListenerTraverser.addNode(JMeterThread.java:506)
          at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:988)
          at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:971)
          at org.apache.jmeter.threads.JMeterThread.threadStarted(JMeterThread.java:481)
          at org.apache.jmeter.threads.JMeterThread.initRun(JMeterThread.java:470)
          at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:239)
          at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory
          at java.net.URLClassLoader$1.run(Unknown Source)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.net.URLClassLoader.findClass(Unknown Source)
          at java.lang.ClassLoader.loadClass(Unknown Source)
          at java.lang.ClassLoader.loadClass(Unknown Source)
          at java.lang.Class.forName0(Native Method)
          at java.lang.Class.forName(Unknown Source)
          at com.sun.naming.internal.VersionHelper12.loadClass(Unknown Source)
          ... 13 more

       

      I tried several combinations of jars in lib/ext without success. Can anybody help me out and tell me which jars I need? Does it work at all with JBoss AS 5.1.0 GA?

       

      Best regards,

      SeSa

        • 1. Re: JMeter with JBoss 5.1.0 GA Problems
          sfcoy

          Hi there,

           

          I think you need jboss-5.1.0.GA/client/jnp-client.jar on the JMeter classpath.

           

          Cheers,

           

          Steve C

          • 2. Re: JMeter with JBoss 5.1.0 GA Problems
            peterj

            When testing EJBs or JMS, you must configure JMeter just like any client - you need to give it the correct files in the classpath. The simplest way to do this is to add the jbossall-client.jar file to the classpath. To do this for JMeter, add this entry to the <jmeter-home>/bin/user.properties file:

             

            user.classpath=<jboss-home>/client/jbossall-client.jar

             

            where <jboss-home> is where JBoss AS is installed.