jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Horton Simon" <Simon.Hor...@uk.mizuho-sc.com>
Subject RE: Junit Sampler with spring RMI connection proxy
Date Thu, 16 Aug 2007 13:33:00 GMT
Hi Johan,

I think you have posted your question to the wrong user group, as this
is the Java Caching Service (JCS) user group rather than JMeter, Spring
or Junit.

Bye,
Simon

-----Original Message-----
From: Johan Hedlund [mailto:johan@dprof.net] 
Sent: Thursday, August 16, 2007 2:24 PM
To: jcs-users@jakarta.apache.org
Subject: Junit Sampler with spring RMI connection proxy

Hi,

I'm trying to use JMeter to run unit tests that use spring to connect to
a
remote RMI service. I use the spring RMI proxy both on the server and on
the
client side to handle the RMI connection, meaning that my RMI service
interface does not extend Remote.

My unit tests run just fine outside of JMeter (in maven or in Eclipse),
but
when I try to run them in JMeter I get strange RMI Exceptions (included
at
the end of this post). The exception mentions not having a protocol, but
my
service url DOES work as intended outside of JMeter, so that can't be
it.

I've done some more testing to try to narrow down the problem, and have
come
to the conclusion that the RMI connection fails in JMeter if the remote
service is published using an interface that does not extend Remote, but
works fine if it DOES extend it.

Has anyone else come across this problem, and is there any explanation
for
it or way around it?

Thanks

/Johan


The stack trace is:


java.rmi.ServerException: RemoteException occurred in server thread;
nested
exception is:
        java.rmi.UnmarshalException: error unmarshalling arguments;
nested
exception is:
        java.net.MalformedURLException: no protocol: and
        at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java
:325)
        at sun.rmi.transport.Transport$1.run(Transport.java:153)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(
TCPTransport.java:460)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(
TCPTransport.java:701)
        at java.lang.Thread.run(Thread.java:595)
        at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown
Source)
        at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown
Source)
        at sun.rmi.server.UnicastRef.invoke(Unknown Source)
        at
org.springframework.remoting.rmi.RmiInvocationWrapper_Stub.invoke(Unknow
n
Source)
        at
com.drkw.cpds.sos.clients.eca.EcaAsClientOfSosTest.testSOSRMI(
EcaAsClientOfSosTest.java:164)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at
org.apache.jmeter.protocol.java.sampler.JUnitSampler$1.protect(
JUnitSampler.java:372)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at org.apache.jmeter.protocol.java.sampler.JUnitSampler.sample(
JUnitSampler.java:375)
        at
org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:247)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.rmi.UnmarshalException: error unmarshalling arguments;
nested exception is:
        java.net.MalformedURLException: no protocol: and
        at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java
:282)
        at sun.rmi.transport.Transport$1.run(Transport.java:153)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(
TCPTransport.java:460)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(
TCPTransport.java:701)
        at java.lang.Thread.run(Thread.java:595)
Caused by: java.net.MalformedURLException: no protocol: and
        at java.net.URL.<init>(URL.java:567)
        at java.net.URL.<init>(URL.java:464)
        at java.net.URL.<init>(URL.java:413)
        at
sun.rmi.server.LoaderHandler.pathToURLs(LoaderHandler.java:747)
        at
sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:147)
        at
java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java
:620)
        at
java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:247)
        at sun.rmi.server.MarshalInputStream.resolveClass(
MarshalInputStream.java:197)
        at
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java
:1538)
        at
java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java
:1460)
        at java.io.ObjectInputStream.readOrdinaryObject(
ObjectInputStream.java:1693)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java
:1299)
        at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
        at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:290)
        at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java
:279)
        ... 6 more

This message and any files transmitted with it are confidential and intended solely for the
use of the individual or entity to whom they are addressed. If you have received this message
in error please delete it and any files transmitted with it, after notifying postmaster@uk.mizuho-sc.com

Any opinions expressed in this message may be those of the author and not necessarily those
of the company. The company accepts no responsibility for the accuracy or completeness of
any information contained herein. This message is not intended to create legal relations between
the company and the recipient. 
Recipients should please note that messages sent via the Internet may be intercepted and that
caution should therefore be exercised before dispatching to the company any confidential or
sensitive information. 
Mizuho International plc Bracken House, One Friday Street, London EC4M 9JA. TEL. 020 72361090.
Wholly owned subsidiary of Mizuho Securities Co., Ltd. Member of Mizuho Financial Group. Authorised
and regulated by the Financial Services Authority. Member of the London Stock Exchange. 

Registered in England No. 1203696. Registered office as above.


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


Mime
View raw message