TomEE and Intellij

353 Views Asked by At

I followed this tutorial but at the end I got an 404 Not Found. http://localhost:8080/TomEE_war_exploded/

The requested resource [/TomEE_war_exploded/] is not available

In Intellij I don't see a mistake. The Apache Tomee runs under windows in ~/software/apache-tomee-plume-8.0.11 and the code in ~/playground/TomEE

enter image description here

enter image description here

Unfortuately I'm not able to understand how the war file will be copied to the ~/software/apache-tomee-plume-8.0.11/webapps directory or where the configuration error exists.

From the log file I'm not really sure that the deployment happend correct:

30-May-2022 16:49:53.486 WARNING [http-nio-8080-exec-4] org.apache.batchee.container.services.ServicesManager.init You didn't specify org.apache.batchee.jmx.application and JMX is already registered, skipping
30-May-2022 16:49:53.486 INFO [http-nio-8080-exec-4] org.apache.openejb.assembler.classic.Assembler.createApplication Deployed Application(path=/home/maggus/playground/TomEE/target/TomEE-1.0-SNAPSHOT)
30-May-2022 16:49:53.664 INFO [http-nio-8080-exec-4] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
[2022-05-30 04:49:53,804] Artifact TomEE:war exploded: Artifact is deployed successfully
[2022-05-30 04:49:53,804] Artifact TomEE:war exploded: Deploy took 823 milliseconds

Does anybody see the mistake?

Thanks, Markus

1

There are 1 best solutions below

0
On

I ran into somewhat similar problem today and after sometime I was able to figure it out that it does not deploy at the following Application Context that is configured under Deployment tab in Run/Debug Configurations.

/TomEE_war_exploded

If you try to access http://localhost:8080/TomEE_war_exploded/, it gives 404.

Instead, (in my case) it is accessible at http://localhost:8080/TomEE-1.0-SNAPSHOT/

enter image description here

Where 1.0-SNAPSHOT is the version number defined in pom.xml.

Now in order to find the exact path where it is deployed, you need to go to Tomcat Web Application Manager at the following address:

http://localhost:8080/manager/html

Replace 8080 with the port number on which TomEE is running on your machine.

Default user & password is tomee.

enter image description here

Look under Path and you'll find it. Just click on it, it will be accessible.

I hope it helps.


EDIT: The Workaround

In order to define your own path, you need to update the path in the Artifact Output Directory. See the attached photo.

enter image description here