Issue 69528

Summary: RMI codebase of java plugins should be the expanded path
Product: udk Reporter: netforce1 <d.de.wit>
Component: codeAssignee: AOO issues mailing list <issues>
Status: UNCONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: issues, kay.ramme, stephan.bergmann.secondary
Version: OOo 2.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

Description netforce1 2006-09-14 13:48:42 UTC
The java.rmi.server.codebase property for java plugins is set to
vnd.sun.star.expand:$UNO_USER_PACKAGES_CACHE/path_to_jar. This causes problems
when you try to send an object from the plugin to an rmi server (other then
openoffice). The rmi server cannot deserialize the object, because it cannot
resolve the codebase. 

See the following stacktrace:
Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested
exception is: 
	java.net.MalformedURLException: unknown protocol: vnd.sun.star.expand
	at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
	at sun.rmi.transport.Transport$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.Transport.serviceCall(Unknown Source)
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.net.MalformedURLException: unknown protocol: vnd.sun.star.expand
	at java.net.URL.<init>(Unknown Source)
	at java.net.URL.<init>(Unknown Source)
	at java.net.URL.<init>(Unknown Source)
	at sun.rmi.server.LoaderHandler.pathToURLs(Unknown Source)
	at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
	at java.rmi.server.RMIClassLoader$2.loadClass(Unknown Source)
	at java.rmi.server.RMIClassLoader.loadClass(Unknown Source)
	at sun.rmi.server.MarshalInputStream.resolveClass(Unknown Source)
	at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
	at java.io.ObjectInputStream.readClassDesc(Unknown Source)
	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
	at java.io.ObjectInputStream.readObject0(Unknown Source)
	at java.io.ObjectInputStream.readObject(Unknown Source)
	at java.util.ArrayList.readObject(Unknown Source)
	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 java.io.ObjectStreamClass.invokeReadObject(Unknown Source)
	at java.io.ObjectInputStream.readSerialData(Unknown Source)
	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
	at java.io.ObjectInputStream.readObject0(Unknown Source)
	at java.io.ObjectInputStream.readObject(Unknown Source)
	at sun.rmi.server.UnicastRef.unmarshalValue(Unknown Source)
	... 7 more
Comment 1 kay.ramme 2006-09-28 09:48:34 UTC
KR->SB: Can you help?
Comment 2 Stephan Bergmann 2006-09-28 14:37:43 UTC
@netforce1:  Sorry, I do not understand your description.

1  What exactly do you mean with "java plugins"?

2  I assume with "java.rmi.server.codebase" property you mean some
java.lang.System.getProperties()-style property of some JVM.  What JVM are we
talking about (the JVM started within OOo, the JVM of some stand alone Java
application, etc.)?

3  Do you have an idea what code sets the property to that value?
Comment 3 netforce1 2006-09-29 08:36:43 UTC
1  We have an UNO package with some java macros, I did not exactly now how to
describe that, so I called it java plugins. 

2  It is indeed a system property, it is set in the JVM in which the java macros
run. 

3  I don't know, I haven't seen much of the OpenOffice.org code yet. Maybe the
code starts the JVM or the macros.
Comment 4 Stephan Bergmann 2006-10-02 09:55:59 UTC
I could not reproduce this.  In an OOo 2.0.3 using Sun Java 1.5.0_08, I did the
below to get a list of all Java properties, and "java.rmi.server.codebase" was
not among them.

With an empty Writer document, I created a BeanShell macro via "Tools - Macros -
Organize Macros - BeanShell...", created a new library and macro under "My
Macros", edited it by changing the single line

  xTextRange.setString( "Hello World (in BeanShell)" );

into the three lines

  s = new java.io.ByteArrayOutputStream();
  System.getProperties().list(new java.io.PrintStream(s));
  xTextRange.setString( s.toString() );

and then let it "Run".

@netforce1:  Do you have a more specific description how to *do* reproduce your
problem?
Comment 5 Marcus 2017-05-20 11:33:40 UTC
Reset assigne to the default "issues@openoffice.apache.org".