war file fails to deploy

Questions and Answers on installation, deployment, management, locking, tranasactions of Servoy Application Server

war file fails to deploy

Postby pitc » Mon Apr 12, 2021 5:45 pm

I have installed TomCat 10.0.5 successfully on windows 10.
I exported my war file and it is successfully uploaded (after changing the size to more than the 50MB initial size) and deployed.
The attempt to start the war file fails due to:
12-Apr-2021 10:19:34.537 SEVERE [http-nio-8185-exec-5] org.apache.catalina.core.StandardContext.listenerStart Error configuring application listener of class [com.servoy.j2db.server.servlets.WarClientServletContextListener]
java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener

(this is from the log file: ...TomCat 10.0\logs\localhost.2021-04-12.log).
The class javax/servlet/ServletContextListener is found here:
...TomCat 10.0\lib\servlet-api.jar

So not sure why it cannot be found.
Tomcat detected the jre at: C:\Program Files\Java\jre1.8.0_281
Is this not compatible with the war propduced from Servoy 2021.03.3642?
Any other ideas to examine are much appreciated (and yes this is the first time attempting to set up Tomcat and export a war file!).
Tom
Tom
prospect-saas.com
pitc
 
Posts: 115
Joined: Thu Nov 14, 2019 2:22 pm
Location: Ottawa, Ontario, Canada

Re: war file fails to deploy

Postby pitc » Tue Apr 13, 2021 11:57 pm

Not sure if this causes the problem or not: in Servoy 2021.3.3643 when exporting a solution to a war there is a step that has a file chooser to get a context.xml file to include in the war file. Is it required to provide one?
Tom
prospect-saas.com
pitc
 
Posts: 115
Joined: Thu Nov 14, 2019 2:22 pm
Location: Ottawa, Ontario, Canada

Re: war file fails to deploy

Postby jcompagner » Wed Apr 14, 2021 9:07 am

no, that is not mandatory,

But your problem is Tomcat 10, that is completely different because of package renames (javax.servlet.Xxxxx -> jakarata.xxxxx)
if you want to use Tomcat 10 you need to use: https://github.com/apache/tomcat-jakartaee-migration

and first migrate the generated WAR
Or stick to Tomcat 9.x for the foreseeable future (that will also be alive and maintained for the coming years)
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: war file fails to deploy

Postby pitc » Wed Apr 14, 2021 4:06 pm

Thanks Johan,
I had not realized the change in the JavaEE namespace to Jakarta.
I did try the migration tool and the war file deploys ok now.
However when run the Servoy app I get an unsigned application error.
I then downloaded and installed Tomcat 9, deployed same Servoy app and it runs without any unsigned application errors.
(For others I was using the svySecurityConsole as the test app. Now I get other errors like the dataservice not running - but that must be the way I attempted to create the war file).
Tom
prospect-saas.com
pitc
 
Posts: 115
Joined: Thu Nov 14, 2019 2:22 pm
Location: Ottawa, Ontario, Canada

Re: war file fails to deploy

Postby jcompagner » Wed Apr 14, 2021 4:26 pm

that could be a problem yes, because the migration tool adjusts the jar files inside the war,
so all the jar files that are signed are suddenly not signed anymore (or at least the signing is broken)

but for now just stick to Tomcat9 (Servlet spec 4.0)
because the only change in the spec of 5.0 is the package rename: https://jakarta.ee/specifications/servl ... ervlet-4-0

So as long as Tomcat 9 will be supported (or any other 4.0 container) there is no need to go to 10 because that doesn't bring anything.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: war file fails to deploy

Postby ryan1680098789 » Wed May 17, 2023 9:58 pm

just wanted to confirm that as of 2023, is continuing use of Tomcat 9 the only real solution here? or are there plans to migrate to Tomcat 10?
ryan1680098789
 
Posts: 13
Joined: Wed Mar 29, 2023 4:06 pm

Re: war file fails to deploy

Postby ROCLASI » Thu May 18, 2023 6:16 pm

Hi Ryan,

Just wondering. What do you need that is not in version 9?
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: war file fails to deploy

Postby jcompagner » Mon May 22, 2023 12:10 pm

there are currently no plans to go to tomcat 10 (by default)
As i said above with the converter tool you should be able to work on tomcat 10 or higher

But the shipping version of Servoy will support Tomcat 9 for the time being.. (if we don't do that we right way break it and you need a tomcat 10 or other container for servlet spec 5.0 or higher)

All our code would be needed to move to the new packages, but also all of the 3rd party packages (which some still didn't)
Also very likely we then fully need to drop WebClient first.

But Tomcat 9 will be supported for a long time, and constantly updated.
You can see that in the release notes of tomcat 9 and 10/11, if there is a Tomcat 10 release you also see a Tomcat 9 release with pretty much the same fixes.
So the core of tomcat 9 and tomcat 10/11 is the same,
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet


Return to Servoy Server

Who is online

Users browsing this forum: No registered users and 8 guests