com.intellij.javaee.oss.admin.jmx.JmxAdminException: com.intellij.execution.ExecutionException
Asked Answered
M

7

14

When I run tomcat in IntelliJ IDEA, I get this below error, I have searched the StackOverflow, find nothing about my exception.

[2017-04-06 10:57:30,875] Artifact elecMaven-explored: Artifact is being deployed, please wait...
[2017-04-06 10:57:30,888] Artifact elecMaven-explored: Error during artifact deployment. See server log for details.
[2017-04-06 10:57:30,889] Artifact elecMaven-explored: com.intellij.javaee.oss.admin.jmx.JmxAdminException: com.intellij.execution.ExecutionException: /Users/luowensheng/Desktop/TestIOS/itheima1128elecMaven/classes/artifacts/elecMaven_explored not found for the web module.

But my artifact is really exists:

enter image description here

So, where is the issue?


I have tried:

add the below code to web.xml:

<context-param>
    <param-name>kmRootKey</param-name>
    <param-value>km.root</param-value>
</context-param>

But seems useless.

Meridethmeridian answered 6/4, 2017 at 3:4 Comment(1)
Please share the Minimal, Complete, and Verifiable example.Antiperistalsis
L
17

The issue maybe you did not create the correct Artifact. The correct steps are:

When you create the Artifact, you should like this:

enter image description here

If you in the step3 choose the Empty, you maybe will get the error of title.

Then in Tomcat Configurations, you can deploy the Artifact like this:

enter image description here

And check it: enter image description here

Restart your Tomcat.

Lilliamlillian answered 6/4, 2017 at 9:33 Comment(4)
I closed IntelliJ Idea then re-imported the project and choose as artifact war-exploded by following above step. And the issue is resolved.Aridatha
I'm pleased this can help you.Lilliamlillian
This solved my problem as well. Somehow during clean up for project directories the tomcat server configuration had removed building the artifact during server startup. I had to enable it using the edit feature and the server started deploying the correct war file during startup.Ytterbium
I do not have a secondary menu attached to the Web Application: Exploded item.Outhaul
P
8

Select your artifact (File -> Project Structure -> Artifacts) and make sure Output directory points to correct directory (for example, path_to_webapp\target).

That's how I solved this problem.

Pradeep answered 3/5, 2018 at 12:54 Comment(1)
This is a good answer that worked for me. For some reason Intellij tries to look in an /out folder that doesn't exist.Alarice
H
5

I also suffered with this issue... This occurs because

Tomcat doesn't find your project folder(application folder) to deploy. So

  • Click on "Edit configuration" button, top right in intellij
  • Configure Tomcat by clicking '+' symbol on left top and selecting "Tomcat server" then local.
  • Give "Name" to your project as per need.
  • Now in first tab "Server"...
  • Set path to local tomcat directory in your system.
  • Better change "Http port" 8080 to 808* (8086, 8087, 8088...)
  • Go to second tab "Deployment"
  • Under "Deploy at the server startup" Click on + symbol and select artifact. Now artifact having same name as your project-name should be listed in it. Then click OK

And unfortunately if above steps aren't helpful

  • Go to the Deployment tab, click on edit button(pencil). It will open a new window called
    "Project Structure".
  • Give "Name" and specify "Type" as Web Application: Exploded
  • Under Output directory give the location of your project folder like
    (D:\Workspace\Project_Folder).
Hydrolysis answered 28/8, 2017 at 13:36 Comment(0)
C
4

Re-importing maven projects resolved the issue for me

Com answered 12/7, 2018 at 0:39 Comment(2)
"Open the "Maven Projects" tab/window and clicking the "Reimport All Maven Projects" in the upper left corner" - this is how to actually do this answerDuplessismornay
Just clicking "Reload All Maven Projects" fixed it for me.Hypozeuxis
K
2

I faced with the same problem. In my case, it was a flag in Gradle's settings. I switched it on and forgot to set it back to off:

flag

To check it go to "Build, Execution, Deployment" -> "Build Tools" -> "Gradle" -> "Runner". The flag "Delegate IDE build/run actions to gradle" must be unchecked.

Kinase answered 23/11, 2018 at 9:20 Comment(0)
D
0

In my case, I've resolved this problem by manually created folders in project root "out/artifacts/artifactName"

Displume answered 23/11, 2022 at 21:29 Comment(1)
As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.Affusion
H
0

Just clicking "Reload All Maven Projects" fixed it for me (Cleaning the Tomcat, removing and then re-adding the "...:war (exploded)" artifact did not work for me).

enter image description here

Hypozeuxis answered 24/5 at 6:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.