Tomcat 9.0.36 - JDK 13/14

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Tomcat 9.0.36 - JDK 13/14

Kiran Badi
Hi All,

I wanted to check if tomcat 9.0.36 supports open jdk 13/14.

I created a simple spring boot war file and compiled/built it with openjdk
13/14. After running maven install , I deployed the war file from the
target directory to tomcat webapps using tomcat manager. It did not work
and gave me 404 messages with both 13/14. No error or any exception
anywhere in logs.Catalina log just says a war file is deployed.

Then i compiled the same spring boot app with jdk 8 and deployed it with
tomcat and it works fine. I am able to call my endpoints with no issues.

I am having a hard time deploying angular/spring boot and building war file
and deploying it on tomcat 9.0x with openjdk 13. So I thought this might be
a good place to start with.

I used the below pom file.

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.1.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.kiran</groupId>
<artifactId>springwar</artifactId>
<version>1.0.2-SNAPSHOT</version>
<packaging>war</packaging>
<name>springwar</name>
<description>Sample project to deploy war to tomcat</description>

<properties>
<java.version>14</java.version>
</properties>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
Reply | Threaded
Open this post in threaded view
|

Re: Tomcat 9.0.36 - JDK 13/14

markt
On 26/06/2020 05:45, Kiran Badi wrote:
> Hi All,
>
> I wanted to check if tomcat 9.0.36 supports open jdk 13/14.

Supported Java versions are listed at:
http://tomcat.apache.org/whichversion.html

"Java 8 and later" includes Java 13 and Java 14.

> I created a simple spring boot war file and compiled/built it with openjdk
> 13/14. After running maven install , I deployed the war file from the
> target directory to tomcat webapps using tomcat manager. It did not work
> and gave me 404 messages with both 13/14. No error or any exception
> anywhere in logs.Catalina log just says a war file is deployed.

That is normally indicative of a configuration error.

> Then i compiled the same spring boot app with jdk 8 and deployed it with
> tomcat and it works fine. I am able to call my endpoints with no issues.
>
> I am having a hard time deploying angular/spring boot and building war file
> and deploying it on tomcat 9.0x with openjdk 13. So I thought this might be
> a good place to start with.

If you can provide the code you use to create the sample, e.g. as a
GitHub project somebody may be able to take a look.

Mark

>
> I used the below pom file.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> https://maven.apache.org/xsd/maven-4.0.0.xsd">
> <modelVersion>4.0.0</modelVersion>
> <parent>
> <groupId>org.springframework.boot</groupId>
> <artifactId>spring-boot-starter-parent</artifactId>
> <version>2.3.1.RELEASE</version>
> <relativePath/> <!-- lookup parent from repository -->
> </parent>
> <groupId>com.kiran</groupId>
> <artifactId>springwar</artifactId>
> <version>1.0.2-SNAPSHOT</version>
> <packaging>war</packaging>
> <name>springwar</name>
> <description>Sample project to deploy war to tomcat</description>
>
> <properties>
> <java.version>14</java.version>
> </properties>
>
> <dependencies>
> <dependency>
> <groupId>org.springframework.boot</groupId>
> <artifactId>spring-boot-starter-web</artifactId>
> </dependency>
>
> <dependency>
> <groupId>org.springframework.boot</groupId>
> <artifactId>spring-boot-starter-tomcat</artifactId>
> <scope>provided</scope>
> </dependency>
> <dependency>
> <groupId>org.springframework.boot</groupId>
> <artifactId>spring-boot-starter-test</artifactId>
> <scope>test</scope>
> <exclusions>
> <exclusion>
> <groupId>org.junit.vintage</groupId>
> <artifactId>junit-vintage-engine</artifactId>
> </exclusion>
> </exclusions>
> </dependency>
> </dependencies>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Tomcat 9.0.36 - JDK 13/14

Kiran Badi
we fixed the issue Mark.

Actually tomcat was running on JDK 1.8 and applications were built using
JDK 13/14.So when they were deployed to tomcat running with 1.8, they were
giving 404.

Now plan is to explore and upgrade tomcat to at least jdk 13.

It would have been nice really to have at least some error saying major.minor
version exception or something like that in some logs somewhere which java
often throws in these cases.

Any ways we are good to go now. Thanks for your reply.



On Fri, Jun 26, 2020 at 6:34 AM Mark Thomas <[hidden email]> wrote:

> On 26/06/2020 05:45, Kiran Badi wrote:
> > Hi All,
> >
> > I wanted to check if tomcat 9.0.36 supports open jdk 13/14.
>
> Supported Java versions are listed at:
> http://tomcat.apache.org/whichversion.html
>
> "Java 8 and later" includes Java 13 and Java 14.
>
> > I created a simple spring boot war file and compiled/built it with
> openjdk
> > 13/14. After running maven install , I deployed the war file from the
> > target directory to tomcat webapps using tomcat manager. It did not work
> > and gave me 404 messages with both 13/14. No error or any exception
> > anywhere in logs.Catalina log just says a war file is deployed.
>
> That is normally indicative of a configuration error.
>
> > Then i compiled the same spring boot app with jdk 8 and deployed it with
> > tomcat and it works fine. I am able to call my endpoints with no issues.
> >
> > I am having a hard time deploying angular/spring boot and building war
> file
> > and deploying it on tomcat 9.0x with openjdk 13. So I thought this might
> be
> > a good place to start with.
>
> If you can provide the code you use to create the sample, e.g. as a
> GitHub project somebody may be able to take a look.
>
> Mark
>
> >
> > I used the below pom file.
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
> > http://www.w3.org/2001/XMLSchema-instance"
> > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> > https://maven.apache.org/xsd/maven-4.0.0.xsd">
> > <modelVersion>4.0.0</modelVersion>
> > <parent>
> > <groupId>org.springframework.boot</groupId>
> > <artifactId>spring-boot-starter-parent</artifactId>
> > <version>2.3.1.RELEASE</version>
> > <relativePath/> <!-- lookup parent from repository -->
> > </parent>
> > <groupId>com.kiran</groupId>
> > <artifactId>springwar</artifactId>
> > <version>1.0.2-SNAPSHOT</version>
> > <packaging>war</packaging>
> > <name>springwar</name>
> > <description>Sample project to deploy war to tomcat</description>
> >
> > <properties>
> > <java.version>14</java.version>
> > </properties>
> >
> > <dependencies>
> > <dependency>
> > <groupId>org.springframework.boot</groupId>
> > <artifactId>spring-boot-starter-web</artifactId>
> > </dependency>
> >
> > <dependency>
> > <groupId>org.springframework.boot</groupId>
> > <artifactId>spring-boot-starter-tomcat</artifactId>
> > <scope>provided</scope>
> > </dependency>
> > <dependency>
> > <groupId>org.springframework.boot</groupId>
> > <artifactId>spring-boot-starter-test</artifactId>
> > <scope>test</scope>
> > <exclusions>
> > <exclusion>
> > <groupId>org.junit.vintage</groupId>
> > <artifactId>junit-vintage-engine</artifactId>
> > </exclusion>
> > </exclusions>
> > </dependency>
> > </dependencies>
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Tomcat 9.0.36 - JDK 13/14

Christopher Schultz-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Kiran,

On 6/26/20 22:01, Kiran Badi wrote:

> we fixed the issue Mark.
>
> Actually tomcat was running on JDK 1.8 and applications were built
> using JDK 13/14.So when they were deployed to tomcat running with
> 1.8, they were giving 404.
>
> Now plan is to explore and upgrade tomcat to at least jdk 13.
>
> It would have been nice really to have at least some error saying
> major.minor version exception or something like that in some logs
> somewhere which java often throws in these cases.
>
> Any ways we are good to go now. Thanks for your reply.

My experience is that mismatched .class file versions do just that:
they result in errors being logged to stdout / catalina.out.

Perhaps you have a logging configuration which disables that?

- -chris

> On Fri, Jun 26, 2020 at 6:34 AM Mark Thomas <[hidden email]>
> wrote:
>
>> On 26/06/2020 05:45, Kiran Badi wrote:
>>> Hi All,
>>>
>>> I wanted to check if tomcat 9.0.36 supports open jdk 13/14.
>>
>> Supported Java versions are listed at:
>> http://tomcat.apache.org/whichversion.html
>>
>> "Java 8 and later" includes Java 13 and Java 14.
>>
>>> I created a simple spring boot war file and compiled/built it
>>> with
>> openjdk
>>> 13/14. After running maven install , I deployed the war file
>>> from the target directory to tomcat webapps using tomcat
>>> manager. It did not work and gave me 404 messages with both
>>> 13/14. No error or any exception anywhere in logs.Catalina log
>>> just says a war file is deployed.
>>
>> That is normally indicative of a configuration error.
>>
>>> Then i compiled the same spring boot app with jdk 8 and
>>> deployed it with tomcat and it works fine. I am able to call my
>>> endpoints with no issues.
>>>
>>> I am having a hard time deploying angular/spring boot and
>>> building war
>> file
>>> and deploying it on tomcat 9.0x with openjdk 13. So I thought
>>> this might
>> be
>>> a good place to start with.
>>
>> If you can provide the code you use to create the sample, e.g. as
>> a GitHub project somebody may be able to take a look.
>>
>> Mark
>>
>>>
>>> I used the below pom file.
>>>
>>> <?xml version="1.0" encoding="UTF-8"?> <project
>>> xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
>>> http://www.w3.org/2001/XMLSchema-instance"
>>> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
>>> https://maven.apache.org/xsd/maven-4.0.0.xsd">
>>> <modelVersion>4.0.0</modelVersion> <parent>
>>> <groupId>org.springframework.boot</groupId>
>>> <artifactId>spring-boot-starter-parent</artifactId>
>>> <version>2.3.1.RELEASE</version> <relativePath/> <!-- lookup
>>> parent from repository --> </parent>
>>> <groupId>com.kiran</groupId>
>>> <artifactId>springwar</artifactId>
>>> <version>1.0.2-SNAPSHOT</version> <packaging>war</packaging>
>>> <name>springwar</name> <description>Sample project to deploy
>>> war to tomcat</description>
>>>
>>> <properties> <java.version>14</java.version> </properties>
>>>
>>> <dependencies> <dependency>
>>> <groupId>org.springframework.boot</groupId>
>>> <artifactId>spring-boot-starter-web</artifactId> </dependency>
>>>
>>> <dependency> <groupId>org.springframework.boot</groupId>
>>> <artifactId>spring-boot-starter-tomcat</artifactId>
>>> <scope>provided</scope> </dependency> <dependency>
>>> <groupId>org.springframework.boot</groupId>
>>> <artifactId>spring-boot-starter-test</artifactId>
>>> <scope>test</scope> <exclusions> <exclusion>
>>> <groupId>org.junit.vintage</groupId>
>>> <artifactId>junit-vintage-engine</artifactId> </exclusion>
>>> </exclusions> </dependency> </dependencies>
>>>
>>
>>
>> ---------------------------------------------------------------------
>>
>>
To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl76VcYACgkQHPApP6U8
pFg0hw//XS313bw+b+jfbe8cCRwz7DXCoR9DloQ+IgBWnaz+p/VgeMj7ZVOrXtzw
cTyRKzWz5vxHg4aRkY71ONqKPgtPsOC1vR/Cw6r3BFYJ0asD0tlIvGniYJ0BWWeZ
tMpQMwxE21LNNLGP5nK0nPUdrj1KdIjb1GhmAqEfSsF5nEtuwYRsfBWOqL+gPMja
4uxcIbXeq7PuyPvI6m5Nwv/dZ5uVxQZ8zc0FYZf5rURC2w6p01DyPwsfsiHn8Ldf
d+6MdMF2zQLNxacRW2iqDvpgjgoZ57Dto4RkKHJzN5WktnO386/Podw7rGBdaZ8D
vSqw+gF/Lp5wWP3QyQMshOvmUqdrcsI1qHIa+PIQOu0kS4SK39Bc8ccwHcCQorie
jQSc83WNe3Ock4EUjsXAbaC4jHFYWA6ggn32HyaO7lHcMECwfBPxvXsntKE+hRxB
0n5aKfGWLGRDiGevKZXbPUjcAeOwM9knBeoyVXCvyPG7QJ1jymQtapA8vLIl5g/V
tkazXroWb9edKS6SXs6WvbsHwnc6cm8Fvija7HAOIJGbTz0S26q6qyWew/He3MtT
BabV0TTxexOAuiRWU1S0G4Gvm4ZGaRhRh/EQGvCpjUn+MlGVWC9hT8TpbSykW6wf
8vpSWpvAobydsq8YX//tymXn9Ab5ia85Ds0gbyaBOOK75+fez7A=
=fzrm
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Tomcat 9.0.36 - JDK 13/14

Kiran Badi
Hi Mark,  It does not log any errors. Just reverted back to the JDK1.8
version and tried to recreate the issue. I can recreate it. I had a doubt
that the logging configuration might have messed up, so had to create a
sample war file to check this.

Anyone can try this and see if it works for them. Just build a simple
spring boot app with jdk 13/14 and deploy it on the latest tomcat running
on jdk 1.8. Maybe something is messed up in my environment.

Here is console catalina.out log along with same use case classes from
spring site.

29-Jun-2020 20:19:24.852 INFO [main]
org.apache.catalina.startup.VersionLoggerListener.log Server version name:
 Apache Tomcat/9.0.36
29-Jun-2020 20:19:24.854 INFO [main]
org.apache.catalina.startup.VersionLoggerListener.log Server built:
  Jun 3 2020 17:07:09 UTC
29-Jun-2020 20:19:24.854 INFO [main]
org.apache.catalina.startup.VersionLoggerListener.log Server version
number: 9.0.36.0
29-Jun-2020 20:19:24.854 INFO [main]
org.apache.catalina.startup.VersionLoggerListener.log OS Name:
 Windows 10
29-Jun-2020 20:19:24.855 INFO [main]
org.apache.catalina.startup.VersionLoggerListener.log OS Version:
  10.0
29-Jun-2020 20:19:24.855 INFO [main]
org.apache.catalina.startup.VersionLoggerListener.log Architecture:
  amd64
29-Jun-2020 20:19:24.855 INFO [main]
org.apache.catalina.startup.VersionLoggerListener.log Java Home:
 C:\Program Files\Java\jdk1.8.0_221\jre
29-Jun-2020 20:19:24.855 INFO [main]
org.apache.catalina.startup.VersionLoggerListener.log JVM Version:
 1.8.0_221-b11
29-Jun-2020 20:19:24.855 INFO [main]
org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:
  Oracle Corporation
29-Jun-2020 20:19:24.855 INFO [main]
org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:
 C:\Program Files\Apache Software Foundation\apache-tomcat-9.0.36
29-Jun-2020 20:19:24.855 INFO [main]
org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:
 C:\Program Files\Apache Software Foundation\apache-tomcat-9.0.36
29-Jun-2020 20:19:24.856 INFO [main]
org.apache.catalina.startup.VersionLoggerListener.log Command line
argument: -Djava.util.logging.config.file=C:\Program Files\Apache Software
Foundation\apache-tomcat-9.0.36\conf\logging.properties
29-Jun-2020 20:19:24.856 INFO [main]
org.apache.catalina.startup.VersionLoggerListener.log Command line
argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
29-Jun-2020 20:19:24.857 INFO [main]
org.apache.catalina.startup.VersionLoggerListener.log Command line
argument: -Djdk.tls.ephemeralDHKeySize=2048
29-Jun-2020 20:19:24.857 INFO [main]
org.apache.catalina.startup.VersionLoggerListener.log Command line
argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
29-Jun-2020 20:19:24.857 INFO [main]
org.apache.catalina.startup.VersionLoggerListener.log Command line
argument: -Dignore.endorsed.dirs=
29-Jun-2020 20:19:24.857 INFO [main]
org.apache.catalina.startup.VersionLoggerListener.log Command line
argument: -Dcatalina.base=C:\Program Files\Apache Software
Foundation\apache-tomcat-9.0.36
29-Jun-2020 20:19:24.857 INFO [main]
org.apache.catalina.startup.VersionLoggerListener.log Command line
argument: -Dcatalina.home=C:\Program Files\Apache Software
Foundation\apache-tomcat-9.0.36
29-Jun-2020 20:19:24.858 INFO [main]
org.apache.catalina.startup.VersionLoggerListener.log Command line
argument: -Djava.io.tmpdir=C:\Program Files\Apache Software
Foundation\apache-tomcat-9.0.36\temp
29-Jun-2020 20:19:24.860 INFO [main]
org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The Apache
Tomcat Native library which allows using OpenSSL was not found on the
java.library.path: [C:\Program
Files\Java\jdk1.8.0_221\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Python38\Scripts\;C:\Python38\;C:\app\oracle\product\12.2.0\dbhome_1\bin;C:\Python27\;C:\Python27\Scripts;C:\Program
Files (x86)\Common
Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program
Files\Apache Software Foundation\apache-maven-3.3.9\bin;C:\Program
Files\Java\jdk1.8.0_121;C:\Program Files\PuTTY\;C:\Program
Files\Git\cmd;C:\Program Files
(x86)\Calibre2\;C:\WINDOWS\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Program
Files\AdoptOpenJDK\jdk8u192-b12\bin;C:\Program
Files\Java\jdk1.8.0_221\bin;C:\Android\android-sdk\tools;C:\Android\android-sdk\platform-tools;C:\Android\android-sdk\tools\bin;C:\Program
Files\dotnet\;C:\Users\KIRAN\AppData\Local\Microsoft\WindowsApps;C:\Users\KIRAN\AppData\Local\Programs\Fiddler;C:\Users\KIRAN\AppData\Local\Microsoft\WindowsApps;C:\Program
Files\JetBrains\IntelliJ IDEA
2019.1\bin;C:\Users\KIRAN\AppData\Local\Programs\Microsoft VS
Code\bin;C:\Users\KIRAN\Ap;C:\Program
Files\nodejs\;C:\Users\KIRAN\scoop\shims;C:\Users\KIRAN\AppData\Local\Microsoft\WindowsApps;;C:\Users\KIRAN\AppData\Local\Programs\Fiddler;C:\Users\KIRAN\AppData\Local\Microsoft\WindowsApps;C:\Program
Files\JetBrains\IntelliJ IDEA
2019.1\bin;;C:\Users\KIRAN\AppData\Local\Programs\Microsoft VS
Code\bin;C:\Program Files\JetBrains\WebStorm 2019.2.3\bin;;C:\Program
Files\JetBrains\WebStorm 2020.1.2\bin;;C:\Users\KIRAN\AppData\Roaming\npm;.]
29-Jun-2020 20:19:25.127 INFO [main]
org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler
["http-nio-8080"]
29-Jun-2020 20:19:25.331 INFO [main]
org.apache.catalina.startup.Catalina.load Server initialization in [652]
milliseconds
29-Jun-2020 20:19:25.353 INFO [main]
org.apache.catalina.core.StandardService.startInternal Starting service
[Catalina]
29-Jun-2020 20:19:25.353 INFO [main]
org.apache.catalina.core.StandardEngine.startInternal Starting Servlet
engine: [Apache Tomcat/9.0.36]
29-Jun-2020 20:19:25.371 INFO [main]
org.apache.catalina.startup.HostConfig.deployWAR Deploying web application
archive [C:\Program Files\Apache Software
Foundation\apache-tomcat-9.0.36\webapps\listngrow.war]
29-Jun-2020 20:19:29.931 INFO [main]
org.apache.jasper.servlet.TldScanner.scanJars 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 during scanning can improve startup time and JSP
compilation time.
29-Jun-2020 20:19:30.010 INFO [main]
org.apache.catalina.startup.HostConfig.deployWAR Deployment of web
application archive [C:\Program Files\Apache Software
Foundation\apache-tomcat-9.0.36\webapps\listngrow.war] has finished in
[4,639] ms
29-Jun-2020 20:19:30.013 INFO [main]
org.apache.catalina.startup.HostConfig.deployWAR Deploying web application
archive [C:\Program Files\Apache Software
Foundation\apache-tomcat-9.0.36\webapps\springwar-1.0.1-SNAPSHOT.war]
29-Jun-2020 20:19:31.498 INFO [main]
org.apache.jasper.servlet.TldScanner.scanJars 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 during scanning can improve startup time and JSP
compilation time.
29-Jun-2020 20:19:34.461 INFO [main]
org.apache.catalina.startup.HostConfig.deployWAR Deployment of web
application archive [C:\Program Files\Apache Software
Foundation\apache-tomcat-9.0.36\webapps\springwar-1.0.1-SNAPSHOT.war] has
finished in [4,448] ms
29-Jun-2020 20:19:34.462 INFO [main]
org.apache.catalina.startup.HostConfig.deployWAR Deploying web application
archive [C:\Program Files\Apache Software
Foundation\apache-tomcat-9.0.36\webapps\springwar-1.0.2-SNAPSHOT.war]
29-Jun-2020 20:19:35.950 INFO [main]
org.apache.jasper.servlet.TldScanner.scanJars 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 during scanning can improve startup time and JSP
compilation time.
29-Jun-2020 20:19:36.039 INFO [main]
org.apache.catalina.startup.HostConfig.deployWAR Deployment of web
application archive [C:\Program Files\Apache Software
Foundation\apache-tomcat-9.0.36\webapps\springwar-1.0.2-SNAPSHOT.war] has
finished in [1,577] ms
29-Jun-2020 20:19:36.040 INFO [main]
org.apache.catalina.startup.HostConfig.deployDirectory Deploying web
application directory [C:\Program Files\Apache Software
Foundation\apache-tomcat-9.0.36\webapps\docs]
29-Jun-2020 20:19:36.072 INFO [main]
org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web
application directory [C:\Program Files\Apache Software
Foundation\apache-tomcat-9.0.36\webapps\docs] has finished in [32] ms
29-Jun-2020 20:19:36.072 INFO [main]
org.apache.catalina.startup.HostConfig.deployDirectory Deploying web
application directory [C:\Program Files\Apache Software
Foundation\apache-tomcat-9.0.36\webapps\examples]
29-Jun-2020 20:19:37.237 INFO [main]
org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web
application directory [C:\Program Files\Apache Software
Foundation\apache-tomcat-9.0.36\webapps\examples] has finished in [1,165] ms
29-Jun-2020 20:19:37.237 INFO [main]
org.apache.catalina.startup.HostConfig.deployDirectory Deploying web
application directory [C:\Program Files\Apache Software
Foundation\apache-tomcat-9.0.36\webapps\host-manager]
29-Jun-2020 20:19:37.275 INFO [main]
org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web
application directory [C:\Program Files\Apache Software
Foundation\apache-tomcat-9.0.36\webapps\host-manager] has finished in [38]
ms
29-Jun-2020 20:19:37.276 INFO [main]
org.apache.catalina.startup.HostConfig.deployDirectory Deploying web
application directory [C:\Program Files\Apache Software
Foundation\apache-tomcat-9.0.36\webapps\manager]
29-Jun-2020 20:19:37.321 INFO [main]
org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web
application directory [C:\Program Files\Apache Software
Foundation\apache-tomcat-9.0.36\webapps\manager] has finished in [45] ms
29-Jun-2020 20:19:37.322 INFO [main]
org.apache.catalina.startup.HostConfig.deployDirectory Deploying web
application directory [C:\Program Files\Apache Software
Foundation\apache-tomcat-9.0.36\webapps\ROOT]
29-Jun-2020 20:19:37.353 INFO [main]
org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web
application directory [C:\Program Files\Apache Software
Foundation\apache-tomcat-9.0.36\webapps\ROOT] has finished in [31] ms
29-Jun-2020 20:19:37.356 INFO [main]
org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler
["http-nio-8080"]
29-Jun-2020 20:19:37.363 INFO [main]
org.apache.catalina.startup.Catalina.start Server startup in [12,032]
milliseconds

springwar-1.0.1-SNAPSHOT is build with JDK 14.01 and its demo war just to
troubleshoot this issue. POM for it as below.

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.1.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.kiran</groupId>
<artifactId>springwar</artifactId>
<version>1.0.2-SNAPSHOT</version>
<packaging>war</packaging>
<name>springwar</name>
<description>Sample project to deploy war to tomcat</description>

<properties>
<java.version>14</java.version>
</properties>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

</project>

Sample test cases are as below.


public class Greeting {

private final long id;
private final String content;

public Greeting(long id, String content) {
this.id = id;
this.content = content;
}

public long getId() {
return id;
}

public String getContent() {
return content;
}
}

import java.util.concurrent.atomic.AtomicLong;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {

private static final String template = "Hello, %s!";
private final AtomicLong counter = new AtomicLong();

@GetMapping("/greeting")
public Greeting greeting(@RequestParam(value = "name", defaultValue =
"World") String name) {
return new Greeting(counter.incrementAndGet(), String.format(template,
name));
}
}


import org.springframework.boot.builder.SpringApplicationBuilder;
import
org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

public class ServletInitializer extends SpringBootServletInitializer {

@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder
application) {
return application.sources(SpringwarApplication.class);
}

}


import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class SpringwarApplication {

public static void main(String[] args) {
SpringApplication.run(SpringwarApplication.class, args);
}

}





On Mon, Jun 29, 2020 at 4:57 PM Christopher Schultz <
[hidden email]> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Kiran,
>
> On 6/26/20 22:01, Kiran Badi wrote:
> > we fixed the issue Mark.
> >
> > Actually tomcat was running on JDK 1.8 and applications were built
> > using JDK 13/14.So when they were deployed to tomcat running with
> > 1.8, they were giving 404.
> >
> > Now plan is to explore and upgrade tomcat to at least jdk 13.
> >
> > It would have been nice really to have at least some error saying
> > major.minor version exception or something like that in some logs
> > somewhere which java often throws in these cases.
> >
> > Any ways we are good to go now. Thanks for your reply.
>
> My experience is that mismatched .class file versions do just that:
> they result in errors being logged to stdout / catalina.out.
>
> Perhaps you have a logging configuration which disables that?
>
> - -chris
>
> > On Fri, Jun 26, 2020 at 6:34 AM Mark Thomas <[hidden email]>
> > wrote:
> >
> >> On 26/06/2020 05:45, Kiran Badi wrote:
> >>> Hi All,
> >>>
> >>> I wanted to check if tomcat 9.0.36 supports open jdk 13/14.
> >>
> >> Supported Java versions are listed at:
> >> http://tomcat.apache.org/whichversion.html
> >>
> >> "Java 8 and later" includes Java 13 and Java 14.
> >>
> >>> I created a simple spring boot war file and compiled/built it
> >>> with
> >> openjdk
> >>> 13/14. After running maven install , I deployed the war file
> >>> from the target directory to tomcat webapps using tomcat
> >>> manager. It did not work and gave me 404 messages with both
> >>> 13/14. No error or any exception anywhere in logs.Catalina log
> >>> just says a war file is deployed.
> >>
> >> That is normally indicative of a configuration error.
> >>
> >>> Then i compiled the same spring boot app with jdk 8 and
> >>> deployed it with tomcat and it works fine. I am able to call my
> >>> endpoints with no issues.
> >>>
> >>> I am having a hard time deploying angular/spring boot and
> >>> building war
> >> file
> >>> and deploying it on tomcat 9.0x with openjdk 13. So I thought
> >>> this might
> >> be
> >>> a good place to start with.
> >>
> >> If you can provide the code you use to create the sample, e.g. as
> >> a GitHub project somebody may be able to take a look.
> >>
> >> Mark
> >>
> >>>
> >>> I used the below pom file.
> >>>
> >>> <?xml version="1.0" encoding="UTF-8"?> <project
> >>> xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
> >>> http://www.w3.org/2001/XMLSchema-instance"
> >>> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> >>> https://maven.apache.org/xsd/maven-4.0.0.xsd">
> >>> <modelVersion>4.0.0</modelVersion> <parent>
> >>> <groupId>org.springframework.boot</groupId>
> >>> <artifactId>spring-boot-starter-parent</artifactId>
> >>> <version>2.3.1.RELEASE</version> <relativePath/> <!-- lookup
> >>> parent from repository --> </parent>
> >>> <groupId>com.kiran</groupId>
> >>> <artifactId>springwar</artifactId>
> >>> <version>1.0.2-SNAPSHOT</version> <packaging>war</packaging>
> >>> <name>springwar</name> <description>Sample project to deploy
> >>> war to tomcat</description>
> >>>
> >>> <properties> <java.version>14</java.version> </properties>
> >>>
> >>> <dependencies> <dependency>
> >>> <groupId>org.springframework.boot</groupId>
> >>> <artifactId>spring-boot-starter-web</artifactId> </dependency>
> >>>
> >>> <dependency> <groupId>org.springframework.boot</groupId>
> >>> <artifactId>spring-boot-starter-tomcat</artifactId>
> >>> <scope>provided</scope> </dependency> <dependency>
> >>> <groupId>org.springframework.boot</groupId>
> >>> <artifactId>spring-boot-starter-test</artifactId>
> >>> <scope>test</scope> <exclusions> <exclusion>
> >>> <groupId>org.junit.vintage</groupId>
> >>> <artifactId>junit-vintage-engine</artifactId> </exclusion>
> >>> </exclusions> </dependency> </dependencies>
> >>>
> >>
> >>
> >> ---------------------------------------------------------------------
> >>
> >>
> To unsubscribe, e-mail: [hidden email]
> >> For additional commands, e-mail: [hidden email]
> >>
> >>
> >
> -----BEGIN PGP SIGNATURE-----
> Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
>
> iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl76VcYACgkQHPApP6U8
> pFg0hw//XS313bw+b+jfbe8cCRwz7DXCoR9DloQ+IgBWnaz+p/VgeMj7ZVOrXtzw
> cTyRKzWz5vxHg4aRkY71ONqKPgtPsOC1vR/Cw6r3BFYJ0asD0tlIvGniYJ0BWWeZ
> tMpQMwxE21LNNLGP5nK0nPUdrj1KdIjb1GhmAqEfSsF5nEtuwYRsfBWOqL+gPMja
> 4uxcIbXeq7PuyPvI6m5Nwv/dZ5uVxQZ8zc0FYZf5rURC2w6p01DyPwsfsiHn8Ldf
> d+6MdMF2zQLNxacRW2iqDvpgjgoZ57Dto4RkKHJzN5WktnO386/Podw7rGBdaZ8D
> vSqw+gF/Lp5wWP3QyQMshOvmUqdrcsI1qHIa+PIQOu0kS4SK39Bc8ccwHcCQorie
> jQSc83WNe3Ock4EUjsXAbaC4jHFYWA6ggn32HyaO7lHcMECwfBPxvXsntKE+hRxB
> 0n5aKfGWLGRDiGevKZXbPUjcAeOwM9knBeoyVXCvyPG7QJ1jymQtapA8vLIl5g/V
> tkazXroWb9edKS6SXs6WvbsHwnc6cm8Fvija7HAOIJGbTz0S26q6qyWew/He3MtT
> BabV0TTxexOAuiRWU1S0G4Gvm4ZGaRhRh/EQGvCpjUn+MlGVWC9hT8TpbSykW6wf
> 8vpSWpvAobydsq8YX//tymXn9Ab5ia85Ds0gbyaBOOK75+fez7A=
> =fzrm
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Tomcat 9.0.36 - JDK 13/14

Utkarsh Bhargav
Please i have resolved my issue Kindly stop sending mails

On Tue, 30 Jun, 2020, 5:53 AM Kiran Badi, <[hidden email]> wrote:

> Hi Mark,  It does not log any errors. Just reverted back to the JDK1.8
> version and tried to recreate the issue. I can recreate it. I had a doubt
> that the logging configuration might have messed up, so had to create a
> sample war file to check this.
>
> Anyone can try this and see if it works for them. Just build a simple
> spring boot app with jdk 13/14 and deploy it on the latest tomcat running
> on jdk 1.8. Maybe something is messed up in my environment.
>
> Here is console catalina.out log along with same use case classes from
> spring site.
>
> 29-Jun-2020 20:19:24.852 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Server version name:
>  Apache Tomcat/9.0.36
> 29-Jun-2020 20:19:24.854 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Server built:
>   Jun 3 2020 17:07:09 UTC
> 29-Jun-2020 20:19:24.854 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Server version
> number: 9.0.36.0
> 29-Jun-2020 20:19:24.854 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log OS Name:
>  Windows 10
> 29-Jun-2020 20:19:24.855 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log OS Version:
>   10.0
> 29-Jun-2020 20:19:24.855 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Architecture:
>   amd64
> 29-Jun-2020 20:19:24.855 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Java Home:
>  C:\Program Files\Java\jdk1.8.0_221\jre
> 29-Jun-2020 20:19:24.855 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log JVM Version:
>  1.8.0_221-b11
> 29-Jun-2020 20:19:24.855 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:
>   Oracle Corporation
> 29-Jun-2020 20:19:24.855 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:
>  C:\Program Files\Apache Software Foundation\apache-tomcat-9.0.36
> 29-Jun-2020 20:19:24.855 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:
>  C:\Program Files\Apache Software Foundation\apache-tomcat-9.0.36
> 29-Jun-2020 20:19:24.856 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Command line
> argument: -Djava.util.logging.config.file=C:\Program Files\Apache Software
> Foundation\apache-tomcat-9.0.36\conf\logging.properties
> 29-Jun-2020 20:19:24.856 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Command line
> argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
> 29-Jun-2020 20:19:24.857 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Command line
> argument: -Djdk.tls.ephemeralDHKeySize=2048
> 29-Jun-2020 20:19:24.857 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Command line
> argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
> 29-Jun-2020 20:19:24.857 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Command line
> argument: -Dignore.endorsed.dirs=
> 29-Jun-2020 20:19:24.857 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Command line
> argument: -Dcatalina.base=C:\Program Files\Apache Software
> Foundation\apache-tomcat-9.0.36
> 29-Jun-2020 20:19:24.857 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Command line
> argument: -Dcatalina.home=C:\Program Files\Apache Software
> Foundation\apache-tomcat-9.0.36
> 29-Jun-2020 20:19:24.858 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Command line
> argument: -Djava.io.tmpdir=C:\Program Files\Apache Software
> Foundation\apache-tomcat-9.0.36\temp
> 29-Jun-2020 20:19:24.860 INFO [main]
> org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The Apache
> Tomcat Native library which allows using OpenSSL was not found on the
> java.library.path: [C:\Program
>
> Files\Java\jdk1.8.0_221\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Python38\Scripts\;C:\Python38\;C:\app\oracle\product\12.2.0\dbhome_1\bin;C:\Python27\;C:\Python27\Scripts;C:\Program
> Files (x86)\Common
>
> Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program
> Files\Apache Software Foundation\apache-maven-3.3.9\bin;C:\Program
> Files\Java\jdk1.8.0_121;C:\Program Files\PuTTY\;C:\Program
> Files\Git\cmd;C:\Program Files
>
> (x86)\Calibre2\;C:\WINDOWS\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Program
> Files\AdoptOpenJDK\jdk8u192-b12\bin;C:\Program
>
> Files\Java\jdk1.8.0_221\bin;C:\Android\android-sdk\tools;C:\Android\android-sdk\platform-tools;C:\Android\android-sdk\tools\bin;C:\Program
>
> Files\dotnet\;C:\Users\KIRAN\AppData\Local\Microsoft\WindowsApps;C:\Users\KIRAN\AppData\Local\Programs\Fiddler;C:\Users\KIRAN\AppData\Local\Microsoft\WindowsApps;C:\Program
> Files\JetBrains\IntelliJ IDEA
> 2019.1\bin;C:\Users\KIRAN\AppData\Local\Programs\Microsoft VS
> Code\bin;C:\Users\KIRAN\Ap;C:\Program
>
> Files\nodejs\;C:\Users\KIRAN\scoop\shims;C:\Users\KIRAN\AppData\Local\Microsoft\WindowsApps;;C:\Users\KIRAN\AppData\Local\Programs\Fiddler;C:\Users\KIRAN\AppData\Local\Microsoft\WindowsApps;C:\Program
> Files\JetBrains\IntelliJ IDEA
> 2019.1\bin;;C:\Users\KIRAN\AppData\Local\Programs\Microsoft VS
> Code\bin;C:\Program Files\JetBrains\WebStorm 2019.2.3\bin;;C:\Program
> Files\JetBrains\WebStorm
> 2020.1.2\bin;;C:\Users\KIRAN\AppData\Roaming\npm;.]
> 29-Jun-2020 20:19:25.127 INFO [main]
> org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler
> ["http-nio-8080"]
> 29-Jun-2020 20:19:25.331 INFO [main]
> org.apache.catalina.startup.Catalina.load Server initialization in [652]
> milliseconds
> 29-Jun-2020 20:19:25.353 INFO [main]
> org.apache.catalina.core.StandardService.startInternal Starting service
> [Catalina]
> 29-Jun-2020 20:19:25.353 INFO [main]
> org.apache.catalina.core.StandardEngine.startInternal Starting Servlet
> engine: [Apache Tomcat/9.0.36]
> 29-Jun-2020 20:19:25.371 INFO [main]
> org.apache.catalina.startup.HostConfig.deployWAR Deploying web application
> archive [C:\Program Files\Apache Software
> Foundation\apache-tomcat-9.0.36\webapps\listngrow.war]
> 29-Jun-2020 20:19:29.931 INFO [main]
> org.apache.jasper.servlet.TldScanner.scanJars 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 during scanning can improve startup time and JSP
> compilation time.
> 29-Jun-2020 20:19:30.010 INFO [main]
> org.apache.catalina.startup.HostConfig.deployWAR Deployment of web
> application archive [C:\Program Files\Apache Software
> Foundation\apache-tomcat-9.0.36\webapps\listngrow.war] has finished in
> [4,639] ms
> 29-Jun-2020 20:19:30.013 INFO [main]
> org.apache.catalina.startup.HostConfig.deployWAR Deploying web application
> archive [C:\Program Files\Apache Software
> Foundation\apache-tomcat-9.0.36\webapps\springwar-1.0.1-SNAPSHOT.war]
> 29-Jun-2020 20:19:31.498 INFO [main]
> org.apache.jasper.servlet.TldScanner.scanJars 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 during scanning can improve startup time and JSP
> compilation time.
> 29-Jun-2020 20:19:34.461 INFO [main]
> org.apache.catalina.startup.HostConfig.deployWAR Deployment of web
> application archive [C:\Program Files\Apache Software
> Foundation\apache-tomcat-9.0.36\webapps\springwar-1.0.1-SNAPSHOT.war] has
> finished in [4,448] ms
> 29-Jun-2020 20:19:34.462 INFO [main]
> org.apache.catalina.startup.HostConfig.deployWAR Deploying web application
> archive [C:\Program Files\Apache Software
> Foundation\apache-tomcat-9.0.36\webapps\springwar-1.0.2-SNAPSHOT.war]
> 29-Jun-2020 20:19:35.950 INFO [main]
> org.apache.jasper.servlet.TldScanner.scanJars 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 during scanning can improve startup time and JSP
> compilation time.
> 29-Jun-2020 20:19:36.039 INFO [main]
> org.apache.catalina.startup.HostConfig.deployWAR Deployment of web
> application archive [C:\Program Files\Apache Software
> Foundation\apache-tomcat-9.0.36\webapps\springwar-1.0.2-SNAPSHOT.war] has
> finished in [1,577] ms
> 29-Jun-2020 20:19:36.040 INFO [main]
> org.apache.catalina.startup.HostConfig.deployDirectory Deploying web
> application directory [C:\Program Files\Apache Software
> Foundation\apache-tomcat-9.0.36\webapps\docs]
> 29-Jun-2020 20:19:36.072 INFO [main]
> org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web
> application directory [C:\Program Files\Apache Software
> Foundation\apache-tomcat-9.0.36\webapps\docs] has finished in [32] ms
> 29-Jun-2020 20:19:36.072 INFO [main]
> org.apache.catalina.startup.HostConfig.deployDirectory Deploying web
> application directory [C:\Program Files\Apache Software
> Foundation\apache-tomcat-9.0.36\webapps\examples]
> 29-Jun-2020 20:19:37.237 INFO [main]
> org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web
> application directory [C:\Program Files\Apache Software
> Foundation\apache-tomcat-9.0.36\webapps\examples] has finished in [1,165]
> ms
> 29-Jun-2020 20:19:37.237 INFO [main]
> org.apache.catalina.startup.HostConfig.deployDirectory Deploying web
> application directory [C:\Program Files\Apache Software
> Foundation\apache-tomcat-9.0.36\webapps\host-manager]
> 29-Jun-2020 20:19:37.275 INFO [main]
> org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web
> application directory [C:\Program Files\Apache Software
> Foundation\apache-tomcat-9.0.36\webapps\host-manager] has finished in [38]
> ms
> 29-Jun-2020 20:19:37.276 INFO [main]
> org.apache.catalina.startup.HostConfig.deployDirectory Deploying web
> application directory [C:\Program Files\Apache Software
> Foundation\apache-tomcat-9.0.36\webapps\manager]
> 29-Jun-2020 20:19:37.321 INFO [main]
> org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web
> application directory [C:\Program Files\Apache Software
> Foundation\apache-tomcat-9.0.36\webapps\manager] has finished in [45] ms
> 29-Jun-2020 20:19:37.322 INFO [main]
> org.apache.catalina.startup.HostConfig.deployDirectory Deploying web
> application directory [C:\Program Files\Apache Software
> Foundation\apache-tomcat-9.0.36\webapps\ROOT]
> 29-Jun-2020 20:19:37.353 INFO [main]
> org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web
> application directory [C:\Program Files\Apache Software
> Foundation\apache-tomcat-9.0.36\webapps\ROOT] has finished in [31] ms
> 29-Jun-2020 20:19:37.356 INFO [main]
> org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler
> ["http-nio-8080"]
> 29-Jun-2020 20:19:37.363 INFO [main]
> org.apache.catalina.startup.Catalina.start Server startup in [12,032]
> milliseconds
>
> springwar-1.0.1-SNAPSHOT is build with JDK 14.01 and its demo war just to
> troubleshoot this issue. POM for it as below.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> https://maven.apache.org/xsd/maven-4.0.0.xsd">
> <modelVersion>4.0.0</modelVersion>
> <parent>
> <groupId>org.springframework.boot</groupId>
> <artifactId>spring-boot-starter-parent</artifactId>
> <version>2.3.1.RELEASE</version>
> <relativePath/> <!-- lookup parent from repository -->
> </parent>
> <groupId>com.kiran</groupId>
> <artifactId>springwar</artifactId>
> <version>1.0.2-SNAPSHOT</version>
> <packaging>war</packaging>
> <name>springwar</name>
> <description>Sample project to deploy war to tomcat</description>
>
> <properties>
> <java.version>14</java.version>
> </properties>
>
> <dependencies>
> <dependency>
> <groupId>org.springframework.boot</groupId>
> <artifactId>spring-boot-starter-web</artifactId>
> </dependency>
>
> <dependency>
> <groupId>org.springframework.boot</groupId>
> <artifactId>spring-boot-starter-tomcat</artifactId>
> <scope>provided</scope>
> </dependency>
> <dependency>
> <groupId>org.springframework.boot</groupId>
> <artifactId>spring-boot-starter-test</artifactId>
> <scope>test</scope>
> <exclusions>
> <exclusion>
> <groupId>org.junit.vintage</groupId>
> <artifactId>junit-vintage-engine</artifactId>
> </exclusion>
> </exclusions>
> </dependency>
> </dependencies>
>
> <build>
> <plugins>
> <plugin>
> <groupId>org.springframework.boot</groupId>
> <artifactId>spring-boot-maven-plugin</artifactId>
> </plugin>
> </plugins>
> </build>
>
> </project>
>
> Sample test cases are as below.
>
>
> public class Greeting {
>
> private final long id;
> private final String content;
>
> public Greeting(long id, String content) {
> this.id = id;
> this.content = content;
> }
>
> public long getId() {
> return id;
> }
>
> public String getContent() {
> return content;
> }
> }
>
> import java.util.concurrent.atomic.AtomicLong;
>
> import org.springframework.web.bind.annotation.GetMapping;
> import org.springframework.web.bind.annotation.RequestParam;
> import org.springframework.web.bind.annotation.RestController;
>
> @RestController
> public class TestController {
>
> private static final String template = "Hello, %s!";
> private final AtomicLong counter = new AtomicLong();
>
> @GetMapping("/greeting")
> public Greeting greeting(@RequestParam(value = "name", defaultValue =
> "World") String name) {
> return new Greeting(counter.incrementAndGet(), String.format(template,
> name));
> }
> }
>
>
> import org.springframework.boot.builder.SpringApplicationBuilder;
> import
> org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
>
> public class ServletInitializer extends SpringBootServletInitializer {
>
> @Override
> protected SpringApplicationBuilder configure(SpringApplicationBuilder
> application) {
> return application.sources(SpringwarApplication.class);
> }
>
> }
>
>
> import org.springframework.boot.SpringApplication;
> import org.springframework.boot.autoconfigure.SpringBootApplication;
>
> @SpringBootApplication
> public class SpringwarApplication {
>
> public static void main(String[] args) {
> SpringApplication.run(SpringwarApplication.class, args);
> }
>
> }
>
>
>
>
>
> On Mon, Jun 29, 2020 at 4:57 PM Christopher Schultz <
> [hidden email]> wrote:
>
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA256
> >
> > Kiran,
> >
> > On 6/26/20 22:01, Kiran Badi wrote:
> > > we fixed the issue Mark.
> > >
> > > Actually tomcat was running on JDK 1.8 and applications were built
> > > using JDK 13/14.So when they were deployed to tomcat running with
> > > 1.8, they were giving 404.
> > >
> > > Now plan is to explore and upgrade tomcat to at least jdk 13.
> > >
> > > It would have been nice really to have at least some error saying
> > > major.minor version exception or something like that in some logs
> > > somewhere which java often throws in these cases.
> > >
> > > Any ways we are good to go now. Thanks for your reply.
> >
> > My experience is that mismatched .class file versions do just that:
> > they result in errors being logged to stdout / catalina.out.
> >
> > Perhaps you have a logging configuration which disables that?
> >
> > - -chris
> >
> > > On Fri, Jun 26, 2020 at 6:34 AM Mark Thomas <[hidden email]>
> > > wrote:
> > >
> > >> On 26/06/2020 05:45, Kiran Badi wrote:
> > >>> Hi All,
> > >>>
> > >>> I wanted to check if tomcat 9.0.36 supports open jdk 13/14.
> > >>
> > >> Supported Java versions are listed at:
> > >> http://tomcat.apache.org/whichversion.html
> > >>
> > >> "Java 8 and later" includes Java 13 and Java 14.
> > >>
> > >>> I created a simple spring boot war file and compiled/built it
> > >>> with
> > >> openjdk
> > >>> 13/14. After running maven install , I deployed the war file
> > >>> from the target directory to tomcat webapps using tomcat
> > >>> manager. It did not work and gave me 404 messages with both
> > >>> 13/14. No error or any exception anywhere in logs.Catalina log
> > >>> just says a war file is deployed.
> > >>
> > >> That is normally indicative of a configuration error.
> > >>
> > >>> Then i compiled the same spring boot app with jdk 8 and
> > >>> deployed it with tomcat and it works fine. I am able to call my
> > >>> endpoints with no issues.
> > >>>
> > >>> I am having a hard time deploying angular/spring boot and
> > >>> building war
> > >> file
> > >>> and deploying it on tomcat 9.0x with openjdk 13. So I thought
> > >>> this might
> > >> be
> > >>> a good place to start with.
> > >>
> > >> If you can provide the code you use to create the sample, e.g. as
> > >> a GitHub project somebody may be able to take a look.
> > >>
> > >> Mark
> > >>
> > >>>
> > >>> I used the below pom file.
> > >>>
> > >>> <?xml version="1.0" encoding="UTF-8"?> <project
> > >>> xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
> > >>> http://www.w3.org/2001/XMLSchema-instance"
> > >>> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> > >>> https://maven.apache.org/xsd/maven-4.0.0.xsd">
> > >>> <modelVersion>4.0.0</modelVersion> <parent>
> > >>> <groupId>org.springframework.boot</groupId>
> > >>> <artifactId>spring-boot-starter-parent</artifactId>
> > >>> <version>2.3.1.RELEASE</version> <relativePath/> <!-- lookup
> > >>> parent from repository --> </parent>
> > >>> <groupId>com.kiran</groupId>
> > >>> <artifactId>springwar</artifactId>
> > >>> <version>1.0.2-SNAPSHOT</version> <packaging>war</packaging>
> > >>> <name>springwar</name> <description>Sample project to deploy
> > >>> war to tomcat</description>
> > >>>
> > >>> <properties> <java.version>14</java.version> </properties>
> > >>>
> > >>> <dependencies> <dependency>
> > >>> <groupId>org.springframework.boot</groupId>
> > >>> <artifactId>spring-boot-starter-web</artifactId> </dependency>
> > >>>
> > >>> <dependency> <groupId>org.springframework.boot</groupId>
> > >>> <artifactId>spring-boot-starter-tomcat</artifactId>
> > >>> <scope>provided</scope> </dependency> <dependency>
> > >>> <groupId>org.springframework.boot</groupId>
> > >>> <artifactId>spring-boot-starter-test</artifactId>
> > >>> <scope>test</scope> <exclusions> <exclusion>
> > >>> <groupId>org.junit.vintage</groupId>
> > >>> <artifactId>junit-vintage-engine</artifactId> </exclusion>
> > >>> </exclusions> </dependency> </dependencies>
> > >>>
> > >>
> > >>
> > >> ---------------------------------------------------------------------
> > >>
> > >>
> > To unsubscribe, e-mail: [hidden email]
> > >> For additional commands, e-mail: [hidden email]
> > >>
> > >>
> > >
> > -----BEGIN PGP SIGNATURE-----
> > Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
> >
> > iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl76VcYACgkQHPApP6U8
> > pFg0hw//XS313bw+b+jfbe8cCRwz7DXCoR9DloQ+IgBWnaz+p/VgeMj7ZVOrXtzw
> > cTyRKzWz5vxHg4aRkY71ONqKPgtPsOC1vR/Cw6r3BFYJ0asD0tlIvGniYJ0BWWeZ
> > tMpQMwxE21LNNLGP5nK0nPUdrj1KdIjb1GhmAqEfSsF5nEtuwYRsfBWOqL+gPMja
> > 4uxcIbXeq7PuyPvI6m5Nwv/dZ5uVxQZ8zc0FYZf5rURC2w6p01DyPwsfsiHn8Ldf
> > d+6MdMF2zQLNxacRW2iqDvpgjgoZ57Dto4RkKHJzN5WktnO386/Podw7rGBdaZ8D
> > vSqw+gF/Lp5wWP3QyQMshOvmUqdrcsI1qHIa+PIQOu0kS4SK39Bc8ccwHcCQorie
> > jQSc83WNe3Ock4EUjsXAbaC4jHFYWA6ggn32HyaO7lHcMECwfBPxvXsntKE+hRxB
> > 0n5aKfGWLGRDiGevKZXbPUjcAeOwM9knBeoyVXCvyPG7QJ1jymQtapA8vLIl5g/V
> > tkazXroWb9edKS6SXs6WvbsHwnc6cm8Fvija7HAOIJGbTz0S26q6qyWew/He3MtT
> > BabV0TTxexOAuiRWU1S0G4Gvm4ZGaRhRh/EQGvCpjUn+MlGVWC9hT8TpbSykW6wf
> > 8vpSWpvAobydsq8YX//tymXn9Ab5ia85Ds0gbyaBOOK75+fez7A=
> > =fzrm
> > -----END PGP SIGNATURE-----
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Tomcat 9.0.36 - JDK 13/14

André Warnier (tomcat/perl)

On 02.07.2020 10:23, Utkarsh Bhargav wrote:
> Please i have resolved my issue Kindly stop sending mails
>

Hi. You receive these emails because you subscribed to the email list
"[hidden email]".
To not receive these emails anymore, you should unsubscribe from the list, be sending an
email (from the same email address which you used to subscribe), *as indicated at the end
of every email that you receive from the list*.
(including this one)

[...]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]