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.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, December 22, 2003 4:36 PM
To: [EMAIL PROTECTED]
Subject: 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to