Impossible to run tomcat8 on Java 8 on Ubuntu 18.04

Bug #1769994 reported by Thomas Mortagne
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
tomcat8 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I just upgraded from Ubuntu 17.10 to 18.04 and I ended up with a failing instance of Tomcat.

I get the following error in the log

    08-May-2018 20:52:38.487 SEVERE [http-nio-8080-exec-1] org.apache.coyote.AbstractProtocol$ConnectionHandler.process Error reading request, ignored
     java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
 at org.apache.coyote.http11.Http11InputBuffer.init(Http11InputBuffer.java:688)
 at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:672)
 at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
 at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790)
 at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
 at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
 at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
 at java.lang.Thread.run(Thread.java:748)

This seems to indicate that tomcat8 package has been built using Java 9+ (which contains a breaking change in the return type of ByteBuffer#position method).

I really need to run it with Java 8 in my case (and Tomcat 8 is supposed support Java 8 anyway) but Ubuntu should build it with Java 8 for that (and then it should work just fine in Java 9 too).

Java 8 is still the current LTS version of Java so don't bury it too quickly :)

I don't really have any workaround idea to propose other that not using the standard tomcat8 Ubuntu package and install it "by hand" instead. But then my other issue is that I can't use another debian package which depends on tomcat8 package :)

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in tomcat8 (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.