[ mx4j-Bugs-944936 ] RMIConnectorServer problem
"SourceForge.net" <[email protected]>
| Newsgroups | gmane.comp.java.mx4j.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #944936, was opened at 2004-04-29 22:35
Message generated for change (Comment added) made by superbonbon
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=450647&aid=944936&group_id=47745
Category: RMI Adaptor/Connector
Group: Release 2.0.1
>Status: Closed
Resolution: None
Priority: 5
Submitted By: superbonbon (superbonbon)
Assigned to: Nobody/Anonymous (nobody)
Summary: RMIConnectorServer problem
Initial Comment:
Hi
When starting the RMIConnectorServer from an
application installed in a directory path containing a
space such as C:\te st\myApp
Gives the following stack strace :
java.io.IOException:
javax.naming.CommunicationException [Root exception is java
.rmi.ServerException: RemoteException occurred in
server thread; nested exceptio
n is:
java.rmi.UnmarshalException: error
unmarshalling arguments; nested excep
tion is:
java.net.MalformedURLException: no protocol: and]
at
mx4j.remote.resolver.rmi.RMIResolver.bindServer(RMIResolver.java:199)
at
javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServ
er.java:152)
...
The RMIConnectorServer is working perfectly well if the
installed application path name does not contains any
spaces such as C:\test\myApp
The bug is occuring on a windows 2000 sp4 station
with sun jdk 1.4.2_04
----------------------------------------------------------------------
>Comment By: superbonbon (superbonbon)
Date: 2004-05-25 21:14
Message:
Logged In: YES
user_id=641892
Finally the issue is resolved, this problem is only occuring
when the RMIConnectorServer class is loaded by an
java.net.URLClassLoader().
If the jars URLs passed to the URLClassLoader constructor
contains spaces in their path, these spaces must be encoded
with %20 char to fix the bug that occurs later.
----------------------------------------------------------------------
Comment By: superbonbon (superbonbon)
Date: 2004-04-29 22:42
Message:
Logged In: YES
user_id=641892
I forgot to post the (pseudo ) code that is running to
create the issue with the space in path ( works fine
otherwise.. ) :
int adapterPort = 1099;
String namingServiceBeanName = "Naming:type=rmiregistry";
ObjectName naming = new ObjectName( namingServiceBeanName );
server.createMBean( "mx4j.tools.naming.NamingService",
naming, null );
NamingServiceMBean namingSrv =
(NamingServiceMBean)MBeanServerInvocationHandler.newProxyInstance(
server, naming, NamingServiceMBean.class, false );
namingSrv.setPort( adapterPort );
namingSrv.start();
JMXServiceURL address = new JMXServiceURL(
"service:jmx:rmi://localhost/jndi/rmi://localhost:" +
adapterPort + "/" + jndiName );
JMXConnectorServer connector =
JMXConnectorServerFactory.newJMXConnectorServer( address,
null, null );
ObjectName connectorServerName = ObjectName.getInstance(
"connectors:protocol=" + connectorType );
server.registerMBean( connector, connectorServerName );
connector.start();
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=450647&aid=944936&group_id=47745
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click