You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by th...@onlinehome.de on 2003/12/22 16:36:01 UTC

How to test RMI clients?

I want to use JMeter for RMI/IIOP client tests. 
I have developed a subclass of AbstractJavaSamplerClient which creates 
an instance of my RMI client in the setupTest() method. 
The constrcutor of my RMI client creates a server reference to my RMI 
server using the PortableRemoteObject.narrow() method. 

            hi = (HelloInterface) 
                PortableRemoteObject.narrow(obj, HelloInterface.class); 

My junit.log reports this exception: 

12/22/2003 2:39:24 PM ERROR - 
jmeter.protocol.java.sampler.AbstractJavaSamplerClient: HelloWorldTest: 
error during setup 
java.lang.ClassCastException 
at 
com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:293)

at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134) 
at helloWorld.HelloClient.<init>(HelloClient.java:32) 
at helloWorld.HelloWorldTest.setupTest(HelloWorldTest.java:26) 
at 
org.apache.jmeter.protocol.java.sampler.JavaSampler.sample(JavaSampler.java:203)

at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:277) 
at java.lang.Thread.run(Thread.java:536) 

If I run my HelloClient as a standalone the lookup works fine. Therefore
I can't explain the class cast exception. 
I have added all files (including client stubs) to my jar. 

What is the best way to test RMI client calls? 
Is someone able to test the RMI sample from the JDK 1.4.1 docs? 
(%JAVA_HOME%\docs\guide\rmi-iiop\tutorial.html) 


Thanks, 
Thomas.

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