1

I have built my pedestal app according to following

https://github.com/pedestal/pedestal/blob/master/guides/documentation/service-war-deployment.md

and then I upload the .war file and deploy it.

however, when I ssh in to the ec2 instance I found that it did not deploy successfully even though it says so

INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs durin$ May 31, 2016 2:09:52 AM org.apache.catalina.core.ContainerBase addChildInternal SEVERE: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1091)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1980)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NoClassDefFoundError: org/apache/tomcat/util/descriptor/tld/TldParser
        at org.apache.jasper.servlet.TldScanner.<init>(TldScanner.java:86)
        at org.apache.jasper.servlet.JasperInitializer.newTldScanner(JasperInitializer.java:120)
        at org.apache.jasper.servlet.JasperInitializer.onStartup(JasperInitializer.java:101)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5573)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
        ... 10 more Caused by: java.lang.ClassNotFoundException: org.apache.tomcat.util.descriptor.tld.TldParser
        at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1858)
        at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1701)
        ... 15 more

May 31, 2016 2:09:52 AM org.apache.catalina.startup.HostConfig deployWAR SEVERE: Error deploying web application archive /var/lib/tomcat7/webapps/ROOT.war java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:903)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1091)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1980)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)


May 31, 2016 2:09:52 AM org.apache.catalina.startup.HostConfig deployWAR INFO: Deployment of web application archive /var/lib/tomcat7/webapps/ROOT.war has finished in 6,440 ms 
May 31, 2016 2:09:52 AM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["http-bio-8080"] 
May 31, 2016 2:09:52 AM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["ajp-bio-8009"] 
May 31, 2016 2:09:52 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 6530 ms

I'm thinking this is pedestal specific because I successfully deployed a clojure ring web app packaged into war without problems.

Alex Miller
  • 69,183
  • 25
  • 122
  • 167
user299709
  • 4,922
  • 10
  • 56
  • 88

1 Answers1

1

From looking at the stack trace it seems that this class is missing: org/apache/tomcat/util/descriptor/tld/TldParser.

It is possible that the uber-war you are supplying still has Tomcat classes in it. The instructions you link to say to remove Tomcat dependencies:

[io.pedestal/pedestal.tomcat "0.1.0"] 

I am guessing that EC2 supplies its own Tomcat, and if you were not supplying any conflicting classes, you would not be getting that error.

You can use any zip/archiving tool to look inside the war and verify that you have removed Tomcat completely: it is just a zip file after all.

Chris Murphy
  • 6,411
  • 1
  • 24
  • 42
  • the latter sounds more likely, which files need to be removed? – user299709 May 31 '16 at 03:25
  • im guessing all the tomcat-embedded*.jar files – user299709 May 31 '16 at 03:25
  • where did you get the 0.1.0 from? I'm using ` [io.pedestal/pedestal.tomcat "0.4.1"]` like from that doc – user299709 May 31 '16 at 03:26
  • oh shit now I think I now why ` ;; Remove this line and uncomment one of the next lines to ;; use Immutant or Tomcat instead of Jetty:` was in project.clj which I thought meant uncomment out the tomcat but this creates tomcat-embed*.jar which I think is creating the conflicts!!!! – user299709 May 31 '16 at 03:29
  • I just copied `[io.pedestal/pedestal.tomcat "0.1.0"]` from **Step One** in the link you provided. We must somehow be being taken to different pages, mine much older. – Chris Murphy May 31 '16 at 03:31
  • no you are right I was wrong, I completely blew past that part and instead assumed that from the comments inside project.clj to uncomment the tomcat dependencies if you were deploying. Now I understand it means to completely remove all dependencies to tomcat to avoid creating conflict which is EXACTLY what was happening! I'm uploading the war now and crossing my fingers really banging my head from the last few hours over this! – user299709 May 31 '16 at 03:32
  • yes I have checked the folder before creating the war and verified that no tomcat jars were there....about to find out soon if this works and I will accept your answer! – user299709 May 31 '16 at 03:39
  • the server is running so I'm going to accept this answer...but running into another issue here http://stackoverflow.com/questions/37536765/tomcat-clojure-app-could-not-locate – user299709 May 31 '16 at 04:20