0

I'm currently using NetBeans 16.1 and Tomcat 10 with Java 17 and trying to run a web application.

When I try to run it, it appears this message:

In-place deployment at /home/henriquedelben/Documentos/WebApplication1/build/web Deployment is in progress... deploy?config=file%3A%2Ftmp%2Fcontext2029074434843372881.xml&path=/WebApplication1 FAIL - Failed to deploy application at context path [/WebApplication1] /home/henriquedelben/Documentos/WebApplication1/nbproject/build-impl.xml:1030: The module has not been deployed. See the server log for details. BUILD FAILED (total time: 0 seconds)

I know that on Arch Linux's version, Tomcat's default deploy location is /var/lib/tomcat8/webapps. Is it because it's not deploying on the right place or something?

The connection to Tomcat 10 is made with a user with all manager-* permissions and using by default port 8080

Here is the log file in /var/log/tomcat10/localhost.2023-04-26.log

obs.: As far as arch linux documentation goes, I don't know about any other server log files (besides catalina.err and catalina.out)

127.0.0.1 - - [26/Apr/2023:10:48:26 -0300] "HEAD /netbeans-tomcat-status-test HTTP/1.1" 404 -
127.0.0.1 - root [26/Apr/2023:10:48:26 -0300] "GET /manager/text/ HTTP/1.1" 200 38
127.0.0.1 - - [26/Apr/2023:10:48:26 -0300] "HEAD /netbeans-tomcat-status-test HTTP/1.1" 404 -
127.0.0.1 - root [26/Apr/2023:10:48:26 -0300] "GET /manager/text/ HTTP/1.1" 200 38
127.0.0.1 - - [26/Apr/2023:10:48:26 -0300] "HEAD /netbeans-tomcat-status-test HTTP/1.1" 404 -
127.0.0.1 - root [26/Apr/2023:10:48:26 -0300] "GET /manager/text/ HTTP/1.1" 200 38
127.0.0.1 - - [26/Apr/2023:10:48:26 -0300] "HEAD /netbeans-tomcat-status-test HTTP/1.1" 404 -
127.0.0.1 - root [26/Apr/2023:10:48:26 -0300] "GET /manager/text/ HTTP/1.1" 200 38
127.0.0.1 - - [26/Apr/2023:10:48:26 -0300] "GET /manager/text/list HTTP/1.1" 401 2499
127.0.0.1 - root [26/Apr/2023:10:48:26 -0300] "GET /manager/text/list HTTP/1.1" 200 196
127.0.0.1 - - [26/Apr/2023:10:48:26 -0300] "GET /manager/text/list HTTP/1.1" 401 2499
127.0.0.1 - root [26/Apr/2023:10:48:26 -0300] "GET /manager/text/list HTTP/1.1" 200 196
127.0.0.1 - - [26/Apr/2023:10:48:26 -0300] "GET /manager/text/deploy?config=file%3A%2Ftmp%2Fcontext2029074434843372881.xml&path=/WebApplication1 HTTP/1.1" 401 2499
127.0.0.1 - root [26/Apr/2023:10:48:26 -0300] "GET /manager/text/deploy?config=file%3A%2Ftmp%2Fcontext2029074434843372881.xml&path=/WebApplication1 HTTP/1.1" 200 82

When I set up the web server, i went to Tools>Servers and added "Apache Tomcat or TomEE" and both catalina home and base and set to: "/usr/share/tomcat8" which is the main folder on arch linux's installation using pacman

  • 2
    I don't think Tomcat 8 is compatible with Java 17. Try using Tomcat 9 (if you're using Java EE or Jakarta EE 8 or lower), or Tomcat 10 (if you're using Jakarta EE 9 or higher, including Spring 6 or Spring Boot 3). – Mark Rotteveel Apr 26 '23 at 15:05
  • i'm using jdk 17 actually (just edited the post). Which version do you think should I have? (sorry, all those terms EE, jarkarta are unknown to me) – Henrique Delben Apr 26 '23 at 15:15
  • 'jdk 17' is Java 17... – Mark Rotteveel Apr 26 '23 at 15:19
  • 1
    There is a [useful grid on Tomcat's web site](https://tomcat.apache.org/whichversion.html) showing version compatibility between Tomcat and Java. Note that it shows your version of Tomcat ("_8.0.x_") has been _"superseded"_. So pick whatever newer version of Tomcat is compatible with your requirements. Any of them should work fine with Java 17. Update your question if you still have problems when using a valid Tomcat version. – skomisa Apr 26 '23 at 15:37
  • Just updated to tomcat10. Same error skomisa. What do you think it can be? – Henrique Delben Apr 26 '23 at 15:43
  • 1
    What you are showing us as server log data does not look like the server log to me. The contents suggest you were looking in one of the `*access_log*.txt` files. Can you double-check? Make sure to look in the latest `catalina*.log` and `localhost*.log` files for the most relevant root cause error message(s) related to the failed deployment. – andrewJames Apr 26 '23 at 16:01
  • 1
    I agree with Andrew that the messages you are showing seem to be coming from **access.log**. But in some of those messages the response is HTTP 401 (Unauthorized). There can be multiple reasons for that, so first update your question to completely remove the irrelevant Tomcat 8 data, and instead show the error messages you get when using Tomcat 10, particularly in the server log (_"catalina.log"_). As a separate matter, also verify that you can still access the Tomcat server despite your problems, by going to `http://localhost:8080`. State in your question whether that works or not. – skomisa Apr 26 '23 at 17:02
  • Andrew sorry to bother you with those really simple and dumb (possibly) questions but I can't find any other log files besides the "/var/log/tomcat10/localhost.2023-04-26.log", catalina.err and catalina.out which in both cases (catalina.out and .err) are not used. – Henrique Delben Apr 26 '23 at 17:13
  • Where is your Tomcat installed? Look in there (if you didn't already). Side note: to ping someone who has commented in your question, use the `@` symbol followed by their user name (no spaces): @andrewjames – andrewJames Apr 26 '23 at 17:31
  • 1
    It looks like I mislead you about the log files. Because you are using Arch L:inux (which I have never used), [this is how logging works:](https://wiki.archlinux.org/title/tomcat#:~:text=Tomcat%20when%20used%20with%20official,%2Flog%2Ftomcatn%2Fcatalina.) _"Tomcat when used with official Arch Linux packages uses systemd's journalctl for startup log. This means that files /var/log/tomcatn/catalina.err and /var/log/tomcatn/catalina.out are not used."_. My apologies. – skomisa Apr 26 '23 at 18:09
  • Just a guess, but is your problem possibly arising because you have not updated the "[CHANGE_ME]" passwords in file **tomcat-users.xml**, as described in section [2 Initial configuration](https://wiki.archlinux.org/title/tomcat#Initial_configuration)? See also [Tomcat 9 can't log into manager/html](https://stackoverflow.com/q/50750252/2985643). I don't think that is the cause of those _401_ errors in your log, but if you haven't already updated **tomcat-users.xml** you definitely need to do that regardless. – skomisa Apr 26 '23 at 18:14
  • @skomisa I did actually, i think it has to due to the user roles (permissions) that exists inside tomcat, but I basically set all permissions/roles to the "root" user I created but it still returns those 401 errors – Henrique Delben Apr 26 '23 at 19:55
  • 1
    OK. Note that the error message in your question states _"See the server log for details"_, so check the server log and update your question with those details. That is essential for resolving your issue. From the [Arch Linux/Tomcat documentation on logging](https://wiki.archlinux.org/title/tomcat#Logging): _"Tomcat when used with official Arch Linux packages uses systemd's journalctl for startup log"_. – skomisa Apr 26 '23 at 20:31

0 Answers0