From dev-return-83217-apmail-geronimo-dev-archive=geronimo.apache.org@geronimo.apache.org Mon May 31 09:19:02 2010 Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 4353 invoked from network); 31 May 2010 09:19:02 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 31 May 2010 09:19:02 -0000 Received: (qmail 37094 invoked by uid 500); 31 May 2010 09:19:02 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 37033 invoked by uid 500); 31 May 2010 09:19:01 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 37026 invoked by uid 99); 31 May 2010 09:19:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 May 2010 09:19:01 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 May 2010 09:18:58 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o4V9Ia73002145 for ; Mon, 31 May 2010 09:18:36 GMT Message-ID: <11108201.81611275297516345.JavaMail.jira@thor> Date: Mon, 31 May 2010 05:18:36 -0400 (EDT) From: "Amit Puri (JIRA)" To: dev@geronimo.apache.org Subject: [jira] Created: (GERONIMO-5355) ClassCastException while starting snapshot (Stat Query) in G 215 Monitoring portlet through java client MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org ClassCastException while starting snapshot (Stat Query) in G 215 Monitoring portlet through java client ------------------------------------------------------------------------------------------------------- Key: GERONIMO-5355 URL: https://issues.apache.org/jira/browse/GERONIMO-5355 Project: Geronimo Issue Type: Bug Security Level: public (Regular issues) Components: monitoring Affects Versions: 2.1.5 Reporter: Amit Puri In a java client where MBeanServerConnection is created and invoke startSnapshot method in Monitoring Portlet of G 215, Stat Query snapshot started but we can also find ClassCastException. ... ERROR [MasterRemoteControlJMX] org.tranql.connector.jdbc.TranqlDataSource$SelfReference incompatible with javax.sql.DataSource java.lang.ClassCastException: org.tranql.connector.jdbc.TranqlDataSource$SelfReference incompatible with javax.sql.DataSource at org.apache.geronimo.monitoring.MasterRemoteControlJMX.(MasterRemoteControlJMX.java:110) at org.apache.geronimo.monitoring.snapshot.SnapshotProcessor.getMRC(SnapshotProcessor.java:148) at org.apache.geronimo.monitoring.snapshot.SnapshotProcessor.takeSnapshot(SnapshotProcessor.java:59) at org.apache.geronimo.monitoring.snapshot.SnapshotThread.run(SnapshotThread.java:103) ... In G 214, this exception does not come while using same java client. These steps are followed in java client: 1.Creating MBeanServerConnection object ... MBeanServerConnection mbServerConn; JMXServiceURL serviceURL = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost/JMXConnector"); Hashtable env = new Hashtable(); String[] credentials = new String[2]; credentials[0] = "system"; credentials[1] = "manager"; env.put(JMXConnector.CREDENTIALS, credentials); JMXConnector connector = JMXConnectorFactory.connect(serviceURL, env); mbServerConn = connector.getMBeanServerConnection(); .. 2. Retrieving the mbean name to the agent-car-jmx plugin .. if(PATH == null) { Set mbeanNames = mbServerConn.queryNames(new ObjectName("*:name=MasterRemoteControlJMX,*"), null); for(Iterator it = mbeanNames.iterator(); it.hasNext(); ) { String mbeanName = ((ObjectName)it.next()).getCanonicalName(); if(mbeanName.contains("agent-car-jmx") && mbeanName.contains("MasterRemoteControlJMX") && mbeanName.contains("GBean")) { PATH = mbeanName; break; }} if(PATH == null) { throw new Exception("[ERROR] Required mbean not found: agent-car-jmx"); }} .. Here I am getting mbean name as "geronimo:J2EEServer=geronimo,ServiceModule=org.apache.geronimo.plugins.monitoring/agent-car-jmx/2.1.5/car,j2eeType=GBean,name=MasterRemoteControlJMX" 3. Invoking startSnapshot .. long time = 300000; int days = 2; mbServerConn.invoke(new ObjectName(PATH),"startSnapshot", new Object[] { time, days }, new String[] { "java.lang.Long", "java.lang.Integer" }); .. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.