[JBoss JIRA] Created: (JBAS-4150) ClassCastException when receiving serviceNames attribute of Catalina:type=Server mbean
by Nikolay Chugunov (JIRA)
ClassCastException when receiving serviceNames attribute of Catalina:type=Server mbean
--------------------------------------------------------------------------------------
Key: JBAS-4150
URL: http://jira.jboss.com/jira/browse/JBAS-4150
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Reporter: Nikolay Chugunov
ClassCastException thrown when receiving serviceNames attribute of Catalina:type=Server mbean.
To reproduce start JBoss AS server with jmx connector as described at http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossMBeansInJConsole
Run following test:
import javax.management.*;
import javax.management.remote.*;
public class CatalinaMBeanTest {
public static void main(final String[] args) throws Exception {
final JMXServiceURL url = new JMXServiceURL(
"service:jmx:rmi:///jndi/rmi://127.0.0.1:1099/jmxrmi");
final MBeanServerConnection conncetion = JMXConnectorFactory.connect(
url, null).getMBeanServerConnection();
conncetion.getAttribute(new ObjectName("Catalina:type=Server"),
"serviceNames");
}
}
Output:
Exception in thread "main" javax.management.RuntimeOperationsException: Exception invoking method serviceNames
at org.apache.commons.modeler.BaseModelMBean.getAttribute(BaseModelMBean.java:353)
at org.jboss.mx.server.RawDynamicInvoker.getAttribute(RawDynamicInvoker.java:117)
at org.jboss.mx.server.MBeanServerImpl.getAttribute(MBeanServerImpl.java:556)
at org.jboss.system.server.jmx.LazyMBeanServer.getAttribute(LazyMBeanServer.java:250)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1401)
at javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72)
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1262)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1357)
at javax.management.remote.rmi.RMIConnectionImpl.getAttribute(RMIConnectionImpl.java:598)
at sun.reflect.GeneratedMethodAccessor110.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source)
at javax.management.remote.rmi.RMIConnectionImpl_Stub.getAttribute(Unknown Source)
at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.getAttribute(RMIConnector.java:863)
at CatalinaMBeanTest.main(CatalinaMBeanTest.java:17)
Caused by: java.lang.ClassCastException: org.jboss.web.tomcat.tc5.StandardService cannot be cast to org.apache.catalina.core.StandardService
at org.apache.catalina.core.StandardServer.getServiceNames(StandardServer.java:487)
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:597)
at org.apache.commons.modeler.BaseModelMBean.getAttribute(BaseModelMBean.java:346)
at org.jboss.mx.server.RawDynamicInvoker.getAttribute(RawDynamicInvoker.java:117)
at org.jboss.mx.server.MBeanServerImpl.getAttribute(MBeanServerImpl.java:556)
at org.jboss.system.server.jmx.LazyMBeanServer.getAttribute(LazyMBeanServer.java:250)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1401)
at javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72)
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1262)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1357)
at javax.management.remote.rmi.RMIConnectionImpl.getAttribute(RMIConnectionImpl.java:598)
at sun.reflect.GeneratedMethodAccessor110.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
Tested under JBoss4.0.5 GA, Java 1.6, Linux
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 2 months
[JBoss JIRA] Created: (JBAS-4147) Build and install missing derby-plugin.jar
by Panagiotis Astithas (JIRA)
Build and install missing derby-plugin.jar
------------------------------------------
Key: JBAS-4147
URL: http://jira.jboss.com/jira/browse/JBAS-4147
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Build System, Installer
Affects Versions: JBossAS-4.0.5.GA, JBossAS-4.0.4.GA
Environment: Windows XP, JDK 6, although irrelevant to the issue here.
Reporter: Panagiotis Astithas
Assigned To: Rajesh Rajasekaran
When using the Derby DBMS with jboss, the example configuration file in:
JBOSS_HOME\docs\examples\jca\derby-ds.xml
references a Derby MBean:
<mbean code="org.jboss.jdbc.DerbyDatabase" name="jboss:service=Derby" />
This MBean is supposed to properly start and shutdown the embedded Derby instance. It is supposed to be delivered as a jar in JBOSS_HOME\server\default\lib\ along with hsqldb-plugin.jar, for instance, which serves a similar purpose.
Unfortunately the zip/tar.gz download does not appear to contain it, nor the JEMS installer seems to create it, even when configured with Derby instead of HSQL.
Apparently the jar gets built when building jboss in varia/output/lib, but not in the default directory.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 2 months