Issue 3 in srmi: To support jarred projects, must use SRMIClassLoader

0 views
Skip to first unread message

codesite...@google.com

unread,
Dec 25, 2007, 6:09:38 AM12/25/07
to srmi...@googlegroups.com
Issue 3: To support jarred projects, must use SRMIClassLoader
http://code.google.com/p/srmi/issues/detail?id=3

New issue report by mohammad.nabil.h:
What steps will reproduce the problem?
1. Run the server using "java -ea -cp
.:SRMI.jar:lib/tools.jar:lib/log4j-1.2.14.jar:lib/javassist.jar:lib/bcel-5.2.jar
-jar SRMI.jar server" given that SRMI.Tests.Test is the main class.

What is the expected output? What do you see instead?
Expecting successful launching of the server. What happens is that I get
exception "java.lang.ClassNotFoundException:
SRMI.Tests.MyServer_generated_interface (no security manager: RMI class
loader disabled)". Even if I set correct security policy I get
ClassCastException.

Workaround?
Use SRMIClassLoader initialized to srmi.basedir.

Cause?
Must never let RMI use its RMIClassLoader. First for class cast exceptions,
and second for the security policies. That happens in this case because in
case of jarred projects, the generated code is not in the startup
classpath. And thus unloadable using system class loader.

Try to find some why so we don't have to use SRMIClassLoader at all.

Issue attributes:
Status: Accepted
Owner: mohammad.nabil.h
Labels: Type-Other Priority-Medium Milestone-Release1.0 Usability

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

codesite...@google.com

unread,
Dec 25, 2007, 6:09:38 AM12/25/07
to srmi...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages