java com.intellij.javaee.oss.admin.jmx.JmxAdminException: com.intellij.execution.ExecutionException

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/43244946/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-11-03 07:14:16  来源:igfitidea点击:

com.intellij.javaee.oss.admin.jmx.JmxAdminException: com.intellij.execution.ExecutionException

javaintellij-ideaartifact

提问by qg_java_17137

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

当我在 IntelliJ IDEA 中运行 tomcat 时,出现以下错误,我搜索了 StackOverflow,但没有找到任何关于我的异常的信息。

[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.

[2017-04-06 10:57:30,875] Artifact elecMaven-explored: Artifact 正在部署,请稍候...
[2017-04-06 10:57:30,888] Artifact elecMaven-explored:工件部署过程中出错。有关详细信息,请参阅服务器日志。
[2017-04-06 10:57:30,889] 神器 elecMaven-explored: com.intellij.javaee.oss.admin.jmx.JmxAdminException: com.intellij.execution.ExecutionException: /Users/luowensheng/Desktop/Test28eleMaven/1找不到 Web 模块的类/工件/elecMaven_explored。

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:

将以下代码添加到 web.xml:

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

But seems useless.

不过好像没用。

回答by aircraft

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

问题可能是您没有创建正确的 Artifact。正确的步骤是:

When you create the Artifact, you should like this:

当您创建 Artifact 时,您应该像这样:

enter image description here

在此处输入图片说明

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

如果你在 step3 中选择了 Empty,你可能会得到 title 的错误。

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

然后在 Tomcat Configurations 中,您可以像这样部署 Artifact:

enter image description here

在此处输入图片说明

And check it: enter image description here

并检查它: 在此处输入图片说明

Restart your Tomcat.

重启你的Tomcat。

回答by CodeWorld

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

我也遇到了这个问题......发生这种情况是因为

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

Tomcat 找不到要部署的项目文件夹(应用程序文件夹)。所以

  • 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 with same name as your project name should be listed in it. Now click OK
  • 单击intellij右上角的“编辑配置”按钮
  • 通过单击左上角的“ +”符号并选择“ Tomcat 服务器”然后选择本地来配置 Tomcat 。
  • 根据需要为您的项目提供“名称”。
  • 现在在第一个选项卡“服务器”...
  • 设置系统中本地 tomcat 目录的路径。
  • 更好地将“Http 端口”8080 更改为 808*(8086、8087、8088...)
  • 转到第二个选项卡“部署
  • 在“在服务器启动时部署”下单击+符号并选择artifact。现在应该在其中列出与您的项目名称同名的工件。现在点击确定

And unfortunately still if doesn't fix

不幸的是,如果还没有解决

  • Go in the Deploymenttab, 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 directorygive the location of your project folder like
    (D:\Workspace\Project_Folder).
  • 进入部署选项卡,单击编辑按钮(铅笔)。它将打开一个名为
    “项目结构”的新窗口。
  • 提供“名称”并将“类型”指定为Web 应用程序:爆炸
  • 输出目录下,提供项目文件夹的位置,如
    (D:\Workspace\Project_Folder)。

回答by kolobok

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

选择您的工件(File -> Project Structure -> Artifacts)并确保输出目录指向正确的目录(例如path_to_webapp\target)。

That's how I solved this problem.

我就是这样解决这个问题的。

回答by sagra

Re-importing maven projects resolved the issue for me

重新导入 Maven 项目为我解决了这个问题

回答by Ignatiy Voronov

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:

我遇到了同样的问题。就我而言,它是 Gradle 设置中的一个标志。我打开它但忘记将其重新设置为关闭:

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.

要检查它,请转到"Build, Execution, Deployment" -> "Build Tools" -> "Gradle" -> "Runner"。必须取消选中“将IDE 构建/运行操作委托给 gradle”标志。