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: 82
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: 82
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: 8452
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: 82
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: 8452
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet


Return to Servoy Server

Who is online

Users browsing this forum: Bing [Bot] and 4 guests

cron