[Mc4j-development] [ mc4j-Bugs-936480 ] Problem connecting to MX4J 2.0.1 with Java 1.4.2
Brought to you by:
ghinkl
From: SourceForge.net <no...@so...> - 2004-04-21 12:59:36
|
Bugs item #936480, was opened at 2004-04-16 12:20 Message generated for change (Comment added) made by ghinkl You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=936480&group_id=60228 Category: Connections Group: MC4J 1.2b5 >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Christian Schweer (holbitlan) >Assigned to: Greg Hinkle (ghinkl) Summary: Problem connecting to MX4J 2.0.1 with Java 1.4.2 Initial Comment: Hi! When connecting mc4j under Java 1.4.2 to mx4j 2.0.1 I get a NoInitialContextException (stacktrace below). As a patch I modified org.mc4j.console.connection.JSR160ConnectionNode (see attachment): - added method getDefaultInitialContext() to allow setting the InitialContext - modified connect() to use the given initial context or a default context. - added catch for SecurityException to provide a usefull error message of principle/credential combination is invalid. Perhaps the connect() method has to be enhanced to use the value of the system property for the inital context, before using a default value! I would be glad, if you cut reenter my patch into the cvs! CU Christian (holbitlan) java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:317) at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:247) at org.mc4j.console.connection.JSR160ConnectionNode.connect(JSR160ConnectionNode.java:69) at org.mc4j.console.ConnectAction.performAction(ConnectAction.java:79) at org.openide.util.actions.NodeAction$3.run(NodeAction.java:440) at org.openide.util.actions.CallableSystemAction$ActionRunnable.actionPerformed(CallableSystemAction.java:247) at org.netbeans.core.ModuleActions.invokeAction(ModuleActions.java:71) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.openide.util.actions.CallableSystemAction.invokeAction(CallableSystemAction.java:179) at org.openide.util.actions.CallableSystemAction.access$000(CallableSystemAction.java:31) at org.openide.util.actions.CallableSystemAction$ActionRunnable.doRun(CallableSystemAction.java:241) at org.openide.util.actions.CallableSystemAction$2.run(CallableSystemAction.java:111) at org.openide.util.Task.run(Task.java:136) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:330) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:686) Caused by: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:640) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243) at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:280) at javax.naming.InitialContext.lookup(InitialContext.java:347) at javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1785) at javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1751) at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:259) [catch] ... 17 more ---------------------------------------------------------------------- >Comment By: Greg Hinkle (ghinkl) Date: 2004-04-21 07:59 Message: Logged In: YES user_id=773314 Checked in and tested. Won't use the system property as mc4j is a standalone application that you won't usually want to set startup parameters for. Thanks! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=936480&group_id=60228 |