Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-10231

Camunda sometimes fails to shut down with NoClassDefFoundError

    • Icon: Bug Report Bug Report
    • Resolution: Cannot Reproduce
    • Icon: L3 - Default L3 - Default
    • None
    • 7.10.0
    • webapp
    • None
    • Debian GNU/Linux 9 on Intel x64, Oracle Java build 1.8.0_201-b09

      when I run the Tomcat shutdown script, Camunda sometimes shuts down as expected and sometimes logs the following message:

      30-Apr-2019 15:30:10.349 SEVERE [main] org.apache.catalina.startup.Catalina.stop Catalina.stop
      org.apache.catalina.LifecycleException: Failed to stop component [StandardServer[8005]]
      at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:441)
      at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:267)
      at org.apache.catalina.startup.Catalina.stop(Catalina.java:755)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:717)
      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.catalina.startup.Bootstrap.start(Bootstrap.java:350)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)
      Caused by: java.lang.NoClassDefFoundError: org/camunda/bpm/engine/impl/SchemaOperationProcessEngineClose
      at org.camunda.bpm.engine.impl.ProcessEngineImpl.close(ProcessEngineImpl.java:143)
      at org.camunda.bpm.container.impl.jmx.services.JmxManagedProcessEngineController.stop(JmxManagedProcessEngineController.java:41)
      at org.camunda.bpm.container.impl.jmx.MBeanServiceContainer.stopService(MBeanServiceContainer.java:124)
      at org.camunda.bpm.container.impl.deployment.StopProcessEnginesStep.stopProcessEngine(StopProcessEnginesStep.java:58)
      at org.camunda.bpm.container.impl.deployment.StopProcessEnginesStep.performOperationStep(StopProcessEnginesStep.java:46)
      at org.camunda.bpm.container.impl.spi.DeploymentOperation.execute(DeploymentOperation.java:119)
      at org.camunda.bpm.container.impl.jmx.MBeanServiceContainer.executeDeploymentOperation(MBeanServiceContainer.java:159)
      at org.camunda.bpm.container.impl.spi.DeploymentOperation$DeploymentOperationBuilder.execute(DeploymentOperation.java:215)
      at org.camunda.bpm.container.impl.tomcat.TomcatBpmPlatformBootstrap.undeployBpmPlatform(TomcatBpmPlatformBootstrap.java:100)
      at org.camunda.bpm.container.impl.tomcat.TomcatBpmPlatformBootstrap.lifecycleEvent(TomcatBpmPlatformBootstrap.java:65)
      at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
      at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:424)
      at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:367)
      at org.apache.catalina.core.StandardServer.stopInternal(StandardServer.java:786)
      at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
      ... 8 more
      Caused by: java.lang.ClassNotFoundException: org.camunda.bpm.engine.impl.SchemaOperationProcessEngineClose
      at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:424)

        This is the controller panel for Smart Panels app

          1. bpm-platform.xml
            4 kB
          2. catalina.2019-04-26.log
            2.08 MB
          3. server.xml
            8 kB
          4. shutdown.sh
            2 kB

            [CAM-10231] Camunda sometimes fails to shut down with NoClassDefFoundError

            David Hodges added a comment -

            Yes, I am using the pre-packaged Tomcat distribution bundled with Camunda.
            Yes, it is Camunda 7.10.0
            Yes I am referring to the included shutdown-camunda.sh script.

            David Hodges added a comment - Yes, I am using the pre-packaged Tomcat distribution bundled with Camunda. Yes, it is Camunda 7.10.0 Yes I am referring to the included shutdown-camunda.sh script.

            I checked that we don't ship the shutdown-camunda.sh script with 7.10.0, from where did you take it?
            I tried the script on 7.11.0-alpha3 and it works as expected (the result on 7.10.0 was the same).
            Could you please upload the complete server log file when the issue occurred.
            Do you have any changes on the process engine configuration or it is the default one (shipped in the pre-packaged Tomcat distribution)?
            Does this exception occur also when you just terminate the java process of the Tomcat?

            Yana Vasileva added a comment - I checked that we don't ship the shutdown-camunda.sh script with 7.10.0, from where did you take it? I tried the script on 7.11.0-alpha3 and it works as expected (the result on 7.10.0 was the same). Could you please upload the complete server log file when the issue occurred. Do you have any changes on the process engine configuration or it is the default one (shipped in the pre-packaged Tomcat distribution)? Does this exception occur also when you just terminate the java process of the Tomcat?

            David Hodges added a comment -

            the shutdown script is in the file camunda-bpm-tomcat-7.10.0.tar.gz which I'm pretty sure I downloaded from the camunda website:
            rwxr-x-- 0/0 1902 2018-09-05 00:14 server/apache-tomcat-9.0.12/bin/shutdown.sh

            The error doesn't occur every time. Looking back at the log files I see it happened 4 times out of 106 shutdowns.
            It has also failed to find two other classes during shutdown, as you can see from the attached log file.
            I don't think I have seen this exception occur when I just terminate the java process.
            There is a one line addition to server.xml to enable logback logging, also uploaded.

            David Hodges added a comment - the shutdown script is in the file camunda-bpm-tomcat-7.10.0.tar.gz which I'm pretty sure I downloaded from the camunda website: rwxr-x -- 0/0 1902 2018-09-05 00:14 server/apache-tomcat-9.0.12/bin/shutdown.sh The error doesn't occur every time. Looking back at the log files I see it happened 4 times out of 106 shutdowns. It has also failed to find two other classes during shutdown, as you can see from the attached log file. I don't think I have seen this exception occur when I just terminate the java process. There is a one line addition to server.xml to enable logback logging, also uploaded.

            I just downloaded the camunda-bpm-tomcat-7.10.0.tar.gz file from https://camunda.com/download/
            There is no shutdown file in it. The file was introduced in the last couple of months and it is present only in the latest alpha releases of 7.11. The file is not backported to 7.10 and I don't see a reason to be present in 7.10.0 release at all.
            Could you please attach the shutdown.sh file. Additionally please attach the bpm-platform.xml file so I can check the process engine configuration as well.

            Yana Vasileva added a comment - I just downloaded the camunda-bpm-tomcat-7.10.0.tar.gz file from https://camunda.com/download/ There is no shutdown file in it. The file was introduced in the last couple of months and it is present only in the latest alpha releases of 7.11. The file is not backported to 7.10 and I don't see a reason to be present in 7.10.0 release at all. Could you please attach the shutdown.sh file. Additionally please attach the bpm-platform.xml file so I can check the process engine configuration as well.

            David Hodges added a comment -

            I downloaded the tar file again. cmp confirms it is still exactly the same as when I downloaded it previously (64457414 bytes, md5sum 2d1008d59aef787be4e1771997757e5b). The shutdown.sh script is in the directory I indicated above: server/apache-tomcat-9.0.12/bin/

            David Hodges added a comment - I downloaded the tar file again. cmp confirms it is still exactly the same as when I downloaded it previously (64457414 bytes, md5sum 2d1008d59aef787be4e1771997757e5b). The shutdown.sh script is in the directory I indicated above: server/apache-tomcat-9.0.12/bin/

            David Hodges added a comment -

            I haven't changed the bpm-platform.xml file. I have uploaded it as well as shutdown.sh for your convenience.

            David Hodges added a comment - I haven't changed the bpm-platform.xml file. I have uploaded it as well as shutdown.sh for your convenience.

            I just see that the file path is different from the one I was thinking, sorry for the misunderstanding.
            I will have a look again and come back to you.

            Yana Vasileva added a comment - I just see that the file path is different from the one I was thinking, sorry for the misunderstanding. I will have a look again and come back to you.

            I was not able to reproduce the issue. Do you notice some pattern when the exception occurs?
            Could you please share the exact steps to reproduce, for example, if there are additional steps before shutting down the tomcat.

            Yana Vasileva added a comment - I was not able to reproduce the issue. Do you notice some pattern when the exception occurs? Could you please share the exact steps to reproduce, for example, if there are additional steps before shutting down the tomcat.

            David Hodges added a comment -

            I am no longer able to reproduce the fault. The last time I saw it was on 30 April and I am not aware of anything changing since then but I started and stopped Tomcat over 100 times today without the fault occuring.

            David Hodges added a comment - I am no longer able to reproduce the fault. The last time I saw it was on 30 April and I am not aware of anything changing since then but I started and stopped Tomcat over 100 times today without the fault occuring.

            Hi DavidHodges,

            In case the error is not reproducible anymore, I will close the ticket.
            Please feel free to open it when you have more insights from your side or create a new topic in the forum (https://forum.camunda.org/).

            Best regards,
            Yana

            Yana Vasileva added a comment - Hi DavidHodges , In case the error is not reproducible anymore, I will close the ticket. Please feel free to open it when you have more insights from your side or create a new topic in the forum ( https://forum.camunda.org/ ). Best regards, Yana

              yana.vasileva Yana Vasileva
              DavidHodges David Hodges
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: