mc4j-development Mailing List for MC4J JMX Console (Page 8)
Brought to you by:
ghinkl
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(7) |
Oct
(5) |
Nov
(1) |
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(2) |
Feb
|
Mar
|
Apr
(2) |
May
(2) |
Jun
(4) |
Jul
(13) |
Aug
(5) |
Sep
(12) |
Oct
(5) |
Nov
(13) |
Dec
(8) |
2004 |
Jan
(2) |
Feb
(15) |
Mar
(15) |
Apr
(32) |
May
(26) |
Jun
(9) |
Jul
(8) |
Aug
(3) |
Sep
(16) |
Oct
(14) |
Nov
(7) |
Dec
(11) |
2005 |
Jan
(9) |
Feb
(3) |
Mar
(6) |
Apr
(1) |
May
(4) |
Jun
(7) |
Jul
(2) |
Aug
(1) |
Sep
(1) |
Oct
(1) |
Nov
(3) |
Dec
(1) |
2006 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
(2) |
May
(3) |
Jun
|
Jul
(1) |
Aug
(5) |
Sep
(1) |
Oct
|
Nov
(1) |
Dec
|
2007 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: SourceForge.net <no...@so...> - 2004-04-20 17:43:18
|
Bugs item #938730, was opened at 2004-04-20 19:43 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=938730&group_id=60228 Category: MBeans Group: None Status: Open Resolution: None Priority: 5 Submitted By: Christian Schweer (holbitlan) Assigned to: Nobody/Anonymous (nobody) Summary: NullPointerException with right click on MBean Initial Comment: Hi! With the current cvs-build as well as 1.2beta5 I get I NullPointerException everytime I do a right-click on a MBean in the "Managed Object Explorer". I'm using: - current non-developer cvs build - Java 1.4.2 - JSR160 connection to MX4J-2.0.1 On prior versions I got a context-menu in which I could select the available dashboards, invoke operations or open the properties. Steps to reproduce: - given the above configuration: connect to server - select a MBean - right-click on the MBean Here is the stacktrace: --snip java.lang.ExceptionInInitializerError at org.mc4j.console.bean.DashboardsAction.anythingToDisplay(DashboardsAction.java:113) at org.mc4j.console.bean.DashboardsAction.getPopupPresenter(DashboardsAction.java:101) at org.openide.util.Utilities.actionsToPopup(Utilities.java:2150) at org.openide.util.Utilities.actionsToPopup(Utilities.java:2212) at org.openide.explorer.view.TreeView.createPopup(TreeView.java:1018) at org.openide.explorer.view.TreeView$PopupAdapter.showPopup(TreeView.java:1001) at org.openide.awt.MouseUtils$PopupMouseAdapter.maybePopup(MouseUtils.java:138) at org.openide.awt.MouseUtils$PopupMouseAdapter.mouseReleased(MouseUtils.java:133) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:232) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5100) at java.awt.Component.processEvent(Component.java:4897) at java.awt.Container.processEvent(Container.java:1569) at java.awt.Component.dispatchEventImpl(Component.java:3615) at java.awt.Container.dispatchEventImpl(Container.java:1627) at java.awt.Component.dispatchEvent(Component.java:3477) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128) at java.awt.Container.dispatchEventImpl(Container.java:1613) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3477) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) Caused by: java.lang.NullPointerException at org.mc4j.console.dashboard.DashboardLoader.assignDashboardMatch(DashboardLoader.java:130) at org.mc4j.console.dashboard.DashboardLoader.buildDashboard(DashboardLoader.java:98) at org.mc4j.console.dashboard.DashboardManager.initialize(DashboardManager.java:99) at org.mc4j.console.dashboard.DashboardManager.<init>(DashboardManager.java:53) at org.mc4j.console.dashboard.DashboardManager.<clinit>(DashboardManager.java:50) [catch] ... 28 more ==> java.lang.NullPointerException at org.mc4j.console.dashboard.DashboardLoader.assignDashboardMatch(DashboardLoader.java:130) at org.mc4j.console.dashboard.DashboardLoader.buildDashboard(DashboardLoader.java:98) at org.mc4j.console.dashboard.DashboardManager.initialize(DashboardManager.java:99) at org.mc4j.console.dashboard.DashboardManager.<init>(DashboardManager.java:53) at org.mc4j.console.dashboard.DashboardManager.<clinit>(DashboardManager.java:50) at org.mc4j.console.bean.DashboardsAction.anythingToDisplay(DashboardsAction.java:113) at org.mc4j.console.bean.DashboardsAction.getPopupPresenter(DashboardsAction.java:101) at org.openide.util.Utilities.actionsToPopup(Utilities.java:2150) at org.openide.util.Utilities.actionsToPopup(Utilities.java:2212) at org.openide.explorer.view.TreeView.createPopup(TreeView.java:1018) at org.openide.explorer.view.TreeView$PopupAdapter.showPopup(TreeView.java:1001) at org.openide.awt.MouseUtils$PopupMouseAdapter.maybePopup(MouseUtils.java:138) at org.openide.awt.MouseUtils$PopupMouseAdapter.mouseReleased(MouseUtils.java:133) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:232) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5100) at java.awt.Component.processEvent(Component.java:4897) at java.awt.Container.processEvent(Container.java:1569) at java.awt.Component.dispatchEventImpl(Component.java:3615) at java.awt.Container.dispatchEventImpl(Container.java:1627) at java.awt.Component.dispatchEvent(Component.java:3477) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128) at java.awt.Container.dispatchEventImpl(Container.java:1613) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3477) [catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) --snap Thx in advance, holbitlan ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=938730&group_id=60228 |
From: Daniel X. <Dan...@th...> - 2004-04-20 14:48:26
|
I have tried a simple management operation accepting a string parameter. But my mbean received null value no matter what value I specified in the Run Action popup window. The MBean server I am using is MX4J version 1.1.1. I am using a Windows2K box. I also created a RMI Adaptor for the MBean server for the MC4J console to connect through. For management operations that do not expect any parameter, everything was working fine. =20 Can anybody provide some insight please? =20 Thanks DX =20 P.S. is there any plan that MC4J to work with more recent version of MX4J? The doc says MC4J is only tested with MX4J V1.1.=20 =20 =20 =20 -------------------------------------------------------- This message may contain confidential information and is intended for = specific recipients unless explicitly noted otherwise. If you have = reason to believe you are not an intended recipient of this message, = please delete it and notify the sender. This message may not represent = the opinion of Intercontinental Exchange, Inc. (ICE), its subsidiaries = or affiliates, and does not constitute a contract or guarantee. = Unencrypted electronic mail is not secure and the recipient of this = message is expected to provide safeguards from viruses and pursue = alternate means of communication where privacy or a binding message is = desired. =20 =20 |
From: SourceForge.net <no...@so...> - 2004-04-16 17:20:13
|
Bugs item #936480, was opened at 2004-04-16 19:20 Message generated for change (Tracker Item Submitted) made by Item Submitter 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: Open Resolution: None Priority: 5 Submitted By: Christian Schweer (holbitlan) Assigned to: Nobody/Anonymous (nobody) 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 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=936480&group_id=60228 |
From: SourceForge.net <no...@so...> - 2004-04-16 06:02:34
|
Bugs item #936109, was opened at 2004-04-16 14:02 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=936109&group_id=60228 Category: Operations Group: MC4J 1.2b5 Status: Open Resolution: None Priority: 5 Submitted By: yun yang (notyy) Assigned to: Nobody/Anonymous (nobody) Summary: ConnectionWizardHelpLink Error Initial Comment: when using wizard to establish a connection . in the left panel,click "help" tab,shows some information in the panel,including a link "See http://mc4j.sf.net for information on connecting to each type of server." click the link, UnexpectedException occurs. with the following detail: java.lang.NullPointerException at sun.java2d.SunGraphics2D.drawImage (SunGraphics2D.java:2765) at sun.awt.image.ImageRepresentation.drawToBufImage (ImageRepresentation.java:758) at sun.java2d.pipe.DrawImage.scaleImage (DrawImage.java:790) at sun.java2d.SunGraphics2D.drawImage (SunGraphics2D.java:2773) at sun.java2d.SunGraphics2D.drawImage (SunGraphics2D.java:2726) at javax.swing.text.html.ImageView.paint (ImageView.java:363) at javax.swing.text.BoxView.paintChild (BoxView.java:144) at javax.swing.text.BoxView.paint (BoxView.java:407) at javax.swing.text.BoxView.paintChild (BoxView.java:144) at javax.swing.text.BoxView.paint (BoxView.java:407) at javax.swing.text.ParagraphView.paint (ParagraphView.java:555) at javax.swing.text.html.ParagraphView.paint (ParagraphView.java:220) at javax.swing.text.BoxView.paintChild (BoxView.java:144) at javax.swing.text.BoxView.paint (BoxView.java:407) at javax.swing.text.html.BlockView.paint (BlockView.java:264) at javax.swing.text.BoxView.paintChild (BoxView.java:144) at javax.swing.text.BoxView.paint (BoxView.java:407) at javax.swing.text.html.BlockView.paint (BlockView.java:264) at javax.swing.text.BoxView.paintChild (BoxView.java:144) at javax.swing.text.BoxView.paint (BoxView.java:407) at javax.swing.text.html.TableView$RowView.paint (TableView.java:1360) at javax.swing.text.html.TableView.paint (TableView.java:726) at javax.swing.text.BoxView.paintChild (BoxView.java:144) at javax.swing.text.BoxView.paint (BoxView.java:407) at javax.swing.text.html.BlockView.paint (BlockView.java:264) at javax.swing.text.BoxView.paintChild (BoxView.java:144) at javax.swing.text.BoxView.paint (BoxView.java:407) at javax.swing.text.html.TableView$RowView.paint (TableView.java:1360) at javax.swing.text.html.TableView.paint (TableView.java:726) at javax.swing.text.BoxView.paintChild (BoxView.java:144) at javax.swing.text.BoxView.paint (BoxView.java:407) at javax.swing.text.html.BlockView.paint (BlockView.java:264) at javax.swing.text.BoxView.paintChild (BoxView.java:144) at javax.swing.text.BoxView.paint (BoxView.java:407) at javax.swing.text.html.BlockView.paint (BlockView.java:264) at javax.swing.plaf.basic.BasicTextUI$RootView.paint (BasicTextUI.java:1318) at javax.swing.plaf.basic.BasicTextUI.paintSafely (BasicTextUI.java:635) at javax.swing.plaf.basic.BasicTextUI.paint (BasicTextUI.java:769) at javax.swing.plaf.basic.BasicTextUI.update (BasicTextUI.java:748) at javax.swing.JComponent.paintComponent (JComponent.java:541) at javax.swing.JComponent.paint (JComponent.java:808) at javax.swing.JComponent.paintChildren (JComponent.java:647) at javax.swing.JComponent.paint (JComponent.java:817) at javax.swing.JViewport.paint (JViewport.java:707) at javax.swing.JComponent.paintChildren (JComponent.java:647) at javax.swing.JComponent.paint (JComponent.java:817) at javax.swing.JComponent.paintChildren (JComponent.java:647) at javax.swing.JComponent.paint (JComponent.java:817) at javax.swing.JComponent.paintChildren (JComponent.java:647) at javax.swing.JComponent.paint (JComponent.java:817) at javax.swing.JComponent.paintChildren (JComponent.java:647) at javax.swing.JComponent.paint (JComponent.java:817) at javax.swing.JComponent.paintChildren (JComponent.java:647) at javax.swing.JComponent.paint (JComponent.java:817) at javax.swing.JComponent.paintChildren (JComponent.java:647) at javax.swing.JComponent.paint (JComponent.java:817) at javax.swing.JLayeredPane.paint (JLayeredPane.java:552) at javax.swing.JComponent.paintChildren (JComponent.java:647) at javax.swing.JComponent.paintWithOffscreenBuffer (JComponent.java:4778) at javax.swing.JComponent.paintDoubleBuffered (JComponent.java:4724) at javax.swing.JComponent.paint (JComponent.java:798) at java.awt.GraphicsCallback$PaintCallback.run (GraphicsCallback.java:21) at sun.awt.SunGraphicsCallback.runOneComponent (SunGraphicsCallback.java:60) at sun.awt.SunGraphicsCallback.runComponents (SunGraphicsCallback.java:97) at java.awt.Container.paint (Container.java:1309) at sun.awt.RepaintArea.paint (RepaintArea.java:177) at sun.awt.windows.WComponentPeer.handleEvent (WComponentPeer.java:260) at java.awt.Component.dispatchEventImpl (Component.java:3699) at java.awt.Container.dispatchEventImpl (Container.java:1623) at java.awt.Window.dispatchEventImpl (Window.java:1590) at java.awt.Component.dispatchEvent (Component.java:3480) [catch] at java.awt.EventQueue.dispatchEvent (EventQueue.java:450) at java.awt.EventDispatchThread.pumpOneEventForHierarch y(EventDispatchThread.java:197) at java.awt.EventDispatchThread.pumpEventsForHierarchy (EventDispatchThread.java:150) at java.awt.EventDispatchThread.pumpEventsForHierarchy (EventDispatchThread.java:140) at java.awt.Dialog.show(Dialog.java:538) at org.netbeans.core.windows.services.NbPresenter.superSh ow(NbPresenter.java:722) at org.netbeans.core.windows.services.NbPresenter.doShow (NbPresenter.java:765) at org.netbeans.core.windows.services.NbPresenter.run (NbPresenter.java:753) at org.openide.util.Mutex.doEventAccess (Mutex.java:924) at org.openide.util.Mutex.readAccess (Mutex.java:158) at org.netbeans.core.windows.services.NbPresenter.show (NbPresenter.java:738) at org.mc4j.console.ConnectAction$1.run (ConnectAction.java:61) at java.awt.event.InvocationEvent.dispatch (InvocationEvent.java:171) at java.awt.EventQueue.dispatchEvent (EventQueue.java:448) at java.awt.EventDispatchThread.pumpOneEventForHierarch y(EventDispatchThread.java:197) at java.awt.EventDispatchThread.pumpEventsForHierarchy (EventDispatchThread.java:150) at java.awt.EventDispatchThread.pumpEvents (EventDispatchThread.java:144) at java.awt.EventDispatchThread.pumpEvents (EventDispatchThread.java:136) at java.awt.EventDispatchThread.run (EventDispatchThread.java:99) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=936109&group_id=60228 |
From: SourceForge.net <no...@so...> - 2004-04-15 21:03:32
|
Bugs item #935591, was opened at 2004-04-15 12:49 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=935591&group_id=60228 Category: Notifications Group: MC4J 1.2b5 Status: Open Resolution: None Priority: 5 Submitted By: Michael Behnck (madt) Assigned to: Nobody/Anonymous (nobody) Summary: NotificationListener Registration Initial Comment: After having registered a listener it is not stopped by disconnecting from the server! This means that notifications still are being received after the connection to the server has been closed. This implies that if you connect to the server again without having stopped the MBeanServer and register the same listener again, you receive the same notifications twice! Disconnecting, connecting and registering a listener again adds another listener so the notifications are displayed three times and so on... This problem might have to do with the bug [ 872545 ] 'Stop Listening' on a notification fails see: http://sourceforge.net/tracker/index.php? func=detail&aid=872545&group_id=60228&atid=493495 I reckon that a registered listener is not removed even when disconnecting because the removeNotificationListener() method fails. This is a serious problem as you can't restart your agent every time you want to remove a listener, restart MC4J or reconnect to the same server. Have fun, Michael ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=935591&group_id=60228 |
From: SourceForge.net <no...@so...> - 2004-04-15 21:01:00
|
Bugs item #916667, was opened at 2004-03-15 09:43 Message generated for change (Comment added) made by ghinkl You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=916667&group_id=60228 Category: Connections Group: MC4J 1.2b5 >Status: Open Resolution: Invalid >Priority: 9 Submitted By: Nobody/Anonymous (nobody) Assigned to: Greg Hinkle (ghinkl) Summary: ClassCastException Initial Comment: Created MBeanServer with ID: 1e4cbc4:fb4ef2d33c:- 8000:1096782-D:1 RMIConnectorServer started at: service:jmx:rmi://localhost/jndi/jrmp When trying to connect to server via MC4J (V1.2) the following error occurs: A java.lang.ClassCastException exception has occurred. java.lang.ClassCastException at mx4j.rmi.jrmp.JRMPConnector.narrow (JRMPConnector.java:) The connection properties are: Initial Context Factory: com.sun.jndi.rmi.registry.RegistryContextFactory JNDI Name: jmrp Server URL: rmi://localhost:1099 Connection Type: MX4J Source Code: import java.io.IOException; import java.net.MalformedURLException; import java.util.HashMap; import java.util.Map; import javax.management.InstanceAlreadyExistsException; import javax.management.InstanceNotFoundException; import javax.management.MBeanException; import javax.management.MBeanRegistrationException; import javax.management.MBeanServer; import javax.management.MBeanServerFactory; import javax.management.MalformedObjectNameException; import javax.management.NotCompliantMBeanException; import javax.management.ObjectName; import javax.management.ReflectionException; import javax.management.remote.JMXConnectorServer; import javax.management.remote.JMXConnectorServerFactory; import javax.management.remote.JMXServiceURL; import javax.naming.Context; /** * @author Michael Behnck */ public class JMXConn { public static void main(String[] args) { // Create a MBeanServer MBeanServer server = MBeanServerFactory.createMBeanServer(); try { // Create and start the naming service ObjectName naming = new ObjectName("Naming:type=rmiregistry"); server.createMBean ("mx4j.tools.naming.NamingService", naming, null); server.invoke (naming, "start", null, null); } catch (InstanceAlreadyExistsException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (MBeanRegistrationException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (NotCompliantMBeanException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (InstanceNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (ReflectionException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (MBeanException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (MalformedObjectNameException e) { // TODO Auto-generated catch block e.printStackTrace(); } JMXServiceURL address = null; try { // The address of the connector address = new JMXServiceURL("rmi", "localhost", 0, "/jndi/jrmp"); } catch (MalformedURLException e2) { // TODO Auto-generated catch block e2.printStackTrace(); } // Initial Context and Provider URL Map environment = new HashMap(); environment.put (Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.rmi.r egistry.RegistryContextFactory"); environment.put (Context.PROVIDER_URL, "rmi://localhost:1099"); JMXConnectorServer cntorServer; try { // Create and start the JMXConnectorServer cntorServer = JMXConnectorServerFactory.newJMXConnectorServer (address, environment, server); cntorServer.start(); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } } Thank you, Michael Behnck ---------------------------------------------------------------------- >Comment By: Greg Hinkle (ghinkl) Date: 2004-04-14 09:03 Message: Logged In: YES user_id=773314 Hmm, that's weird. When I was testing the RMI connector, I didn't need to specify the InitialContext factory class. The example client in the RI doesn't set it either. I'll have to re- enable the Initial Context field for jsr 160 connections i guess. You could put the jndi.properties file in the <mc4j- home>/modules/mc4j_core.jar file. Then it should be found. Now, their could be another problem. Based on the JMX Remoting security, I set the credentials like this: String[] credentials = new String[] { "username" , "password" }; env.put("jmx.remote.credentials", credentials); Should I also be setting them for jndi lookup like the following? env.put(Context.SECURITY_PRINCIPAL, ldapUser); env.put(Context.SECURITY_CREDENTIALS, ldapPasswd); ---------------------------------------------------------------------- Comment By: Michael Behnck (madt) Date: 2004-04-14 08:10 Message: Logged In: YES user_id=998993 The problem is not starting the JMXConnectorServer but connecting to it using MC4J! I have a jndi.properties file in the folder of my server specifying the same initial context as described in david03's post. There is no problem connecting to the server using a JMXConnector written in Java as I can provide the jndi-properties. But using MC4J just these settings can't be found. ---------------------------------------------------------------------- Comment By: David (david03) Date: 2004-04-14 06:54 Message: Logged In: YES user_id=1019428 Michael, You need to do some addition to code while creating JMXConnectorServer. Here are the changes.. Map environment = new HashMap(); environment.put ("java.naming.factory.initial", "com.sun.jndi.rmi.registry.Registr yContextFactory"); JMXConnectorServer cntorServer = JMXConnectorServerFactory.newJMXConnectorServer(url, environment, null); Here enviroment is passed instead of passing NULL ---------------------------------------------------------------------- Comment By: Michael Behnck (madt) Date: 2004-04-14 06:37 Message: Logged In: YES user_id=998993 Hi, trying to connect to a JMXConnectorServer and setting the type to "JSR160" produces the following exception: 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.connection.ReconnectAction.performAction (ReconnectAction.java:37) 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.GeneratedMethodAccessor38.invoke (Unknown Source) 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.findRMIServerJND I(RMIConnector.java:1785) at javax.management.remote.rmi.RMIConnector.findRMIServer (RMIConnector.java:1751) at javax.management.remote.rmi.RMIConnector.connect (RMIConnector.java:259) [catch] ... 16 more I tried to supply the appropriate path to the connection- properties after creating the connection with the wizard which does not provide a way to specify it. Anyways it did not change anything so that I still can't connect to the server. The implementation of the server looks like this: JMXServiceURL url = new JMXServiceURL ("rmi", "localhost", 0, "/jndi/jmx"); JMXConnectorServer cntorServer = JMXConnectorServerFactory.newJMXConnectorServer(url, null, null); ObjectName cntorServerName = ObjectName.getInstance (":service=" + JMXConnectorServer.class.getName() + ",protocol=" + url.getProtocol()); MBeanServer server = MBeanServerFactory.createMBeanServer ("remote.notification.example"); server.registerMBean(cntorServer, cntorServerName); NamingService naming = new NamingService(); ObjectName namingName = ObjectName.getInstance (":service=" + NamingService.class.getName()); server.registerMBean(naming, namingName); naming.start(); cntorServer.start(); Where would I have to put a jndi.properties file in order to be found by the MC4J? ---------------------------------------------------------------------- Comment By: Greg Hinkle (ghinkl) Date: 2004-04-13 21:33 Message: Logged In: YES user_id=773314 david03: When creating the connection, set the type of the connection to be "JSR160", not "MX4J". That should solve your problem. With MX4J 2.0.1, they've switched from their custom remoting to the standard JSR160 specification. This is confusing within the interface and I will find a way to make it clearer for the next release. ---------------------------------------------------------------------- Comment By: David (david03) Date: 2004-04-12 23:35 Message: Logged In: YES user_id=1019428 Hi All, I am also getting exception reported by Michael. Here is what I am using. * MX4J 2.0.1 implementation and running server on it. * Making a MX4J connection from MC4J tool and gets the reported exception. Can you guys please tell me what is wrong here. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2004-03-16 02:52 Message: Logged In: NO So what would I have to do in order to make a "JSR-160" connection with MC4J (what I'm supposed to do). Everything's working fine when using the MX4J 1.1 RMI connector (JRMP adaptor). Cheers, Michael ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2004-03-16 02:50 Message: Logged In: NO So what would I have to do in order to make a "JSR-160" connection with MC4J (what I'm supposed to do). Everything's working fine when using the MX4J 1.1 RMI connector (JRMP adaptor). Cheers, Michael ---------------------------------------------------------------------- Comment By: Greg Hinkle (ghinkl) Date: 2004-03-15 20:53 Message: Logged In: YES user_id=773314 It looks like your creating a JSR-160 style adaptor and then trying to connect the proprietary mx4j 1.1 rmi connector to it. You want to select "JSR-160" from the connection type in MC4J for this type of connection. (I suppose this is now misleading now that MX4J support JSR-160 style service adaptors. I'll have to fix that.hu) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=916667&group_id=60228 |
From: SourceForge.net <no...@so...> - 2004-04-15 20:55:37
|
Bugs item #916667, was opened at 2004-03-15 14:43 Message generated for change (Comment added) made by madt You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=916667&group_id=60228 Category: Connections Group: MC4J 1.2b5 Status: Open Resolution: Invalid Priority: 9 Submitted By: Nobody/Anonymous (nobody) Assigned to: Greg Hinkle (ghinkl) Summary: ClassCastException Initial Comment: Created MBeanServer with ID: 1e4cbc4:fb4ef2d33c:- 8000:1096782-D:1 RMIConnectorServer started at: service:jmx:rmi://localhost/jndi/jrmp When trying to connect to server via MC4J (V1.2) the following error occurs: A java.lang.ClassCastException exception has occurred. java.lang.ClassCastException at mx4j.rmi.jrmp.JRMPConnector.narrow (JRMPConnector.java:) The connection properties are: Initial Context Factory: com.sun.jndi.rmi.registry.RegistryContextFactory JNDI Name: jmrp Server URL: rmi://localhost:1099 Connection Type: MX4J Source Code: import java.io.IOException; import java.net.MalformedURLException; import java.util.HashMap; import java.util.Map; import javax.management.InstanceAlreadyExistsException; import javax.management.InstanceNotFoundException; import javax.management.MBeanException; import javax.management.MBeanRegistrationException; import javax.management.MBeanServer; import javax.management.MBeanServerFactory; import javax.management.MalformedObjectNameException; import javax.management.NotCompliantMBeanException; import javax.management.ObjectName; import javax.management.ReflectionException; import javax.management.remote.JMXConnectorServer; import javax.management.remote.JMXConnectorServerFactory; import javax.management.remote.JMXServiceURL; import javax.naming.Context; /** * @author Michael Behnck */ public class JMXConn { public static void main(String[] args) { // Create a MBeanServer MBeanServer server = MBeanServerFactory.createMBeanServer(); try { // Create and start the naming service ObjectName naming = new ObjectName("Naming:type=rmiregistry"); server.createMBean ("mx4j.tools.naming.NamingService", naming, null); server.invoke (naming, "start", null, null); } catch (InstanceAlreadyExistsException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (MBeanRegistrationException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (NotCompliantMBeanException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (InstanceNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (ReflectionException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (MBeanException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (MalformedObjectNameException e) { // TODO Auto-generated catch block e.printStackTrace(); } JMXServiceURL address = null; try { // The address of the connector address = new JMXServiceURL("rmi", "localhost", 0, "/jndi/jrmp"); } catch (MalformedURLException e2) { // TODO Auto-generated catch block e2.printStackTrace(); } // Initial Context and Provider URL Map environment = new HashMap(); environment.put (Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.rmi.r egistry.RegistryContextFactory"); environment.put (Context.PROVIDER_URL, "rmi://localhost:1099"); JMXConnectorServer cntorServer; try { // Create and start the JMXConnectorServer cntorServer = JMXConnectorServerFactory.newJMXConnectorServer (address, environment, server); cntorServer.start(); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } } Thank you, Michael Behnck ---------------------------------------------------------------------- Comment By: Michael Behnck (madt) Date: 2004-04-15 07:17 Message: Logged In: YES user_id=998993 Putting the jndi.properties in the <mc4j- home>/modules/mc4j_core.jar file solved the problem. I'd say that it depends on the JMXServiceURL whether you need to specify the InitialContext factory class. If you use JNDI to register and find the server then you definetly need an InitialContext. An example of a JMXServiceURL using JNDI is shipped with the MX4J 2.x distribution, see <mx4j- home>/examples/remote/notification Trying to start this example gives me the error: java.io.IOException: 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 mx4j.remote.resolver.rmi.RMIResolver.bindServer (RMIResolver.java:199) at javax.management.remote.rmi.RMIConnectorServer.start (RMIConnectorServer.java:147) at Server.main(Server.java:42) So you'll need to specify the InitialContext... Using a JMXServiceURL without JNDI like in the example 3.1 of the MX4J 2.x tutorial: JMXServiceURL address = new JMXServiceURL ("service:jmx:rmi://host"); you don't need any jndi-properties. Regarding your problem with the credentials you should try connecting to a server using a "JNDI"-JMXServiceURL with and without putting the credentials in the context. Then you'll see whether it's necessary to do so or not. Now that I got the JMXConnectorServer running I considered a different problem: Trying to listen to a notification of a DynamicMBean produced the following error: A javax.management.remote.JMXServerErrorException exception has occurred. java.lang.reflect.UndeclaredThrowableException at $Proxy8.addNotificationListener(Unknown Source) at org.mc4j.console.bean.notification.NotificationNode.toggleNotif ication(NotificationNode.java:108) at org.mc4j.console.bean.notification.NotificationNode$ListenActi on.performAction(NotificationNode.java:182) 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.GeneratedMethodAccessor38.invoke (Unknown Source) 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.management.remote.JMXServerErrorException: Error thrown during invocation at mx4j.remote.rmi.RMIConnectionSubjectInvoker.chain (RMIConnectionSubjectInvoker.java:102) at mx4j.remote.rmi.RMIConnectionSubjectInvoker.access$000 (RMIConnectionSubjectInvoker.java:32) at mx4j.remote.rmi.RMIConnectionSubjectInvoker$1.run (RMIConnectionSubjectInvoker.java:88) at java.security.AccessController.doPrivileged(Native Method) at mx4j.remote.MX4JRemoteUtils.subjectInvoke (MX4JRemoteUtils.java:135) at mx4j.remote.rmi.RMIConnectionSubjectInvoker.subjectInvoke (RMIConnectionSubjectInvoker.java:84) at mx4j.remote.rmi.RMIConnectionSubjectInvoker.invoke (RMIConnectionSubjectInvoker.java:61) at $Proxy0.addNotificationListeners(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl.addNotificati onListeners(RMIConnectionImpl.java:101) 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 sun.rmi.server.UnicastServerRef.dispatch (UnicastServerRef.java:261) at sun.rmi.transport.Transport$1.run (Transport.java:148) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall (Transport.java:144) 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:536) at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromSer ver(StreamRemoteCall.java:247) at sun.rmi.transport.StreamRemoteCall.executeCall (StreamRemoteCall.java:223) at sun.rmi.server.UnicastRef.invoke (UnicastRef.java:133) at com.sun.jmx.remote.internal.PRef.invoke (Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl_Stub.addNot ificationListeners(Unknown Source) at javax.management.remote.rmi.RMIConnector.addListenersWith Subjects(RMIConnector.java:540) at javax.management.remote.rmi.RMIConnector.addListenerWithS ubject(RMIConnector.java:515) at javax.management.remote.rmi.RMIConnector.access$700 (RMIConnector.java:118) at javax.management.remote.rmi.RMIConnector$RemoteMBeanSer verConnection.addNotificationListener (RMIConnector.java:1181) at org.mc4j.console.connection.proxy.JMXRemotingMBeanServerP roxy.invoke(JMXRemotingMBeanServerProxy.java:80) ... 16 more Caused by: java.lang.NoSuchMethodError: javax.management.MBeanServer.getClassLoaderFor (Ljavax/management/ObjectName;)Ljava/lang/ClassLoader; at mx4j.remote.rmi.RMIConnectionInvoker.addNotificationListeners (RMIConnectionInvoker.java:254) 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 mx4j.remote.rmi.RMIConnectionProxy.invoke (RMIConnectionProxy.java:36) at mx4j.remote.rmi.RMIConnectionSubjectInvoker.chain (RMIConnectionSubjectInvoker.java:97) at mx4j.remote.rmi.RMIConnectionSubjectInvoker.access$000 (RMIConnectionSubjectInvoker.java:32) at mx4j.remote.rmi.RMIConnectionSubjectInvoker$1.run (RMIConnectionSubjectInvoker.java:88) at java.security.AccessController.doPrivileged(Native Method) at mx4j.remote.MX4JRemoteUtils.subjectInvoke (MX4JRemoteUtils.java:135) at mx4j.remote.rmi.RMIConnectionSubjectInvoker.subjectInvoke (RMIConnectionSubjectInvoker.java:84) at mx4j.remote.rmi.RMIConnectionSubjectInvoker.invoke (RMIConnectionSubjectInvoker.java:61) at $Proxy0.addNotificationListeners(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl.addNotificati onListeners(RMIConnectionImpl.java:101) 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 sun.rmi.server.UnicastServerRef.dispatch (UnicastServerRef.java:261) at sun.rmi.transport.Transport$1.run (Transport.java:148) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall (Transport.java:144) at sun.rmi.transport.tcp.TCPTransport.handleMessages (TCPTransport.java:460) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run (TCPTransport.java:701) [catch] at java.lang.Thread.run(Thread.java:536) ==> javax.management.remote.JMXServerErrorException: Error thrown during invocation at mx4j.remote.rmi.RMIConnectionSubjectInvoker.chain (RMIConnectionSubjectInvoker.java:102) at mx4j.remote.rmi.RMIConnectionSubjectInvoker.access$000 (RMIConnectionSubjectInvoker.java:32) at mx4j.remote.rmi.RMIConnectionSubjectInvoker$1.run (RMIConnectionSubjectInvoker.java:88) at java.security.AccessController.doPrivileged(Native Method) at mx4j.remote.MX4JRemoteUtils.subjectInvoke (MX4JRemoteUtils.java:135) at mx4j.remote.rmi.RMIConnectionSubjectInvoker.subjectInvoke (RMIConnectionSubjectInvoker.java:84) at mx4j.remote.rmi.RMIConnectionSubjectInvoker.invoke (RMIConnectionSubjectInvoker.java:61) at $Proxy0.addNotificationListeners(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl.addNotificati onListeners(RMIConnectionImpl.java:101) 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 sun.rmi.server.UnicastServerRef.dispatch (UnicastServerRef.java:261) at sun.rmi.transport.Transport$1.run (Transport.java:148) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall (Transport.java:144) 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:536) at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromSer ver(StreamRemoteCall.java:247) at sun.rmi.transport.StreamRemoteCall.executeCall (StreamRemoteCall.java:223) at sun.rmi.server.UnicastRef.invoke (UnicastRef.java:133) at com.sun.jmx.remote.internal.PRef.invoke (Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl_Stub.addNot ificationListeners(Unknown Source) at javax.management.remote.rmi.RMIConnector.addListenersWith Subjects(RMIConnector.java:540) at javax.management.remote.rmi.RMIConnector.addListenerWithS ubject(RMIConnector.java:515) at javax.management.remote.rmi.RMIConnector.access$700 (RMIConnector.java:118) at javax.management.remote.rmi.RMIConnector$RemoteMBeanSer verConnection.addNotificationListener (RMIConnector.java:1181) at org.mc4j.console.connection.proxy.JMXRemotingMBeanServerP roxy.invoke(JMXRemotingMBeanServerProxy.java:80) at $Proxy8.addNotificationListener(Unknown Source) at org.mc4j.console.bean.notification.NotificationNode.toggleNotif ication(NotificationNode.java:108) at org.mc4j.console.bean.notification.NotificationNode$ListenActi on.performAction(NotificationNode.java:182) 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.GeneratedMethodAccessor38.invoke (Unknown Source) 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: java.lang.NoSuchMethodError: javax.management.MBeanServer.getClassLoaderFor (Ljavax/management/ObjectName;)Ljava/lang/ClassLoader; at mx4j.remote.rmi.RMIConnectionInvoker.addNotificationListeners (RMIConnectionInvoker.java:254) 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 mx4j.remote.rmi.RMIConnectionProxy.invoke (RMIConnectionProxy.java:36) at mx4j.remote.rmi.RMIConnectionSubjectInvoker.chain (RMIConnectionSubjectInvoker.java:97) at mx4j.remote.rmi.RMIConnectionSubjectInvoker.access$000 (RMIConnectionSubjectInvoker.java:32) at mx4j.remote.rmi.RMIConnectionSubjectInvoker$1.run (RMIConnectionSubjectInvoker.java:88) at java.security.AccessController.doPrivileged(Native Method) at mx4j.remote.MX4JRemoteUtils.subjectInvoke (MX4JRemoteUtils.java:135) at mx4j.remote.rmi.RMIConnectionSubjectInvoker.subjectInvoke (RMIConnectionSubjectInvoker.java:84) at mx4j.remote.rmi.RMIConnectionSubjectInvoker.invoke (RMIConnectionSubjectInvoker.java:61) at $Proxy0.addNotificationListeners(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl.addNotificati onListeners(RMIConnectionImpl.java:101) 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 sun.rmi.server.UnicastServerRef.dispatch (UnicastServerRef.java:261) at sun.rmi.transport.Transport$1.run (Transport.java:148) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall (Transport.java:144) at sun.rmi.transport.tcp.TCPTransport.handleMessages (TCPTransport.java:460) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run (TCPTransport.java:701) [catch] at java.lang.Thread.run(Thread.java:536) In the source code the notification is described as below: public MBeanNotificationInfo[] getNotificationInfo() { String[] type = {"jmx.server.Log4JBroadcaster"}; MBeanNotificationInfo[] info = new MBeanNotificationInfo[1]; info[0] = new MBeanNotificationInfo (type, "javax.management.Notification", "Log4JBroadcaster Notification"); return info; } Everything works fine using the JRMPAdaptor of MX4J 1.1 ---------------------------------------------------------------------- Comment By: Greg Hinkle (ghinkl) Date: 2004-04-14 14:03 Message: Logged In: YES user_id=773314 Hmm, that's weird. When I was testing the RMI connector, I didn't need to specify the InitialContext factory class. The example client in the RI doesn't set it either. I'll have to re- enable the Initial Context field for jsr 160 connections i guess. You could put the jndi.properties file in the <mc4j- home>/modules/mc4j_core.jar file. Then it should be found. Now, their could be another problem. Based on the JMX Remoting security, I set the credentials like this: String[] credentials = new String[] { "username" , "password" }; env.put("jmx.remote.credentials", credentials); Should I also be setting them for jndi lookup like the following? env.put(Context.SECURITY_PRINCIPAL, ldapUser); env.put(Context.SECURITY_CREDENTIALS, ldapPasswd); ---------------------------------------------------------------------- Comment By: Michael Behnck (madt) Date: 2004-04-14 13:10 Message: Logged In: YES user_id=998993 The problem is not starting the JMXConnectorServer but connecting to it using MC4J! I have a jndi.properties file in the folder of my server specifying the same initial context as described in david03's post. There is no problem connecting to the server using a JMXConnector written in Java as I can provide the jndi-properties. But using MC4J just these settings can't be found. ---------------------------------------------------------------------- Comment By: David (david03) Date: 2004-04-14 11:54 Message: Logged In: YES user_id=1019428 Michael, You need to do some addition to code while creating JMXConnectorServer. Here are the changes.. Map environment = new HashMap(); environment.put ("java.naming.factory.initial", "com.sun.jndi.rmi.registry.Registr yContextFactory"); JMXConnectorServer cntorServer = JMXConnectorServerFactory.newJMXConnectorServer(url, environment, null); Here enviroment is passed instead of passing NULL ---------------------------------------------------------------------- Comment By: Michael Behnck (madt) Date: 2004-04-14 11:37 Message: Logged In: YES user_id=998993 Hi, trying to connect to a JMXConnectorServer and setting the type to "JSR160" produces the following exception: 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.connection.ReconnectAction.performAction (ReconnectAction.java:37) 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.GeneratedMethodAccessor38.invoke (Unknown Source) 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.findRMIServerJND I(RMIConnector.java:1785) at javax.management.remote.rmi.RMIConnector.findRMIServer (RMIConnector.java:1751) at javax.management.remote.rmi.RMIConnector.connect (RMIConnector.java:259) [catch] ... 16 more I tried to supply the appropriate path to the connection- properties after creating the connection with the wizard which does not provide a way to specify it. Anyways it did not change anything so that I still can't connect to the server. The implementation of the server looks like this: JMXServiceURL url = new JMXServiceURL ("rmi", "localhost", 0, "/jndi/jmx"); JMXConnectorServer cntorServer = JMXConnectorServerFactory.newJMXConnectorServer(url, null, null); ObjectName cntorServerName = ObjectName.getInstance (":service=" + JMXConnectorServer.class.getName() + ",protocol=" + url.getProtocol()); MBeanServer server = MBeanServerFactory.createMBeanServer ("remote.notification.example"); server.registerMBean(cntorServer, cntorServerName); NamingService naming = new NamingService(); ObjectName namingName = ObjectName.getInstance (":service=" + NamingService.class.getName()); server.registerMBean(naming, namingName); naming.start(); cntorServer.start(); Where would I have to put a jndi.properties file in order to be found by the MC4J? ---------------------------------------------------------------------- Comment By: Greg Hinkle (ghinkl) Date: 2004-04-14 02:33 Message: Logged In: YES user_id=773314 david03: When creating the connection, set the type of the connection to be "JSR160", not "MX4J". That should solve your problem. With MX4J 2.0.1, they've switched from their custom remoting to the standard JSR160 specification. This is confusing within the interface and I will find a way to make it clearer for the next release. ---------------------------------------------------------------------- Comment By: David (david03) Date: 2004-04-13 04:35 Message: Logged In: YES user_id=1019428 Hi All, I am also getting exception reported by Michael. Here is what I am using. * MX4J 2.0.1 implementation and running server on it. * Making a MX4J connection from MC4J tool and gets the reported exception. Can you guys please tell me what is wrong here. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2004-03-16 07:52 Message: Logged In: NO So what would I have to do in order to make a "JSR-160" connection with MC4J (what I'm supposed to do). Everything's working fine when using the MX4J 1.1 RMI connector (JRMP adaptor). Cheers, Michael ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2004-03-16 07:50 Message: Logged In: NO So what would I have to do in order to make a "JSR-160" connection with MC4J (what I'm supposed to do). Everything's working fine when using the MX4J 1.1 RMI connector (JRMP adaptor). Cheers, Michael ---------------------------------------------------------------------- Comment By: Greg Hinkle (ghinkl) Date: 2004-03-16 01:53 Message: Logged In: YES user_id=773314 It looks like your creating a JSR-160 style adaptor and then trying to connect the proprietary mx4j 1.1 rmi connector to it. You want to select "JSR-160" from the connection type in MC4J for this type of connection. (I suppose this is now misleading now that MX4J support JSR-160 style service adaptors. I'll have to fix that.hu) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=916667&group_id=60228 |
From: SourceForge.net <no...@so...> - 2004-04-15 20:51:18
|
Bugs item #751079, was opened at 2003-06-08 17:49 Message generated for change (Comment added) made by ghinkl You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=751079&group_id=60228 Category: None >Group: MC4J 1.2b1 >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Vidar Vevik (vevik) >Assigned to: Greg Hinkle (ghinkl) Summary: mc4j_1.2b1 will not connect to jboss on linux Initial Comment: I have used the file broser to locate my jboss home path. It looks like it has some ekstra // in the path. building new mc4j mx4j panel Loading connections into mx4j panel CLASS: org.netbeans.core.modules.Module$OneModuleClassLoader@1af33d6[org.mc4j.console.mc4j_jboss] HERE Turning on modules: org.openide/1 [4.5 200305120100] org.netbeans.core/1 [1.15 200305120100] org.openide.io [1.1 200305120100] org.netbeans.lib.terminalemulator [1.1 200305120100] org.netbeans.core.output/1 [1.1 200305120100] org.mc4j.console.mc4j_weblogic [1.2.0 1.2.0] org.netbeans.core.windows/1 [1.3 200305120100] org.netbeans.core.ui/1 [1.2 200305120100] org.mc4j.console.mc4j_mx4j [1.2.0 1.2.0] org.mc4j.console.mc4j_jdmk [1.2.0 1.2.0] org.openide.loaders [1.0 200305120100] org.netbeans.modules.autoupdate/1 [2.8 200305120100] org.mc4j.console.mc4j_jboss [1.2.0 1.2.0] org.netbeans.modules.text/1 [1.12 200305120100] JBoss install is: file:////java/jboss/ New Delegated Classloader, parent is: org.netbeans.core.modules.Module$OneModuleClassLoader@1af33d6[org.mc4j.console.mc4j_jboss] log4j:ERROR Could not read configuration file from URL [jar:file://java/jboss/client/jbossall-client.jar!/log4j.properties]. java.net.UnknownHostException: java at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:153) at java.net.Socket.connect(Socket.java:434) at java.net.Socket.connect(Socket.java:384) at sun.net.NetworkClient.doConnect(NetworkClient.java:139) at sun.net.NetworkClient.openServer(NetworkClient.java:118) at sun.net.ftp.FtpClient.openServer(FtpClient.java:423) at sun.net.ftp.FtpClient.<init>(FtpClient.java:687) at sun.net.www.protocol.ftp.FtpURLConnection.connect(FtpURLConnection.java:175) at sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(FtpURLConnection.java:257) at sun.net.www.protocol.jar.URLJarFile.retrieve(URLJarFile.java:161) at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:42) at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:53) at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:85) at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:105) at java.net.URL.openStream(URL.java:960) at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:424) at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:460) at org.apache.log4j.LogManager.<clinit>(LogManager.java:113) at org.jboss.logging.Log4jLoggerPlugin.init(Log4jLoggerPlugin.java:63) at org.jboss.logging.Logger.getDelegatePlugin(Logger.java:318) at org.jboss.logging.Logger.<init>(Logger.java:78) at org.jboss.logging.Logger.getLogger(Logger.java:291) at org.jboss.mx.server.MBeanServerImpl.<clinit>(MBeanServerImpl.java:151) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:274) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:108) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:66) at org.mc4j.console.connection.wizard.JBossConnectorChoiceVisualPanel.loadConnectorList(JBossConnectorChoiceVisualPanel.java:103) at org.mc4j.console.connection.wizard.JBossConnectorChoiceVisualPanel.<init>(JBossConnectorChoiceVisualPanel.java:89) at org.mc4j.console.connection.wizard.JBossConnectorChoicePanel.getComponent(JBossConnectorChoicePanel.java:64) at org.openide.WizardDescriptor.updateState(WizardDescriptor.java:504) at org.mc4j.console.connection.wizard.ConnectionDescriptor.updateState(ConnectionDescriptor.java:96) at org.openide.WizardDescriptor.updateStateWithFeedback(WizardDescriptor.java:582) at org.openide.WizardDescriptor.access$300(WizardDescriptor.java:52) at org.openide.WizardDescriptor$Listener.actionPerformed(WizardDescriptor.java:1046) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1764) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1817) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:419) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245) at java.awt.Component.processMouseEvent(Component.java:5134) at java.awt.Component.processEvent(Component.java:4931) at java.awt.Container.processEvent(Container.java:1566) at java.awt.Component.dispatchEventImpl(Component.java:3639) at java.awt.Container.dispatchEventImpl(Container.java:1623) at java.awt.Component.dispatchEvent(Component.java:3480) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3165) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095) at java.awt.Container.dispatchEventImpl(Container.java:1609) at java.awt.Window.dispatchEventImpl(Window.java:1590) at java.awt.Component.dispatchEvent(Component.java:3480) at java.awt.EventQueue.dispatchEvent(EventQueue.java:450) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:140) at java.awt.Dialog.show(Dialog.java:551) at org.netbeans.core.windows.NbPresenter.superShow(NbPresenter.java:692) at org.netbeans.core.windows.NbPresenter.doShow(NbPresenter.java:735) at org.netbeans.core.windows.NbPresenter.run(NbPresenter.java:723) at org.openide.util.Mutex.doEventAccess(Mutex.java:932) at org.openide.util.Mutex.readAccess(Mutex.java:157) at org.netbeans.core.windows.NbPresenter.show(NbPresenter.java:708) at org.mc4j.console.ConnectAction$1.run(ConnectAction.java:96) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:171) at java.awt.EventQueue.dispatchEvent(EventQueue.java:448) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136) at java.awt.EventDispatchThread.run(EventDispatchThread.java:99) log4j:ERROR Ignoring configuration file [jar:file://java/jboss/client/jbossall-client.jar!/log4j.properties]. log4j:WARN No appenders could be found for logger (org.jboss.mx.modelmbean.ModelMBeanInvoker). log4j:WARN Please initialize the log4j system properly. ---------------------------------------------------------------------- >Comment By: Greg Hinkle (ghinkl) Date: 2004-04-14 16:48 Message: Logged In: YES user_id=773314 This was fixed. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=751079&group_id=60228 |
From: SourceForge.net <no...@so...> - 2004-04-15 20:46:08
|
Bugs item #916667, was opened at 2004-03-15 20:13 Message generated for change (Comment added) made by david03 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=916667&group_id=60228 Category: Connections Group: MC4J 1.2b5 Status: Closed Resolution: Invalid Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Greg Hinkle (ghinkl) Summary: ClassCastException Initial Comment: Created MBeanServer with ID: 1e4cbc4:fb4ef2d33c:- 8000:1096782-D:1 RMIConnectorServer started at: service:jmx:rmi://localhost/jndi/jrmp When trying to connect to server via MC4J (V1.2) the following error occurs: A java.lang.ClassCastException exception has occurred. java.lang.ClassCastException at mx4j.rmi.jrmp.JRMPConnector.narrow (JRMPConnector.java:) The connection properties are: Initial Context Factory: com.sun.jndi.rmi.registry.RegistryContextFactory JNDI Name: jmrp Server URL: rmi://localhost:1099 Connection Type: MX4J Source Code: import java.io.IOException; import java.net.MalformedURLException; import java.util.HashMap; import java.util.Map; import javax.management.InstanceAlreadyExistsException; import javax.management.InstanceNotFoundException; import javax.management.MBeanException; import javax.management.MBeanRegistrationException; import javax.management.MBeanServer; import javax.management.MBeanServerFactory; import javax.management.MalformedObjectNameException; import javax.management.NotCompliantMBeanException; import javax.management.ObjectName; import javax.management.ReflectionException; import javax.management.remote.JMXConnectorServer; import javax.management.remote.JMXConnectorServerFactory; import javax.management.remote.JMXServiceURL; import javax.naming.Context; /** * @author Michael Behnck */ public class JMXConn { public static void main(String[] args) { // Create a MBeanServer MBeanServer server = MBeanServerFactory.createMBeanServer(); try { // Create and start the naming service ObjectName naming = new ObjectName("Naming:type=rmiregistry"); server.createMBean ("mx4j.tools.naming.NamingService", naming, null); server.invoke (naming, "start", null, null); } catch (InstanceAlreadyExistsException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (MBeanRegistrationException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (NotCompliantMBeanException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (InstanceNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (ReflectionException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (MBeanException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (MalformedObjectNameException e) { // TODO Auto-generated catch block e.printStackTrace(); } JMXServiceURL address = null; try { // The address of the connector address = new JMXServiceURL("rmi", "localhost", 0, "/jndi/jrmp"); } catch (MalformedURLException e2) { // TODO Auto-generated catch block e2.printStackTrace(); } // Initial Context and Provider URL Map environment = new HashMap(); environment.put (Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.rmi.r egistry.RegistryContextFactory"); environment.put (Context.PROVIDER_URL, "rmi://localhost:1099"); JMXConnectorServer cntorServer; try { // Create and start the JMXConnectorServer cntorServer = JMXConnectorServerFactory.newJMXConnectorServer (address, environment, server); cntorServer.start(); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } } Thank you, Michael Behnck ---------------------------------------------------------------------- Comment By: David (david03) Date: 2004-04-14 17:24 Message: Logged In: YES user_id=1019428 Michael, You need to do some addition to code while creating JMXConnectorServer. Here are the changes.. Map environment = new HashMap(); environment.put ("java.naming.factory.initial", "com.sun.jndi.rmi.registry.Registr yContextFactory"); JMXConnectorServer cntorServer = JMXConnectorServerFactory.newJMXConnectorServer(url, environment, null); Here enviroment is passed instead of passing NULL ---------------------------------------------------------------------- Comment By: Michael Behnck (madt) Date: 2004-04-14 17:07 Message: Logged In: YES user_id=998993 Hi, trying to connect to a JMXConnectorServer and setting the type to "JSR160" produces the following exception: 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.connection.ReconnectAction.performAction (ReconnectAction.java:37) 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.GeneratedMethodAccessor38.invoke (Unknown Source) 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.findRMIServerJND I(RMIConnector.java:1785) at javax.management.remote.rmi.RMIConnector.findRMIServer (RMIConnector.java:1751) at javax.management.remote.rmi.RMIConnector.connect (RMIConnector.java:259) [catch] ... 16 more I tried to supply the appropriate path to the connection- properties after creating the connection with the wizard which does not provide a way to specify it. Anyways it did not change anything so that I still can't connect to the server. The implementation of the server looks like this: JMXServiceURL url = new JMXServiceURL ("rmi", "localhost", 0, "/jndi/jmx"); JMXConnectorServer cntorServer = JMXConnectorServerFactory.newJMXConnectorServer(url, null, null); ObjectName cntorServerName = ObjectName.getInstance (":service=" + JMXConnectorServer.class.getName() + ",protocol=" + url.getProtocol()); MBeanServer server = MBeanServerFactory.createMBeanServer ("remote.notification.example"); server.registerMBean(cntorServer, cntorServerName); NamingService naming = new NamingService(); ObjectName namingName = ObjectName.getInstance (":service=" + NamingService.class.getName()); server.registerMBean(naming, namingName); naming.start(); cntorServer.start(); Where would I have to put a jndi.properties file in order to be found by the MC4J? ---------------------------------------------------------------------- Comment By: Greg Hinkle (ghinkl) Date: 2004-04-14 08:03 Message: Logged In: YES user_id=773314 david03: When creating the connection, set the type of the connection to be "JSR160", not "MX4J". That should solve your problem. With MX4J 2.0.1, they've switched from their custom remoting to the standard JSR160 specification. This is confusing within the interface and I will find a way to make it clearer for the next release. ---------------------------------------------------------------------- Comment By: David (david03) Date: 2004-04-13 10:05 Message: Logged In: YES user_id=1019428 Hi All, I am also getting exception reported by Michael. Here is what I am using. * MX4J 2.0.1 implementation and running server on it. * Making a MX4J connection from MC4J tool and gets the reported exception. Can you guys please tell me what is wrong here. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2004-03-16 13:22 Message: Logged In: NO So what would I have to do in order to make a "JSR-160" connection with MC4J (what I'm supposed to do). Everything's working fine when using the MX4J 1.1 RMI connector (JRMP adaptor). Cheers, Michael ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2004-03-16 13:20 Message: Logged In: NO So what would I have to do in order to make a "JSR-160" connection with MC4J (what I'm supposed to do). Everything's working fine when using the MX4J 1.1 RMI connector (JRMP adaptor). Cheers, Michael ---------------------------------------------------------------------- Comment By: Greg Hinkle (ghinkl) Date: 2004-03-16 07:23 Message: Logged In: YES user_id=773314 It looks like your creating a JSR-160 style adaptor and then trying to connect the proprietary mx4j 1.1 rmi connector to it. You want to select "JSR-160" from the connection type in MC4J for this type of connection. (I suppose this is now misleading now that MX4J support JSR-160 style service adaptors. I'll have to fix that.hu) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=916667&group_id=60228 |
From: SourceForge.net <no...@so...> - 2004-04-15 20:41:02
|
Bugs item #916667, was opened at 2004-03-15 14:43 Message generated for change (Comment added) made by madt You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=916667&group_id=60228 Category: Connections Group: MC4J 1.2b5 Status: Closed Resolution: Invalid Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Greg Hinkle (ghinkl) Summary: ClassCastException Initial Comment: Created MBeanServer with ID: 1e4cbc4:fb4ef2d33c:- 8000:1096782-D:1 RMIConnectorServer started at: service:jmx:rmi://localhost/jndi/jrmp When trying to connect to server via MC4J (V1.2) the following error occurs: A java.lang.ClassCastException exception has occurred. java.lang.ClassCastException at mx4j.rmi.jrmp.JRMPConnector.narrow (JRMPConnector.java:) The connection properties are: Initial Context Factory: com.sun.jndi.rmi.registry.RegistryContextFactory JNDI Name: jmrp Server URL: rmi://localhost:1099 Connection Type: MX4J Source Code: import java.io.IOException; import java.net.MalformedURLException; import java.util.HashMap; import java.util.Map; import javax.management.InstanceAlreadyExistsException; import javax.management.InstanceNotFoundException; import javax.management.MBeanException; import javax.management.MBeanRegistrationException; import javax.management.MBeanServer; import javax.management.MBeanServerFactory; import javax.management.MalformedObjectNameException; import javax.management.NotCompliantMBeanException; import javax.management.ObjectName; import javax.management.ReflectionException; import javax.management.remote.JMXConnectorServer; import javax.management.remote.JMXConnectorServerFactory; import javax.management.remote.JMXServiceURL; import javax.naming.Context; /** * @author Michael Behnck */ public class JMXConn { public static void main(String[] args) { // Create a MBeanServer MBeanServer server = MBeanServerFactory.createMBeanServer(); try { // Create and start the naming service ObjectName naming = new ObjectName("Naming:type=rmiregistry"); server.createMBean ("mx4j.tools.naming.NamingService", naming, null); server.invoke (naming, "start", null, null); } catch (InstanceAlreadyExistsException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (MBeanRegistrationException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (NotCompliantMBeanException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (InstanceNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (ReflectionException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (MBeanException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (MalformedObjectNameException e) { // TODO Auto-generated catch block e.printStackTrace(); } JMXServiceURL address = null; try { // The address of the connector address = new JMXServiceURL("rmi", "localhost", 0, "/jndi/jrmp"); } catch (MalformedURLException e2) { // TODO Auto-generated catch block e2.printStackTrace(); } // Initial Context and Provider URL Map environment = new HashMap(); environment.put (Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.rmi.r egistry.RegistryContextFactory"); environment.put (Context.PROVIDER_URL, "rmi://localhost:1099"); JMXConnectorServer cntorServer; try { // Create and start the JMXConnectorServer cntorServer = JMXConnectorServerFactory.newJMXConnectorServer (address, environment, server); cntorServer.start(); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } } Thank you, Michael Behnck ---------------------------------------------------------------------- Comment By: Michael Behnck (madt) Date: 2004-04-14 11:37 Message: Logged In: YES user_id=998993 Hi, trying to connect to a JMXConnectorServer and setting the type to "JSR160" produces the following exception: 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.connection.ReconnectAction.performAction (ReconnectAction.java:37) 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.GeneratedMethodAccessor38.invoke (Unknown Source) 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.findRMIServerJND I(RMIConnector.java:1785) at javax.management.remote.rmi.RMIConnector.findRMIServer (RMIConnector.java:1751) at javax.management.remote.rmi.RMIConnector.connect (RMIConnector.java:259) [catch] ... 16 more I tried to supply the appropriate path to the connection- properties after creating the connection with the wizard which does not provide a way to specify it. Anyways it did not change anything so that I still can't connect to the server. The implementation of the server looks like this: JMXServiceURL url = new JMXServiceURL ("rmi", "localhost", 0, "/jndi/jmx"); JMXConnectorServer cntorServer = JMXConnectorServerFactory.newJMXConnectorServer(url, null, null); ObjectName cntorServerName = ObjectName.getInstance (":service=" + JMXConnectorServer.class.getName() + ",protocol=" + url.getProtocol()); MBeanServer server = MBeanServerFactory.createMBeanServer ("remote.notification.example"); server.registerMBean(cntorServer, cntorServerName); NamingService naming = new NamingService(); ObjectName namingName = ObjectName.getInstance (":service=" + NamingService.class.getName()); server.registerMBean(naming, namingName); naming.start(); cntorServer.start(); Where would I have to put a jndi.properties file in order to be found by the MC4J? ---------------------------------------------------------------------- Comment By: Greg Hinkle (ghinkl) Date: 2004-04-14 02:33 Message: Logged In: YES user_id=773314 david03: When creating the connection, set the type of the connection to be "JSR160", not "MX4J". That should solve your problem. With MX4J 2.0.1, they've switched from their custom remoting to the standard JSR160 specification. This is confusing within the interface and I will find a way to make it clearer for the next release. ---------------------------------------------------------------------- Comment By: David (david03) Date: 2004-04-13 04:35 Message: Logged In: YES user_id=1019428 Hi All, I am also getting exception reported by Michael. Here is what I am using. * MX4J 2.0.1 implementation and running server on it. * Making a MX4J connection from MC4J tool and gets the reported exception. Can you guys please tell me what is wrong here. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2004-03-16 07:52 Message: Logged In: NO So what would I have to do in order to make a "JSR-160" connection with MC4J (what I'm supposed to do). Everything's working fine when using the MX4J 1.1 RMI connector (JRMP adaptor). Cheers, Michael ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2004-03-16 07:50 Message: Logged In: NO So what would I have to do in order to make a "JSR-160" connection with MC4J (what I'm supposed to do). Everything's working fine when using the MX4J 1.1 RMI connector (JRMP adaptor). Cheers, Michael ---------------------------------------------------------------------- Comment By: Greg Hinkle (ghinkl) Date: 2004-03-16 01:53 Message: Logged In: YES user_id=773314 It looks like your creating a JSR-160 style adaptor and then trying to connect the proprietary mx4j 1.1 rmi connector to it. You want to select "JSR-160" from the connection type in MC4J for this type of connection. (I suppose this is now misleading now that MX4J support JSR-160 style service adaptors. I'll have to fix that.hu) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=916667&group_id=60228 |
From: SourceForge.net <no...@so...> - 2004-04-15 20:16:40
|
Bugs item #916667, was opened at 2004-03-15 14:43 Message generated for change (Comment added) made by madt You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=916667&group_id=60228 Category: Connections Group: MC4J 1.2b5 Status: Closed Resolution: Invalid Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Greg Hinkle (ghinkl) Summary: ClassCastException Initial Comment: Created MBeanServer with ID: 1e4cbc4:fb4ef2d33c:- 8000:1096782-D:1 RMIConnectorServer started at: service:jmx:rmi://localhost/jndi/jrmp When trying to connect to server via MC4J (V1.2) the following error occurs: A java.lang.ClassCastException exception has occurred. java.lang.ClassCastException at mx4j.rmi.jrmp.JRMPConnector.narrow (JRMPConnector.java:) The connection properties are: Initial Context Factory: com.sun.jndi.rmi.registry.RegistryContextFactory JNDI Name: jmrp Server URL: rmi://localhost:1099 Connection Type: MX4J Source Code: import java.io.IOException; import java.net.MalformedURLException; import java.util.HashMap; import java.util.Map; import javax.management.InstanceAlreadyExistsException; import javax.management.InstanceNotFoundException; import javax.management.MBeanException; import javax.management.MBeanRegistrationException; import javax.management.MBeanServer; import javax.management.MBeanServerFactory; import javax.management.MalformedObjectNameException; import javax.management.NotCompliantMBeanException; import javax.management.ObjectName; import javax.management.ReflectionException; import javax.management.remote.JMXConnectorServer; import javax.management.remote.JMXConnectorServerFactory; import javax.management.remote.JMXServiceURL; import javax.naming.Context; /** * @author Michael Behnck */ public class JMXConn { public static void main(String[] args) { // Create a MBeanServer MBeanServer server = MBeanServerFactory.createMBeanServer(); try { // Create and start the naming service ObjectName naming = new ObjectName("Naming:type=rmiregistry"); server.createMBean ("mx4j.tools.naming.NamingService", naming, null); server.invoke (naming, "start", null, null); } catch (InstanceAlreadyExistsException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (MBeanRegistrationException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (NotCompliantMBeanException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (InstanceNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (ReflectionException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (MBeanException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (MalformedObjectNameException e) { // TODO Auto-generated catch block e.printStackTrace(); } JMXServiceURL address = null; try { // The address of the connector address = new JMXServiceURL("rmi", "localhost", 0, "/jndi/jrmp"); } catch (MalformedURLException e2) { // TODO Auto-generated catch block e2.printStackTrace(); } // Initial Context and Provider URL Map environment = new HashMap(); environment.put (Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.rmi.r egistry.RegistryContextFactory"); environment.put (Context.PROVIDER_URL, "rmi://localhost:1099"); JMXConnectorServer cntorServer; try { // Create and start the JMXConnectorServer cntorServer = JMXConnectorServerFactory.newJMXConnectorServer (address, environment, server); cntorServer.start(); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } } Thank you, Michael Behnck ---------------------------------------------------------------------- Comment By: Michael Behnck (madt) Date: 2004-04-14 13:10 Message: Logged In: YES user_id=998993 The problem is not starting the JMXConnectorServer but connecting to it using MC4J! I have a jndi.properties file in the folder of my server specifying the same initial context as described in david03's post. There is no problem connecting to the server using a JMXConnector written in Java as I can provide the jndi-properties. But using MC4J just these settings can't be found. ---------------------------------------------------------------------- Comment By: David (david03) Date: 2004-04-14 11:54 Message: Logged In: YES user_id=1019428 Michael, You need to do some addition to code while creating JMXConnectorServer. Here are the changes.. Map environment = new HashMap(); environment.put ("java.naming.factory.initial", "com.sun.jndi.rmi.registry.Registr yContextFactory"); JMXConnectorServer cntorServer = JMXConnectorServerFactory.newJMXConnectorServer(url, environment, null); Here enviroment is passed instead of passing NULL ---------------------------------------------------------------------- Comment By: Michael Behnck (madt) Date: 2004-04-14 11:37 Message: Logged In: YES user_id=998993 Hi, trying to connect to a JMXConnectorServer and setting the type to "JSR160" produces the following exception: 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.connection.ReconnectAction.performAction (ReconnectAction.java:37) 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.GeneratedMethodAccessor38.invoke (Unknown Source) 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.findRMIServerJND I(RMIConnector.java:1785) at javax.management.remote.rmi.RMIConnector.findRMIServer (RMIConnector.java:1751) at javax.management.remote.rmi.RMIConnector.connect (RMIConnector.java:259) [catch] ... 16 more I tried to supply the appropriate path to the connection- properties after creating the connection with the wizard which does not provide a way to specify it. Anyways it did not change anything so that I still can't connect to the server. The implementation of the server looks like this: JMXServiceURL url = new JMXServiceURL ("rmi", "localhost", 0, "/jndi/jmx"); JMXConnectorServer cntorServer = JMXConnectorServerFactory.newJMXConnectorServer(url, null, null); ObjectName cntorServerName = ObjectName.getInstance (":service=" + JMXConnectorServer.class.getName() + ",protocol=" + url.getProtocol()); MBeanServer server = MBeanServerFactory.createMBeanServer ("remote.notification.example"); server.registerMBean(cntorServer, cntorServerName); NamingService naming = new NamingService(); ObjectName namingName = ObjectName.getInstance (":service=" + NamingService.class.getName()); server.registerMBean(naming, namingName); naming.start(); cntorServer.start(); Where would I have to put a jndi.properties file in order to be found by the MC4J? ---------------------------------------------------------------------- Comment By: Greg Hinkle (ghinkl) Date: 2004-04-14 02:33 Message: Logged In: YES user_id=773314 david03: When creating the connection, set the type of the connection to be "JSR160", not "MX4J". That should solve your problem. With MX4J 2.0.1, they've switched from their custom remoting to the standard JSR160 specification. This is confusing within the interface and I will find a way to make it clearer for the next release. ---------------------------------------------------------------------- Comment By: David (david03) Date: 2004-04-13 04:35 Message: Logged In: YES user_id=1019428 Hi All, I am also getting exception reported by Michael. Here is what I am using. * MX4J 2.0.1 implementation and running server on it. * Making a MX4J connection from MC4J tool and gets the reported exception. Can you guys please tell me what is wrong here. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2004-03-16 07:52 Message: Logged In: NO So what would I have to do in order to make a "JSR-160" connection with MC4J (what I'm supposed to do). Everything's working fine when using the MX4J 1.1 RMI connector (JRMP adaptor). Cheers, Michael ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2004-03-16 07:50 Message: Logged In: NO So what would I have to do in order to make a "JSR-160" connection with MC4J (what I'm supposed to do). Everything's working fine when using the MX4J 1.1 RMI connector (JRMP adaptor). Cheers, Michael ---------------------------------------------------------------------- Comment By: Greg Hinkle (ghinkl) Date: 2004-03-16 01:53 Message: Logged In: YES user_id=773314 It looks like your creating a JSR-160 style adaptor and then trying to connect the proprietary mx4j 1.1 rmi connector to it. You want to select "JSR-160" from the connection type in MC4J for this type of connection. (I suppose this is now misleading now that MX4J support JSR-160 style service adaptors. I'll have to fix that.hu) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=916667&group_id=60228 |
From: SourceForge.net <no...@so...> - 2004-04-14 08:02:52
|
Bugs item #934772, was opened at 2004-04-14 10:02 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=934772&group_id=60228 Category: Connections Group: MC4J 1.2b5 Status: Open Resolution: None Priority: 5 Submitted By: Tomasz Stanczak (tstanczak) Assigned to: Nobody/Anonymous (nobody) Summary: disconnected connection try to reconnect automatically Initial Comment: Even if the auto-connect and live-tree properties for my JBoss v3.2.2 connection were both off, MC4J tried to reconnect on its own: I disconnected the MC4J connection and stopped my JBoss server. In spite of being disconnected MC4J tried to connect over and over again, and showed an error dialog each time it couldn't connect. And it happened quite often, since before I could make my changes and start JBoss again MC4J did quite a lot of connection tries. I started my JBoss server, MC4J connection was still disconnected. I would expect it to remain so. But due to its auto-connect tries it managed to connect, even if the red cross on the connection stayed in place. Some of the MBeans seemed in a wrong state then, since I couldn't invoke any operation nor see any attributes. After manually disconnecting and connecting again it was allright. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=934772&group_id=60228 |
From: SourceForge.net <no...@so...> - 2004-04-14 02:35:49
|
Bugs item #934673, was opened at 2004-04-13 21:35 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=934673&group_id=60228 Category: Connections Group: MC4J 1.2b5 Status: Open Resolution: None Priority: 5 Submitted By: Greg Hinkle (ghinkl) Assigned to: Nobody/Anonymous (nobody) Summary: JSR160 vs. MX4J 2.x Connection confusion Initial Comment: The choice of connection types is confusing given that MX4J now has standardized on the JSR160 style connector type. The connections should be described or renamed to be more like {MX4J 1.x}, {JSR 160} /{MX4J 2.x}. Maybe just a message that pops up when you select each of the connection types. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=934673&group_id=60228 |
From: SourceForge.net <no...@so...> - 2004-04-14 02:33:34
|
Bugs item #916667, was opened at 2004-03-15 09:43 Message generated for change (Comment added) made by ghinkl You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=916667&group_id=60228 Category: Connections >Group: MC4J 1.2b5 >Status: Closed >Resolution: Invalid Priority: 5 Submitted By: Nobody/Anonymous (nobody) >Assigned to: Greg Hinkle (ghinkl) Summary: ClassCastException Initial Comment: Created MBeanServer with ID: 1e4cbc4:fb4ef2d33c:- 8000:1096782-D:1 RMIConnectorServer started at: service:jmx:rmi://localhost/jndi/jrmp When trying to connect to server via MC4J (V1.2) the following error occurs: A java.lang.ClassCastException exception has occurred. java.lang.ClassCastException at mx4j.rmi.jrmp.JRMPConnector.narrow (JRMPConnector.java:) The connection properties are: Initial Context Factory: com.sun.jndi.rmi.registry.RegistryContextFactory JNDI Name: jmrp Server URL: rmi://localhost:1099 Connection Type: MX4J Source Code: import java.io.IOException; import java.net.MalformedURLException; import java.util.HashMap; import java.util.Map; import javax.management.InstanceAlreadyExistsException; import javax.management.InstanceNotFoundException; import javax.management.MBeanException; import javax.management.MBeanRegistrationException; import javax.management.MBeanServer; import javax.management.MBeanServerFactory; import javax.management.MalformedObjectNameException; import javax.management.NotCompliantMBeanException; import javax.management.ObjectName; import javax.management.ReflectionException; import javax.management.remote.JMXConnectorServer; import javax.management.remote.JMXConnectorServerFactory; import javax.management.remote.JMXServiceURL; import javax.naming.Context; /** * @author Michael Behnck */ public class JMXConn { public static void main(String[] args) { // Create a MBeanServer MBeanServer server = MBeanServerFactory.createMBeanServer(); try { // Create and start the naming service ObjectName naming = new ObjectName("Naming:type=rmiregistry"); server.createMBean ("mx4j.tools.naming.NamingService", naming, null); server.invoke (naming, "start", null, null); } catch (InstanceAlreadyExistsException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (MBeanRegistrationException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (NotCompliantMBeanException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (InstanceNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (ReflectionException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (MBeanException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (MalformedObjectNameException e) { // TODO Auto-generated catch block e.printStackTrace(); } JMXServiceURL address = null; try { // The address of the connector address = new JMXServiceURL("rmi", "localhost", 0, "/jndi/jrmp"); } catch (MalformedURLException e2) { // TODO Auto-generated catch block e2.printStackTrace(); } // Initial Context and Provider URL Map environment = new HashMap(); environment.put (Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.rmi.r egistry.RegistryContextFactory"); environment.put (Context.PROVIDER_URL, "rmi://localhost:1099"); JMXConnectorServer cntorServer; try { // Create and start the JMXConnectorServer cntorServer = JMXConnectorServerFactory.newJMXConnectorServer (address, environment, server); cntorServer.start(); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } } Thank you, Michael Behnck ---------------------------------------------------------------------- >Comment By: Greg Hinkle (ghinkl) Date: 2004-04-13 21:33 Message: Logged In: YES user_id=773314 david03: When creating the connection, set the type of the connection to be "JSR160", not "MX4J". That should solve your problem. With MX4J 2.0.1, they've switched from their custom remoting to the standard JSR160 specification. This is confusing within the interface and I will find a way to make it clearer for the next release. ---------------------------------------------------------------------- Comment By: David (david03) Date: 2004-04-12 23:35 Message: Logged In: YES user_id=1019428 Hi All, I am also getting exception reported by Michael. Here is what I am using. * MX4J 2.0.1 implementation and running server on it. * Making a MX4J connection from MC4J tool and gets the reported exception. Can you guys please tell me what is wrong here. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2004-03-16 02:52 Message: Logged In: NO So what would I have to do in order to make a "JSR-160" connection with MC4J (what I'm supposed to do). Everything's working fine when using the MX4J 1.1 RMI connector (JRMP adaptor). Cheers, Michael ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2004-03-16 02:50 Message: Logged In: NO So what would I have to do in order to make a "JSR-160" connection with MC4J (what I'm supposed to do). Everything's working fine when using the MX4J 1.1 RMI connector (JRMP adaptor). Cheers, Michael ---------------------------------------------------------------------- Comment By: Greg Hinkle (ghinkl) Date: 2004-03-15 20:53 Message: Logged In: YES user_id=773314 It looks like your creating a JSR-160 style adaptor and then trying to connect the proprietary mx4j 1.1 rmi connector to it. You want to select "JSR-160" from the connection type in MC4J for this type of connection. (I suppose this is now misleading now that MX4J support JSR-160 style service adaptors. I'll have to fix that.hu) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=916667&group_id=60228 |
From: SourceForge.net <no...@so...> - 2004-04-14 02:30:05
|
Bugs item #907686, was opened at 2004-03-01 12:12 Message generated for change (Comment added) made by ghinkl You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=907686&group_id=60228 Category: Connections Group: MC4J 1.2b4 >Status: Closed >Resolution: Duplicate Priority: 5 Submitted By: Nobody/Anonymous (nobody) >Assigned to: Greg Hinkle (ghinkl) Summary: New Connection doesn't allow input of InitialContext, Creden Initial Comment: When you create a new JSR160 Connection, you can't enter the InitialContextFactory, nor the credentials. I corrected these points. Philippe Mouawad. ---------------------------------------------------------------------- >Comment By: Greg Hinkle (ghinkl) Date: 2004-04-13 21:30 Message: Logged In: YES user_id=773314 Duplicate of 908165 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=907686&group_id=60228 |
From: SourceForge.net <no...@so...> - 2004-04-14 02:29:22
|
Bugs item #908162, was opened at 2004-03-02 03:29 Message generated for change (Comment added) made by ghinkl You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=908162&group_id=60228 Category: Connections Group: MC4J 1.2b4 >Status: Closed >Resolution: Duplicate Priority: 5 Submitted By: Philippe Mouawad (pmouawad) >Assigned to: Greg Hinkle (ghinkl) Summary: Connection to JSR160 fails Initial Comment: Sorry I forgot to join the file. Philippe Mouawad. ---------------------------------------------------------------------- >Comment By: Greg Hinkle (ghinkl) Date: 2004-04-13 21:29 Message: Logged In: YES user_id=773314 Duplicate of 908165 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=908162&group_id=60228 |
From: SourceForge.net <no...@so...> - 2004-04-14 02:28:51
|
Bugs item #907681, was opened at 2004-03-01 12:05 Message generated for change (Comment added) made by ghinkl You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=907681&group_id=60228 Category: Connections Group: MC4J 1.2b4 >Status: Closed >Resolution: Duplicate Priority: 5 Submitted By: Nobody/Anonymous (nobody) >Assigned to: Greg Hinkle (ghinkl) Summary: Connection to JSR160 fails Initial Comment: The connection doesn't take into account the properties InitialContextFactory, Nor credentials. Authentication fails. I corrected these 2 points. ---------------------------------------------------------------------- >Comment By: Greg Hinkle (ghinkl) Date: 2004-04-13 21:28 Message: Logged In: YES user_id=773314 Duplicate of 908165 ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2004-03-01 12:10 Message: Logged In: NO I forgot my name: Philippe Mouawad. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=907681&group_id=60228 |
From: SourceForge.net <no...@so...> - 2004-04-14 02:26:55
|
Bugs item #908165, was opened at 2004-03-02 03:32 Message generated for change (Comment added) made by ghinkl You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=908165&group_id=60228 Category: Connections Group: MC4J 1.2b4 >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Philippe Mouawad (pmouawad) >Assigned to: Greg Hinkle (ghinkl) Summary: JSR160 Wizard is bugged Initial Comment: The wizard discards the InitialContext, the user, password. ---------------------------------------------------------------------- >Comment By: Greg Hinkle (ghinkl) Date: 2004-04-13 21:26 Message: Logged In: YES user_id=773314 The 1.2b5 release fixed this problem. The context is used and set properly and has been tested with password protected remoting servers. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=908165&group_id=60228 |
From: SourceForge.net <no...@so...> - 2004-04-13 11:46:45
|
Bugs item #842076, was opened at 2003-11-14 12:55 Message generated for change (Comment added) made by johnw21 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=842076&group_id=60228 Category: Connections Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Connection to Tomcat fails Initial Comment: I have followed the instructions for Tomcat and when trying to connect I get the following: This is the startup output: E:\Apache Group\Tomcat 4.1\bin>catalina.bat run Using CATALINA_BASE: .. Using CATALINA_HOME: .. Using CATALINA_TMPDIR: ..\temp Using JAVA_HOME: D:\j2sdk1.4.1_01 14-Nov-2003 12:52:39 org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on port 8080 Starting service Tomcat-Standalone Apache Tomcat/4.1.29 14-Nov-2003 12:52:44 org.apache.struts.util.PropertyMessageResources <init> INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=tru e 14-Nov-2003 12:52:44 org.apache.struts.util.PropertyMessageResources <init> INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNul l=true 14-Nov-2003 12:52:46 org.apache.struts.util.PropertyMessageResources <init> INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources', retur nNull=true 14-Nov-2003 12:52:51 org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on port 8080 14-Nov-2003 12:52:51 org.apache.jk.common.ChannelSocket init INFO: JK2: ajp13 listening on /0.0.0.0:8009 14-Nov-2003 12:52:51 org.apache.jk.common.JkMX loadAdapter WARNING: No adaptors were loaded but mx.enabled was defined. 14-Nov-2003 12:52:51 org.apache.jk.common.JkMX init INFO: Can't enable log4j mx: java.lang.ClassNotFoundException: org.apache.log4j. jmx.HierarchyDynamicMBean 14-Nov-2003 12:52:51 org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=40/100 config=E:\Apache Group\Tomcat 4.1\bin\..\conf \jk2.properties This is the MC4J: javax.naming.ServiceUnavailableException. Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is: java.net.ConnectException: Connection refused: connect at sun.rmi.transport.tcp.TCPEndpoint.newSocket (TCPEndpoint.java:567) at sun.rmi.transport.tcp.TCPChannel.createConnection (TCPChannel.java:185) at sun.rmi.transport.tcp.TCPChannel.newConnection (TCPChannel.java:171) at sun.rmi.server.UnicastRef.newCall (UnicastRef.java:313) at sun.rmi.registry.RegistryImpl_Stub.lookup (Unknown Source) at com.sun.jndi.rmi.registry.RegistryContext.lookup (RegistryContext.java:88) at com.sun.jndi.rmi.registry.RegistryContext.lookup (RegistryContext.java:98) at javax.naming.InitialContext.lookup (InitialContext.java:347) at mx4j.connector.rmi.RMIConnector.connect (RMIConnector.java:110) at org.mc4j.console.connection.Mx4jConnectionNode.connec t(Mx4jConnectionNode.java:73) at org.mc4j.console.ConnectAction.performAction (ConnectAction.java:81) at org.openide.util.actions.NodeAction$3.run (NodeAction.java:440) at org.openide.util.actions.CallableSystemAction$2.run (CallableSystemAction.java:121) 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:677) Caused by: java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect (Native Method) at java.net.PlainSocketImpl.doConnect (PlainSocketImpl.java:305) at java.net.PlainSocketImpl.connectToAddress (PlainSocketImpl.java:171) at java.net.PlainSocketImpl.connect (PlainSocketImpl.java:158) at java.net.Socket.connect(Socket.java:426) at java.net.Socket.connect(Socket.java:376) at java.net.Socket.<init>(Socket.java:291) at java.net.Socket.<init>(Socket.java:119) at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSo cket(RMIDirectSocketFactory.java:22) at sun.rmi.transport.proxy.RMIMasterSocketFactory.createS ocket(RMIMasterSocketFactory.java:128) at sun.rmi.transport.tcp.TCPEndpoint.newSocket (TCPEndpoint.java:562) [catch] ... 15 more ==> java.rmi.ConnectException: Connection refused to host: localhost; nested exception is: java.net.ConnectException: Connection refused: connect at sun.rmi.transport.tcp.TCPEndpoint.newSocket (TCPEndpoint.java:567) at sun.rmi.transport.tcp.TCPChannel.createConnection (TCPChannel.java:185) at sun.rmi.transport.tcp.TCPChannel.newConnection (TCPChannel.java:171) at sun.rmi.server.UnicastRef.newCall (UnicastRef.java:313) at sun.rmi.registry.RegistryImpl_Stub.lookup (Unknown Source) at com.sun.jndi.rmi.registry.RegistryContext.lookup (RegistryContext.java:88) at com.sun.jndi.rmi.registry.RegistryContext.lookup (RegistryContext.java:98) at javax.naming.InitialContext.lookup (InitialContext.java:347) at mx4j.connector.rmi.RMIConnector.connect (RMIConnector.java:110) at org.mc4j.console.connection.Mx4jConnectionNode.connec t(Mx4jConnectionNode.java:73) at org.mc4j.console.ConnectAction.performAction (ConnectAction.java:81) at org.openide.util.actions.NodeAction$3.run (NodeAction.java:440) at org.openide.util.actions.CallableSystemAction$2.run (CallableSystemAction.java:121) 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:677) Caused by: java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect (Native Method) at java.net.PlainSocketImpl.doConnect (PlainSocketImpl.java:305) at java.net.PlainSocketImpl.connectToAddress (PlainSocketImpl.java:171) at java.net.PlainSocketImpl.connect (PlainSocketImpl.java:158) at java.net.Socket.connect(Socket.java:426) at java.net.Socket.connect(Socket.java:376) at java.net.Socket.<init>(Socket.java:291) at java.net.Socket.<init>(Socket.java:119) at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSo cket(RMIDirectSocketFactory.java:22) at sun.rmi.transport.proxy.RMIMasterSocketFactory.createS ocket(RMIMasterSocketFactory.java:128) at sun.rmi.transport.tcp.TCPEndpoint.newSocket (TCPEndpoint.java:562) [catch] ... 15 more ---------------------------------------------------------------------- Comment By: John (johnw21) Date: 2004-04-13 11:46 Message: Logged In: YES user_id=1020140 I get the same thing using tomcat 5.0.19. The solution was to add log4j-1.2.8.jar to CATALINA_HOME/common/lib catalina run complains about log4j not being configured correctly, but it works alright, as does connecting using MC4J and the MC4J connection type. ---------------------------------------------------------------------- Comment By: Greg Hinkle (ghinkl) Date: 2004-02-07 16:43 Message: Logged In: YES user_id=773314 A little slow with the response, but I think I've figured this out. It seems that you must place the mx4j 1.1.1 jars into the common/lib directory, not the server/lib directory. The problem above is that the tomcat server never starts the connector listener for mc4j to talk to. It is because it can't find the mx4j classes in the right classloader. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=842076&group_id=60228 |
From: SourceForge.net <no...@so...> - 2004-04-13 04:35:37
|
Bugs item #916667, was opened at 2004-03-15 20:13 Message generated for change (Comment added) made by david03 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=916667&group_id=60228 Category: Connections Group: MC4J 1.2b1 Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: ClassCastException Initial Comment: Created MBeanServer with ID: 1e4cbc4:fb4ef2d33c:- 8000:1096782-D:1 RMIConnectorServer started at: service:jmx:rmi://localhost/jndi/jrmp When trying to connect to server via MC4J (V1.2) the following error occurs: A java.lang.ClassCastException exception has occurred. java.lang.ClassCastException at mx4j.rmi.jrmp.JRMPConnector.narrow (JRMPConnector.java:) The connection properties are: Initial Context Factory: com.sun.jndi.rmi.registry.RegistryContextFactory JNDI Name: jmrp Server URL: rmi://localhost:1099 Connection Type: MX4J Source Code: import java.io.IOException; import java.net.MalformedURLException; import java.util.HashMap; import java.util.Map; import javax.management.InstanceAlreadyExistsException; import javax.management.InstanceNotFoundException; import javax.management.MBeanException; import javax.management.MBeanRegistrationException; import javax.management.MBeanServer; import javax.management.MBeanServerFactory; import javax.management.MalformedObjectNameException; import javax.management.NotCompliantMBeanException; import javax.management.ObjectName; import javax.management.ReflectionException; import javax.management.remote.JMXConnectorServer; import javax.management.remote.JMXConnectorServerFactory; import javax.management.remote.JMXServiceURL; import javax.naming.Context; /** * @author Michael Behnck */ public class JMXConn { public static void main(String[] args) { // Create a MBeanServer MBeanServer server = MBeanServerFactory.createMBeanServer(); try { // Create and start the naming service ObjectName naming = new ObjectName("Naming:type=rmiregistry"); server.createMBean ("mx4j.tools.naming.NamingService", naming, null); server.invoke (naming, "start", null, null); } catch (InstanceAlreadyExistsException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (MBeanRegistrationException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (NotCompliantMBeanException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (InstanceNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (ReflectionException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (MBeanException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (MalformedObjectNameException e) { // TODO Auto-generated catch block e.printStackTrace(); } JMXServiceURL address = null; try { // The address of the connector address = new JMXServiceURL("rmi", "localhost", 0, "/jndi/jrmp"); } catch (MalformedURLException e2) { // TODO Auto-generated catch block e2.printStackTrace(); } // Initial Context and Provider URL Map environment = new HashMap(); environment.put (Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.rmi.r egistry.RegistryContextFactory"); environment.put (Context.PROVIDER_URL, "rmi://localhost:1099"); JMXConnectorServer cntorServer; try { // Create and start the JMXConnectorServer cntorServer = JMXConnectorServerFactory.newJMXConnectorServer (address, environment, server); cntorServer.start(); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } } Thank you, Michael Behnck ---------------------------------------------------------------------- Comment By: David (david03) Date: 2004-04-13 10:05 Message: Logged In: YES user_id=1019428 Hi All, I am also getting exception reported by Michael. Here is what I am using. * MX4J 2.0.1 implementation and running server on it. * Making a MX4J connection from MC4J tool and gets the reported exception. Can you guys please tell me what is wrong here. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2004-03-16 13:22 Message: Logged In: NO So what would I have to do in order to make a "JSR-160" connection with MC4J (what I'm supposed to do). Everything's working fine when using the MX4J 1.1 RMI connector (JRMP adaptor). Cheers, Michael ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2004-03-16 13:20 Message: Logged In: NO So what would I have to do in order to make a "JSR-160" connection with MC4J (what I'm supposed to do). Everything's working fine when using the MX4J 1.1 RMI connector (JRMP adaptor). Cheers, Michael ---------------------------------------------------------------------- Comment By: Greg Hinkle (ghinkl) Date: 2004-03-16 07:23 Message: Logged In: YES user_id=773314 It looks like your creating a JSR-160 style adaptor and then trying to connect the proprietary mx4j 1.1 rmi connector to it. You want to select "JSR-160" from the connection type in MC4J for this type of connection. (I suppose this is now misleading now that MX4J support JSR-160 style service adaptors. I'll have to fix that.hu) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=916667&group_id=60228 |
From: SourceForge.net <no...@so...> - 2004-04-11 05:39:21
|
Bugs item #933080, was opened at 2004-04-11 01:39 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=933080&group_id=60228 Category: Connections Group: MC4J 1.2b5 Status: Open Resolution: None Priority: 5 Submitted By: Ben Eng (jetpen) Assigned to: Nobody/Anonymous (nobody) Summary: ConcurrentModificationException Initial Comment: When connecting to WebLogic Server 8.1, I get the following exception. java.util.ConcurrentModificationException at java.util.AbstractList$Itr.checkForComodification (AbstractList.java:448) at java.util.AbstractList$Itr.next (AbstractList.java:419) at org.openide.nodes.Children$Array.refreshImpl (Children.java:1237) at org.openide.nodes.Children$2.run (Children.java:1250) at org.openide.util.Mutex.postRequest (Mutex.java:867) at org.openide.util.Mutex.postWriteRequest (Mutex.java:364) at org.openide.nodes.Children$Array.refresh (Children.java:1248) at org.openide.nodes.Children$Array.add (Children.java:1290) at org.mc4j.console.connection.ConnectionNode.addMBean (ConnectionNode.java:256) at org.mc4j.console.connection.ConnectionNode.loadConnec tionNodeChildren(ConnectionNode.java:208) at org.mc4j.console.connection.ConnectionNode.refresh (ConnectionNode.java:387) at org.mc4j.console.connection.DomainNodes.exposeDomain s(DomainNodes.java:56) at org.mc4j.console.connection.DomainNodes$1.run (DomainNodes.java:47) [catch] at java.lang.Thread.run(Thread.java:534) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=933080&group_id=60228 |
From: SourceForge.net <no...@so...> - 2004-04-01 09:31:01
|
Bugs item #927372, was opened at 2004-04-01 01:31 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=927372&group_id=60228 Category: Connections Group: MC4J 1.2b4 Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Annotation: Exception occurred in Request Processor Initial Comment: Hi, Iam getting the following exception while connecting MC4J 1.2b4 with my local Weblogic 8.1 Server. I have copied weblogic.jar under ..\MC4J\lib\ext folder. Annotation: Exception occurred in Request Processor java.lang.NoClassDefFoundError: weblogic/rmi/extensions/server/Stub at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass (ClassLoader.java:502) at java.security.SecureClassLoader.defineClass (SecureClassLoader.java:123) at weblogic.utils.classloaders.GenericClassLoader.findLocalCl ass(GenericClassLoader.java:431) at weblogic.utils.classloaders.GenericClassLoader.findClass (GenericClassLoader.java:169) at java.lang.ClassLoader.loadClass (ClassLoader.java:299) at java.lang.ClassLoader.loadClass (ClassLoader.java:255) at java.lang.ClassLoader.loadClassInternal (ClassLoader.java:315) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:217) at weblogic.utils.classfile.utils.CodeGenerator.generateClass (CodeGenerator.java:71) at weblogic.rmi.internal.StubGenerator.getStubClass (StubGenerator.java:672) at weblogic.rmi.internal.StubGenerator.generateStub (StubGenerator.java:712) at weblogic.rmi.internal.StubGenerator.generateStub (StubGenerator.java:699) at weblogic.rmi.extensions.StubFactory.getStub (StubFactory.java:76) at weblogic.jndi.WLInitialContextFactoryDelegate.newRootN amingNodeStub (WLInitialContextFactoryDelegate.java:486) at weblogic.jndi.WLInitialContextFactoryDelegate.newRemot eContext(WLInitialContextFactoryDelegate.java:449) at weblogic.jndi.WLInitialContextFactoryDelegate.newContex t(WLInitialContextFactoryDelegate.java:345) at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialC ontext(WLInitialContextFactoryDelegate.java:308) at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialC ontext(WLInitialContextFactoryDelegate.java:234) at weblogic.jndi.WLInitialContextFactory.getInitialContext (WLInitialContextFactory.java:135) at javax.naming.spi.NamingManager.getInitialContext (NamingManager.java:662) at javax.naming.InitialContext.getDefaultInitCtx (InitialContext.java:243) at javax.naming.InitialContext.init (InitialContext.java:219) at javax.naming.InitialContext.<init> (InitialContext.java:195) at org.mc4j.console.connection.WeblogicConnectionNode.co nnect(WeblogicConnectionNode.java:69) at org.mc4j.console.connection.ReconnectAction.performAct ion(ReconnectAction.java:37) at org.openide.util.actions.NodeAction$3.run (NodeAction.java:440) at org.openide.util.actions.CallableSystemAction$2.run (CallableSystemAction.java:121) at org.openide.util.Task.run(Task.java:136) at org.openide.util.RequestProcessor$Task.run (RequestProcessor.java:330) [catch] at org.openide.util.RequestProcessor$Processor.run (RequestProcessor.java:680) Does anybody has any idea about this? Thanks in Advance, S.Venky. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=927372&group_id=60228 |
From: SourceForge.net <no...@so...> - 2004-03-24 17:02:36
|
Bugs item #922569, was opened at 2004-03-24 08:58 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=922569&group_id=60228 Category: Visual Group: MC4J 1.2b4 Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: java.lang.ClassCastException Initial Comment: When connected to a MX4J JMX Server and I tried to visualize the attribute of the MBean I fot the following exception : java.lang.ClassCastException at org.openide.explorer.propertysheet.CheckboxInplaceEdito r.reset(CheckboxInplaceEditor.java:117) at org.openide.explorer.propertysheet.CheckboxInplaceEdito r.connect(CheckboxInplaceEditor.java:84) at org.openide.explorer.propertysheet.RendererFactory.prep areCheckbox(RendererFactory.java:277) at org.openide.explorer.propertysheet.RendererFactory.getR enderer(RendererFactory.java:136) at org.openide.explorer.propertysheet.SheetCellRenderer.get TableCellRendererComponent(SheetCellRenderer.java:99) at org.openide.explorer.propertysheet.BaseTable.prepareRen derer(BaseTable.java:529) at org.openide.explorer.propertysheet.SheetTable.prepareRe nderer(SheetTable.java:385) at javax.swing.plaf.basic.BasicTableUI.paintCell (BasicTableUI.java:1149) at javax.swing.plaf.basic.BasicTableUI.paintCells (BasicTableUI.java:1051) at javax.swing.plaf.basic.BasicTableUI.paint (BasicTableUI.java:974) at javax.swing.plaf.ComponentUI.update (ComponentUI.java:142) at javax.swing.JComponent.paintComponent (JComponent.java:541) at org.openide.explorer.propertysheet.SheetTable.paintCom ponent(SheetTable.java:293) at javax.swing.JComponent.paint (JComponent.java:808) at org.openide.explorer.propertysheet.BaseTable.paint (BaseTable.java:590) at javax.swing.JComponent.paintChildren (JComponent.java:647) at javax.swing.JComponent.paint (JComponent.java:817) at javax.swing.JViewport.paint (JViewport.java:722) at org.openide.explorer.propertysheet.PropertySheet$Margin Viewport.paint(PropertySheet.java:1006) at javax.swing.JComponent.paintChildren (JComponent.java:647) at javax.swing.JComponent.paint (JComponent.java:817) at javax.swing.JComponent.paintChildren (JComponent.java:647) at javax.swing.JSplitPane.paintChildren (JSplitPane.java:1021) at javax.swing.JComponent.paint (JComponent.java:817) at javax.swing.JComponent.paintChildren (JComponent.java:647) at javax.swing.JComponent.paint (JComponent.java:817) at javax.swing.JComponent.paintChildren (JComponent.java:647) at javax.swing.JComponent.paint (JComponent.java:817) at javax.swing.JComponent.paintChildren (JComponent.java:647) at javax.swing.JComponent.paint (JComponent.java:817) at javax.swing.JComponent.paintChildren (JComponent.java:647) at javax.swing.JComponent.paint (JComponent.java:817) at javax.swing.JComponent.paintChildren (JComponent.java:647) at javax.swing.JComponent.paint (JComponent.java:817) at javax.swing.JComponent.paintChildren (JComponent.java:647) at javax.swing.JSplitPane.paintChildren (JSplitPane.java:1021) at javax.swing.JComponent.paint (JComponent.java:817) at javax.swing.JComponent.paintChildren (JComponent.java:647) at javax.swing.JSplitPane.paintChildren (JSplitPane.java:1021) at javax.swing.JComponent.paint (JComponent.java:817) at javax.swing.JComponent.paintChildren (JComponent.java:647) at javax.swing.JComponent.paint (JComponent.java:817) at javax.swing.JComponent.paintChildren (JComponent.java:647) at javax.swing.JComponent.paint (JComponent.java:817) at javax.swing.JComponent.paintChildren (JComponent.java:647) at javax.swing.JComponent.paint (JComponent.java:817) at javax.swing.JLayeredPane.paint (JLayeredPane.java:557) at javax.swing.JComponent.paintChildren (JComponent.java:647) at javax.swing.JComponent.paintWithOffscreenBuffer (JComponent.java:4802) at javax.swing.JComponent.paintDoubleBuffered (JComponent.java:4748) at javax.swing.JComponent.paint (JComponent.java:798) at java.awt.GraphicsCallback$PaintCallback.run (GraphicsCallback.java:21) at sun.awt.SunGraphicsCallback.runOneComponent (SunGraphicsCallback.java:60) at sun.awt.SunGraphicsCallback.runComponents (SunGraphicsCallback.java:97) at java.awt.Container.paint (Container.java:1312) at sun.awt.RepaintArea.paint (RepaintArea.java:177) at sun.awt.windows.WComponentPeer.handleEvent (WComponentPeer.java:260) at java.awt.Component.dispatchEventImpl (Component.java:3678) at java.awt.Container.dispatchEventImpl (Container.java:1627) at java.awt.Window.dispatchEventImpl (Window.java:1606) at java.awt.Component.dispatchEvent (Component.java:3477) [catch] at java.awt.EventQueue.dispatchEvent (EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarch y(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForHierarchy (EventDispatchThread.java:151) at java.awt.EventDispatchThread.pumpEvents (EventDispatchThread.java:145) at java.awt.EventDispatchThread.pumpEvents (EventDispatchThread.java:137) at java.awt.EventDispatchThread.run (EventDispatchThread.java:100) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=922569&group_id=60228 |
From: SourceForge.net <no...@so...> - 2004-03-16 14:00:21
|
Bugs item #915072, was opened at 2004-03-12 16:47 Message generated for change (Comment added) made by holbitlan You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=915072&group_id=60228 Category: Visual Group: MC4J 1.2b4 Status: Open Resolution: None Priority: 7 Submitted By: Christian Schweer (holbitlan) Assigned to: Greg Hinkle (ghinkl) Summary: properties window freezes sometimes Initial Comment: I regularly have the problem, that the properties window is locked on the property of an attribute that I have changed. I.e. it doesn't change to the properties of another node, if that other node is selected in the explorer view. Only exiting and restarting mc4j works. Unfortunately I can't reproduce the symptom with a concrete step sequence - it just happens reguarly. The only thing I observed was, that I had a graph running on the attribute I was changing. Has anyone experienced the same or even reproduce the bug? BTW: I'm using mx4j2.0beta1 and the JSR160-Connector... ---------------------------------------------------------------------- >Comment By: Christian Schweer (holbitlan) Date: 2004-03-16 15:00 Message: Logged In: YES user_id=902230 BTW: I'm using "NetBeans IDE Dev (Build 200403040727)" running WinXP SP1 ---------------------------------------------------------------------- Comment By: Greg Hinkle (ghinkl) Date: 2004-03-13 06:47 Message: Logged In: YES user_id=773314 I've seen this as well. It was a known NetBeans Platform bug that they thought was corrected. I'm following up with the NB list to try and fix this. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=915072&group_id=60228 |
From: SourceForge.net <no...@so...> - 2004-03-16 07:52:32
|
Bugs item #916667, was opened at 2004-03-15 06:43 Message generated for change (Comment added) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=916667&group_id=60228 Category: Connections Group: MC4J 1.2b1 Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: ClassCastException Initial Comment: Created MBeanServer with ID: 1e4cbc4:fb4ef2d33c:- 8000:1096782-D:1 RMIConnectorServer started at: service:jmx:rmi://localhost/jndi/jrmp When trying to connect to server via MC4J (V1.2) the following error occurs: A java.lang.ClassCastException exception has occurred. java.lang.ClassCastException at mx4j.rmi.jrmp.JRMPConnector.narrow (JRMPConnector.java:) The connection properties are: Initial Context Factory: com.sun.jndi.rmi.registry.RegistryContextFactory JNDI Name: jmrp Server URL: rmi://localhost:1099 Connection Type: MX4J Source Code: import java.io.IOException; import java.net.MalformedURLException; import java.util.HashMap; import java.util.Map; import javax.management.InstanceAlreadyExistsException; import javax.management.InstanceNotFoundException; import javax.management.MBeanException; import javax.management.MBeanRegistrationException; import javax.management.MBeanServer; import javax.management.MBeanServerFactory; import javax.management.MalformedObjectNameException; import javax.management.NotCompliantMBeanException; import javax.management.ObjectName; import javax.management.ReflectionException; import javax.management.remote.JMXConnectorServer; import javax.management.remote.JMXConnectorServerFactory; import javax.management.remote.JMXServiceURL; import javax.naming.Context; /** * @author Michael Behnck */ public class JMXConn { public static void main(String[] args) { // Create a MBeanServer MBeanServer server = MBeanServerFactory.createMBeanServer(); try { // Create and start the naming service ObjectName naming = new ObjectName("Naming:type=rmiregistry"); server.createMBean ("mx4j.tools.naming.NamingService", naming, null); server.invoke (naming, "start", null, null); } catch (InstanceAlreadyExistsException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (MBeanRegistrationException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (NotCompliantMBeanException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (InstanceNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (ReflectionException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (MBeanException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (MalformedObjectNameException e) { // TODO Auto-generated catch block e.printStackTrace(); } JMXServiceURL address = null; try { // The address of the connector address = new JMXServiceURL("rmi", "localhost", 0, "/jndi/jrmp"); } catch (MalformedURLException e2) { // TODO Auto-generated catch block e2.printStackTrace(); } // Initial Context and Provider URL Map environment = new HashMap(); environment.put (Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.rmi.r egistry.RegistryContextFactory"); environment.put (Context.PROVIDER_URL, "rmi://localhost:1099"); JMXConnectorServer cntorServer; try { // Create and start the JMXConnectorServer cntorServer = JMXConnectorServerFactory.newJMXConnectorServer (address, environment, server); cntorServer.start(); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } } Thank you, Michael Behnck ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2004-03-15 23:52 Message: Logged In: NO So what would I have to do in order to make a "JSR-160" connection with MC4J (what I'm supposed to do). Everything's working fine when using the MX4J 1.1 RMI connector (JRMP adaptor). Cheers, Michael ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2004-03-15 23:50 Message: Logged In: NO So what would I have to do in order to make a "JSR-160" connection with MC4J (what I'm supposed to do). Everything's working fine when using the MX4J 1.1 RMI connector (JRMP adaptor). Cheers, Michael ---------------------------------------------------------------------- Comment By: Greg Hinkle (ghinkl) Date: 2004-03-15 17:53 Message: Logged In: YES user_id=773314 It looks like your creating a JSR-160 style adaptor and then trying to connect the proprietary mx4j 1.1 rmi connector to it. You want to select "JSR-160" from the connection type in MC4J for this type of connection. (I suppose this is now misleading now that MX4J support JSR-160 style service adaptors. I'll have to fix that.hu) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=916667&group_id=60228 |