title: tomcat 8 stopped working after ubuntu update
body: <p>I have recently updates my ubuntu deskto to 18.04. After this my tomcat is failing at startup. Each time I restart tomcat using the command <code>service tomcat8 restart</code> the log file give the following error - </p>
  
  <pre><code>    Caused by: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBContext
      at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
      at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
      at org.glassfish.hk2.utilities.cache.LRUHybridCache$OriginThreadAwareFuture.get(LRUHybridCache.java:164)
      at org.glassfish.hk2.utilities.cache.LRUHybridCache.compute(LRUHybridCache.java:303)
      ... 135 more
  Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBContext
      at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
      at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3119)
      at java.base/java.lang.Class.getDeclaredMethods(Class.java:2268)
      at org.glassfish.hk2.utilities.reflection.internal.ClassReflectionHelperUtilities$3.run(ClassReflectionHelperUtilities.java:108)
      at org.glassfish.hk2.utilities.reflection.internal.ClassReflectionHelperUtilities$3.run(ClassReflectionHelperUtilities.java:104)
      at java.base/java.security.AccessController.doPrivileged(Native Method)
      at org.glassfish.hk2.utilities.reflection.internal.ClassReflectionHelperUtilities.secureGetDeclaredMethods(ClassReflectionHelperUtilities.java:104)
      at org.glassfish.hk2.utilities.reflection.internal.ClassReflectionHelperUtilities.getDeclaredMethodWrappers(ClassReflectionHelperUtilities.java:133)
      at org.glassfish.hk2.utilities.reflection.internal.ClassReflectionHelperUtilities.getAllMethodWrappers(ClassReflectionHelperUtilities.java:192)
      at org.glassfish.hk2.utilities.reflection.internal.ClassReflectionHelperUtilities.getAllMethodWrappers(ClassReflectionHelperUtilities.java:193)
      at org.glassfish.hk2.utilities.reflection.internal.ClassReflectionHelperImpl$3.compute(ClassReflectionHelperImpl.java:84)
      at org.glassfish.hk2.utilities.reflection.internal.ClassReflectionHelperImpl$3.compute(ClassReflectionHelperImpl.java:80)
      at org.glassfish.hk2.utilities.cache.LRUHybridCache$OriginThreadAwareFuture$1.call(LRUHybridCache.java:115)
      at org.glassfish.hk2.utilities.cache.LRUHybridCache$OriginThreadAwareFuture$1.call(LRUHybridCache.java:111)
      at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
  </code></pre>
  
  <p>I then installed jdk8 and run update-alternatives command like this -</p>
  
  <pre><code>dimension:bin$ sudo update-alternatives --config javac
  There are 2 choices for the alternative javac (providing /usr/bin/javac).
  
    Selection    Path                                          Priority   Status
  ------------------------------------------------------------
    0            /usr/lib/jvm/java-11-openjdk-amd64/bin/javac   1101      auto mode
    1            /usr/lib/jvm/java-11-openjdk-amd64/bin/javac   1101      manual mode
  * 2            /usr/lib/jvm/java-8-openjdk-amd64/bin/javac    1081      manual mode
  
  Press &lt;enter&gt; to keep the current choice[*], or type selection number: 
  dimension:bin$ sudo update-alternatives --config java
  There are 2 choices for the alternative java (providing /usr/bin/java).
  
    Selection    Path                                            Priority   Status
  ------------------------------------------------------------
    0            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1101      auto mode
    1            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1101      manual mode
  * 2            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081      manual mode
  
  Press &lt;enter&gt; to keep the current choice[*], or type selection number:
  </code></pre>
  
  <p>When I again restarted the tomcat, I saw the same error. Here are the contents to my <code>jvm</code> folder - </p>
  
  <pre><code>ls -lh /usr/lib/jvm/
  total 8.0K
  lrwxrwxrwx 1 root root   25 Apr  8 18:46 default-java -&gt; java-1.11.0-openjdk-amd64
  lrwxrwxrwx 1 root root   21 Aug 24 23:06 java-1.11.0-openjdk-amd64 -&gt; java-11-openjdk-amd64
  drwxr-xr-x 9 root root 4.0K Oct  4 10:56 java-11-openjdk-amd64
  lrwxrwxrwx 1 root root   20 Oct 28  2016 java-1.8.0-openjdk-amd64 -&gt; java-8-openjdk-amd64
  drwxr-xr-x 7 root root 4.0K Oct  4 16:03 java-8-openjdk-amd64
  </code></pre>
  
  <p>My <code>JAVA_HOME</code> env is currently set to empty. </p>
  
  <p>What should I do to fix my issue.</p>