Successful build but I get an Error when deploying the war file in tomcat

46 views
Skip to first unread message
Assigned to lorenzo...@geosolutionsgroup.com by me

Hamza Lafkiri

unread,
Mar 14, 2024, 11:28:54 AMMar 14
to mapstore-users
Hi everyone,

I have successfully built a custom project based on Mapstore following this training guide : Getting Started — MapStore Training documentation (geosolutionsgroup.com)

When I test locally using "npm start", everything works really well. Even the build is successful

When I deploy the resulting war file however (found in the web/target/mapstore.war) in a tomcat container, I keep getting the following error : 'HTTP Status 404 – Not Found'.

I have tried deploying the war file in a local tomcat container and on a web server running tomcat, yet I keep getting the same error. I have also tried restarting the servers multiple times with no luck. (Please note that I have tested several times with the pre-built war file found on the github repo, which works very well).

Any clue to what the problem might be?

Thank you.

harry cr7

unread,
Mar 14, 2024, 1:26:12 PMMar 14
to mapstor...@googlegroups.com
Hello
probably you have some missing dependencies in the package.json file 

how did you configure the backend? 
did you remove this part in local.Config.json file
image.png

did you properly configure the buildConfig.js” and the devServer.js file

you should verify all of that before running this command "./build.sh" in git terminal

--
You received this message because you are subscribed to the Google Groups "mapstore-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapstore-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mapstore-users/09994288-1a00-49a4-9660-741e881c8c6dn%40googlegroups.com.

Hamza Lafkiri

unread,
Mar 15, 2024, 6:28:54 AMMar 15
to mapstore-users
Hi Harry,
Thanks for the quick reply.

I haven't done any of that actually as it wasn't mentioned in the training guide. I also haven't found anything about it in the official developer guide (Building and Deploying - MapStore (geosolutionsgroup.com))

Do you perhaps have a link where I could read up on how to properly configure the files (buildConfig.js and devServer.js) you mentioned ?

Thank you!

Hamza Lafkiri

unread,
Mar 15, 2024, 6:32:11 AMMar 15
to mapstore-users
Here is a screenshot of the localConfig file. It doesn't contain the code snippet you mentioned.

localConfig_sshot.png

Lorenzo Natali

unread,
Mar 15, 2024, 6:42:26 AMMar 15
to mapstor...@googlegroups.com
Hi,
for the `authenticationRules`, most recent version of MapStore do not require anymore to remove that entry.
For the 404 not found, you should take a look at mapstore.log in logs folder of tomcat to see if there is some error. 




Hamza Lafkiri

unread,
Mar 15, 2024, 9:35:09 AMMar 15
to mapstore-users
Hi Lorenzo,

Here is the corresponding tomcat mapstore log for the latest deployment using the war file I have built. If you could kindly take a look for any anomalies. 
Thank you!
mapstore.log

harry cr7

unread,
Mar 15, 2024, 2:58:32 PMMar 15
to mapstor...@googlegroups.com
I think , looking at  your log file, i think you have a problem related  to Java 

what result did you get when you run the command "npm compile" ???


Lorenzo Natali

unread,
Mar 18, 2024, 5:27:38 AMMar 18
to mapstor...@googlegroups.com
Correct,
look if you are respecting the correct versions of Java/Tomcat for compiling and running the application.


Reply all
Reply to author
Forward
0 new messages