diff --git a/README.md b/README.md index 59a9ce8e..5fc194ae 100644 --- a/README.md +++ b/README.md @@ -124,3 +124,46 @@ Alternatively you can also use GitLab CI/CD functionality and download the built Now GATE can be access using e.g. depending on your concrete local setup. It is recommended to run the self-test to check whether everything looks ok: + +### Troubleshooting & Local Development Hints + +**1. Tomcat deployment stuck / 404 Error (especially on macOS)** +Cached files or hanging Java processes can prevent a clean `.war` extraction. To force a complete clean rebuild and redeploy, run the following commands: + +```bash +# 1. Kill any hanging Java/Tomcat processes +killall java + +# 2. Clear Tomcat caches (adjust paths to your local setup) +cd path/to/apache-tomcat-10.x +rm -rf webapps/gate +rm -rf webapps/gate.war +rm -rf work/Catalina/localhost/gate +rm -rf temp/* + +# 3. Navigate to the project source and rebuild +cd path/to/GATE/si +mvn clean package -DskipTests + +# 4. Copy the fresh WAR file back to Tomcat +cp target/GATE-1.0-SNAPSHOT.war ../apache-tomcat-10.x/webapps/gate.war +``` + +**2. Database connection fails (connects as 'root')** +If Tomcat ignores your database user, ensure you edit the source file (`src/main/resources/hibernate.cfg.xml`) and rebuild. For Hibernate 7 / C3P0, you might need to pass credentials to C3P0 explicitly: + +```xml +gate_user +gate123 +``` + +**3. Missing Jakarta Dependency (Tomcat 10)** +If the application crashes on startup with a `NoClassDefFoundError: jakarta/activation/DataSource`, add the activation API to your `pom.xml`: + +```xml + + jakarta.activation + jakarta.activation-api + 2.1.3 + +```