Uploaded image for project: 'JBoss Web Server'
  1. JBoss Web Server
  2. JWS-1598

Storing configuration fails with java.lang.NoSuchMethodException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 5.3.0.CR1
    • 5.3.0.DR1
    • tomcat
    • Hide

      1. Add user with with roles: admin-gui,admin-script,manager-gui to tomcat-users.xml

      <user username="tomcat" password="tomcat" roles="admin-gui,admin-script,manager-gui"/>
      

      2. Add StoreConfigLifecycleListener to server.xml

      <Listener className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener" />
      

      3. Login to Tomcat Virtual Host Manager
      4. Persist configuration and see log

      Show
      1. Add user with with roles: admin-gui,admin-script,manager-gui to tomcat-users.xml <user username= "tomcat" password= "tomcat" roles= "admin-gui,admin-script,manager-gui" /> 2. Add StoreConfigLifecycleListener to server.xml <Listener className= "org.apache.catalina.storeconfig.StoreConfigLifecycleListener" /> 3. Login to Tomcat Virtual Host Manager 4. Persist configuration and see log

      Persisting configuration with Tomcat Virtual Host Manager fails with the following exception.

      java.lang.NoSuchMethodException: org.apache.catalina.startup.ContextConfig$HostWebXmlCacheCleaner.<init>()
      		at java.lang.Class.getConstructor0(Class.java:3082)
      		at java.lang.Class.getConstructor(Class.java:1825)
      		at org.apache.catalina.storeconfig.StoreAppender.defaultInstance(StoreAppender.java:331)
      		at org.apache.catalina.storeconfig.StoreAppender.printAttributes(StoreAppender.java:231)
      		at org.apache.catalina.storeconfig.StoreAppender.printAttributes(StoreAppender.java:193)
      		at org.apache.catalina.storeconfig.StoreAppender.printTag(StoreAppender.java:93)
      		at org.apache.catalina.storeconfig.StoreFactoryBase.store(StoreFactoryBase.java:124)
      		at org.apache.catalina.storeconfig.StoreFactoryBase.storeElement(StoreFactoryBase.java:170)
      		at org.apache.catalina.storeconfig.StoreFactoryBase.storeElementArray(StoreFactoryBase.java:190)
      		at org.apache.catalina.storeconfig.StandardHostSF.storeChildren(StandardHostSF.java:58)
      		at org.apache.catalina.storeconfig.StoreFactoryBase.store(StoreFactoryBase.java:129)
      		at org.apache.catalina.storeconfig.StoreFactoryBase.storeElement(StoreFactoryBase.java:170)
      		at org.apache.catalina.storeconfig.StoreFactoryBase.storeElementArray(StoreFactoryBase.java:190)
      		at org.apache.catalina.storeconfig.StandardEngineSF.storeChildren(StandardEngineSF.java:89)
      		at org.apache.catalina.storeconfig.StoreFactoryBase.store(StoreFactoryBase.java:129)
      		at org.apache.catalina.storeconfig.StandardServiceSF.storeChildren(StandardServiceSF.java:64)
      		at org.apache.catalina.storeconfig.StoreFactoryBase.store(StoreFactoryBase.java:129)
      		at org.apache.catalina.storeconfig.StoreFactoryBase.storeElement(StoreFactoryBase.java:170)
      		at org.apache.catalina.storeconfig.StoreFactoryBase.storeElementArray(StoreFactoryBase.java:190)
      		at org.apache.catalina.storeconfig.StandardServerSF.storeChildren(StandardServerSF.java:98)
      		at org.apache.catalina.storeconfig.StoreFactoryBase.store(StoreFactoryBase.java:129)
      		at org.apache.catalina.storeconfig.StandardServerSF.store(StandardServerSF.java:52)
      		at org.apache.catalina.storeconfig.StoreConfig.store(StoreConfig.java:321)
      		at org.apache.catalina.storeconfig.StoreConfig.store(StoreConfig.java:229)
      		at org.apache.catalina.storeconfig.StoreConfig.storeConfig(StoreConfig.java:106)
      		at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      		at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      		at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      		at java.lang.reflect.Method.invoke(Method.java:498)
      		at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:289)
      		at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
      		at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
      		at org.apache.catalina.manager.host.HostManagerServlet.persist(HostManagerServlet.java:666)
      		at org.apache.catalina.manager.host.HTMLHostManagerServlet.persist(HTMLHostManagerServlet.java:242)
      		at org.apache.catalina.manager.host.HTMLHostManagerServlet.doPost(HTMLHostManagerServlet.java:147)
      		at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
      		at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
      		at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
      		at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      		at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:211)
      		at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      		at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      		at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
      		at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      		at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      		at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
      		at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
      		at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:666)
      		at org.apache.catalina.valves.RequestFilterValve.process(RequestFilterValve.java:348)
      		at org.apache.catalina.valves.RemoteAddrValve.invoke(RemoteAddrValve.java:53)
      		at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
      		at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
      		at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
      		at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
      		at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
      		at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:367)
      		at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
      		at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:860)
      		at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1598)
      		at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      		at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      		at java.lang.Thread.run(Thread.java:748)
      
      

      I was able to trace this to BZ63836 fix that adds a new static class.

              rhn-support-csutherl Coty Sutherland
              akrajcik@redhat.com Adam Krajcik
              Adam Krajcik Adam Krajcik
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: