janwytze / stackftp

Stack webdav to ftp server
0 stars 2 forks source link

java.lang.NoClassDefFoundError: org/apache/catalina/Lifecycle$SingleUse #31

Closed janwytze closed 7 years ago

janwytze commented 7 years ago

Sometimes this error appears in the log:


Exception in thread "Thread-4" java.lang.NoClassDefFoundError: org/apache/catalina/Lifecycle$SingleUse
        at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:240)
        at org.apache.catalina.startup.Tomcat.stop(Tomcat.java:377)
        at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.stopTomcat(TomcatEmbeddedServletContainer.java:241)
        at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.stop(TomcatEmbeddedServletContainer.java:295)
        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.stopAndReleaseEmbeddedServletContainer(EmbeddedWebApplicationContext.java:306)
        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onClose(EmbeddedWebApplicationContext.java:155)
        at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1012)
        at org.springframework.context.support.AbstractApplicationContext$2.run(AbstractApplicationContext.java:929)
Exception in thread "pool-2-thread-1" java.lang.NoClassDefFoundError: org/apache/mina/transport/socket/nio/NioSocketAcceptor$ServerSocketChannelIterator
        at org.apache.mina.transport.socket.nio.NioSocketAcceptor.selectedHandles(NioSocketAcceptor.java:289)
        at org.apache.mina.core.polling.AbstractPollingIoAcceptor$Acceptor.run(AbstractPollingIoAcceptor.java:484)
        at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: org.apache.mina.transport.socket.nio.NioSocketAcceptor$ServerSocketChannelIterator
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:94)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 6 more

I have no idea how this is caused.

janwytze commented 7 years ago

https://github.com/spring-projects/spring-boot/issues/6516

janyksteenbeek commented 7 years ago

So that has something to do with tomcat. Can't we just completely get rid of that?

janwytze commented 7 years ago

@janyksteenbeek I think it could be removed, but if we are going to build a web interface it is better to keep it. But if the exception only occures on war override it isn't a big problem.

janwytze commented 7 years ago

https://stackoverflow.com/questions/32078015/spring-boot-enable-disable-embedded-tomcat-with-profile

janyksteenbeek commented 7 years ago

Has disabling Tomcat in PR #35 fixed this issue?

janwytze commented 7 years ago

I don't know because the exception was thrown pretty randomly.

janyksteenbeek commented 7 years ago

All clear. Further investigation is required here.

janwytze commented 7 years ago

The exception is not thrown anymore.
I am not sure if it is solved, but I think it is.

I tried overriding the .war while running to reproduce it but nothing was thrown.

In my opinion this issue can be closed, if you agree (@janyksteenbeek ) you can close this issue.