I found a workaround that I'll post here in case anyone with the same
problem stumbles on this thread.  The fix is to install the older
`libeclipse-jdt-core-java` JDT package from the Ubuntu 20.04 repo.

1. Add the line `deb http://de.archive.ubuntu.com/ubuntu/ focal main
universe` to the end of `/etc/apt/sources.list`.

2. Update Apt ($ sudo apt update)

3. Install the old version of the package, specifying the older version:
    $ sudo apt install libeclipse-jdt-core-java=3.18.0+eclipse4.12-1
Apt should identify this as a `DOWNGRADE` operation automatically, so
there's no worry about conflicting package versions.

4. Hold this package back from further updates so that apt-upgrade doesn't
return it to the newer `3.27.0+eclipse4.21-1` version:
    $ sudo apt-mark hold libeclipse-jdt-core-java

5. Delete the line `deb http://de.archive.ubuntu.com/ubuntu/ focal main
universe` from `/etc/apt/sources.list` to restore its original state.

6. Upgrade Apt again ($ sudo apt upgrade)

7. Restart Tomcat ($ sudo systemctl restart tomcat9.service)

This worked for me on Ubuntu 22.04/Tomcat 9/Java 8.

Joel

On Fri, Jun 16, 2023 at 4:35 PM Joel Griffith <jgrif...@nd.edu> wrote:

> This is definitely the issue, I found a bug report to Canonical on the
> very thing:
> https://bugs.launchpad.net/ubuntu/+source/tomcat9/+bug/1972829
> Oh, well.
>
> Thanks for your help, everyone!
>
> On Fri, Jun 16, 2023 at 4:17 AM Mark Thomas <ma...@apache.org> wrote:
>
>> On 16/06/2023 09:07, Rémy Maucherat wrote:
>> > On Thu, Jun 15, 2023 at 9:54 PM Mark Thomas <ma...@apache.org> wrote:
>> >>
>> >> On 15/06/2023 19:23, Joel Griffith wrote:
>> >>> It looks like the JDT you mention is the Ubuntu package
>> >>> `libeclipse-jdt-core-java`.
>> >>>
>> >>> When I installed Tomcat 9 (9.0.31) on the functioning Ubuntu 20.04
>> system,
>> >>> version 3.18.0+eclipse4.12-1 of this JDT package was installed as a
>> >>> dependency.  When I installed Tomcat 9 (9.0.58) on the Ubuntu 22.04
>> system,
>> >>> version 3.27.0+eclipse4.21-1 was installed.  Assuming the "4.12" and
>> "4.21"
>> >>> numbers are the JDT versions you're referring to, it seems like you're
>> >>> right about the cause.
>> >>>
>> >>> According to this table (https://tomcat.apache.org/whichversion.html
>> ),
>> >>> Tomcat 9 is supposed to be compatible with Java 8, yet in this case it
>> >>> seems to have broken compatibility on a patch update between 9.0.31
>> and
>> >>> 9.0.58.  In order to regain compatibility, the dependency on JDT
>> should be
>> >>> adjusted to a lower version.  Is this something the Tomcat people
>> have to
>> >>> handle, or is it the package maintainers at Canonical who make that
>> choice?
>> >>
>> >> That would be Canonical.
>> >>
>> >> If you get Tomcat 9 from the ASF it works out of the box on Java 8.
>> (You
>> >> actually get the reverse issue with really new JDKs and very old JDTs
>> >> but that isn't what is happening here).
>> >
>> > JDT seems to be getting more and more aggressive with bumping Java
>> > requirements. For example, Tomcat 10.1 uses Java 11 as the minimum,
>> > but JDT 4.28 is *already* Java 17+. So Tomcat 10.1 will stay on 4.27
>> > forever basically.
>>
>> Thanks for the info. I hadn't realized that. I guess I would have found
>> out when I did the version updates for the July releases. I've added a
>> note to the 10.1.x build.properties file.
>>
>> Mark
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>

Reply via email to