zengkid / SmartTomcat

The Tomcat plugin for Intellij IDEA
Apache License 2.0
126 stars 55 forks source link

Startup Error with Smart tomcat plugin #113

Closed ukchaitanya closed 8 months ago

ukchaitanya commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

Getting below error while trying to run my application in intellij, the same works in Eclipse.

Startup Console log:

20-Sep-2023 11:32:24.926 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
20-Sep-2023 11:32:24.942 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [/my-app] startup failed due to previous errors

Catalina log: 20-Sep-2023 11:32:24.942 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [/my-app] startup failed due to previous errors

Localhost log:

20-Sep-2023 11:32:24.926 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStart Error configuring application listener of class [org.springframework.web.context.ContextLoaderListener]
    java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
        at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1420)
        at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1228)
        at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:487)
        at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:469)
        at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:142)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4404)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4935)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:710)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:687)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:661)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:673)
        at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1881)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266)
        at java.util.concurrent.FutureTask.run(FutureTask.java)
        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)
20-Sep-2023 11:32:24.926 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStart Skipped installing application listeners due to previous error(s)

Intellij & SmartTomcat Version (Help -> About copy & paste below)

IntelliJ IDEA 2023.2.2 (Community Edition)
Build #IC-232.9921.47, built on September 13, 2023
Runtime version: 17.0.8+7-b1000.22 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o

Smart Tomcat version: Same erorr on both the versions
4.6.1 and 4.7.0
yuezk commented 1 year ago

Looks like the classpath is not correct. Please try to change the Use classpath of module field on the Smart Tomcat configuration page.