Bug 901050 (JBEWS-10)

Summary: javax.management.InstanceNotFoundException: Catalina:type=StoreConfig
Product: [JBoss] JBoss Enterprise Web Server 2 Reporter: Jan Martiska <jmartisk>
Component: tomcat6, tomcat7Assignee: David Knox <dknox>
Status: CLOSED DUPLICATE QA Contact: Libor Fuka <lfuka>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 2.0.0CC: jclere, jdoyle, jfclere, jmartisk, lfuka, mhasko, myarboro, pcheung, pslavice, rmaucher, rsvoboda
Target Milestone: ---   
Target Release: 2.0.1   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/JBEWS-10
See Also: https://bugzilla.redhat.com/show_bug.cgi?id=900723
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-04-17 07:19:15 EDT Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Jan Martiska 2012-10-11 11:20:30 EDT
Affects: Release Notes
project_key: JBEWS

This is a lingering upstream issue in Tomcat 6 and 7. It affects JON in a way that it prevents configuration changes made by JON agent to be persisted into xml. Config changes can be done through remote JMX interface, but persisting them to server.xml doesn't work, as it requires calling the storeConfig method of Catalina:type=StoreConfig MBean.


JBoss Operations Network tries to persist every change right away, so - when you try to make a configuration change through JON, you will get this message in tomcat log:

{noformat}
Oct 11, 2012 11:10:07 AM org.apache.tomcat.util.modeler.BaseModelMBean invoke
SEVERE: Exception invoking method storeConfig
javax.management.InstanceNotFoundException: Catalina:type=StoreConfig
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1118)
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:854)
	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:795)
	at org.apache.catalina.core.StandardServer.storeConfig(StandardServer.java:665)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:857)
	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:795)
	at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1450)
	at javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:90)
	at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1285)
	at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1383)
	at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:807)
	at sun.reflect.GeneratedMethodAccessor44.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
	at sun.rmi.transport.Transport$1.run(Transport.java:177)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:679)
{noformat}

official tomcat6 issue: https://issues.apache.org/bugzilla/show_bug.cgi?id=42708

.. but it also affects tomcat7 in the same way.

It seems that this will never be fixed in upstream. In other words, if we don't provide this functionality ourselves, this will probably never work.
Comment 1 Libor Fuka 2012-10-12 03:43:13 EDT
Link: Added: This issue relates to JBPAPP-9551
Comment 2 Jean-Frederic Clere 2012-10-12 08:34:21 EDT
The upstream code wasn't port to TC6. I don't except this being fixed....
Comment 4 Jean-Frederic Clere 2012-10-12 09:32:38 EDT
fixing that is weeks for work for Tomcat6 and bunch of weeks more for Tomcat7 (and more for trunk).
Comment 5 Permaine Cheung 2012-10-15 12:08:02 EDT
Assigning to dev for future EWS release.
Comment 6 Libor Fuka 2012-10-17 07:03:36 EDT
Release Notes Docs Status: Added: Documented as Known Issue
Affects: Added: Release Notes
Comment 7 Libor Fuka 2012-10-17 07:55:53 EDT
Release Notes Docs Status: Removed: Documented as Known Issue Added: Not Yet Documented
Comment 8 Misha H. Ali 2012-10-17 22:33:31 EDT
Release Notes Docs Status: Removed: Not Yet Documented Added: Documented as Known Issue
Writer: Added: mhusnain
Comment 9 Misha H. Ali 2012-10-17 23:19:52 EDT
Release Notes Text: Added: When using Tomcat 6 and 7 in JBoss Enterprise Web Server, configuration changes made using the JBoss Operations Network (JON) agent do not persist into XML. Configuration changes made through a remote JMX interface also do not persist to server.xml because this requires calling the storeConfig method from the storeConfig MBean.
Comment 10 Rémy Maucherat 2012-10-25 09:22:15 EDT
A port attempt is in the Tomcat sandbox:
- for Tomcat 6: http://svn.apache.org/repos/asf/tomcat/sandbox/storeconfig6/
- for Tomcat 7: http://svn.apache.org/repos/asf/tomcat/sandbox/storeconfig7/
They can be built with Maven.
Comment 11 Jiri Skrabal 2012-11-13 10:56:32 EST
Release Notes Docs Status: Removed: Documented as Known Issue 
Writer: Removed: mhusnain 
Release Notes Text: Removed: When using Tomcat 6 and 7 in JBoss Enterprise Web Server, configuration changes made using the JBoss Operations Network (JON) agent do not persist into XML. Configuration changes made through a remote JMX interface also do not persist to server.xml because this requires calling the storeConfig method from the storeConfig MBean. 
Docs QE Status: Removed: NEW 
Comment 12 Jean-Frederic Clere 2012-12-04 10:20:28 EST
more comments on https://bugzilla.redhat.com/show_bug.cgi?id=583996
Comment 14 Michal Haško 2013-04-17 07:19:15 EDT

*** This bug has been marked as a duplicate of bug 583996 ***