我一直在努力解决一个奇怪的问题。这是我创建的第二个Java Server Pages项目,另一个项目运行良好。与新课程的区别在于,这是一个导入的项目,其中包含我的大学课程示例。
问题是在构建项目时未创建Tomcat工件,因此该构建会产生以下错误:
[2019-04-12 04:01:02,433] Artifact examples: Error during artifact deployment. See server log for details.
[2019-04-12 04:01:02,436] Artifact examples: com.intellij.javaee.oss.admin.jmx.JmxAdminException: com.intellij.execution.ExecutionException: /Users/home/IdeaProjects/oop-examples/j2ee-web/out/artifacts/examples not found for the web module.
这似乎是因为文件夹out / artifacts / examples及其内容从未在项目中创建。
在日志中显示以下内容:
019-04-12 16:01:02,435 [ 163467] INFO - erver.JavaeeServerInstanceImpl - com.intellij.execution.ExecutionException: /Users/home/IdeaProjects/oop-examples/j2ee-web/out/artifacts/examples not found for the web module.
com.intellij.javaee.oss.admin.jmx.JmxAdminException: com.intellij.execution.ExecutionException: /Users/home/IdeaProjects/oop-examples/j2ee-web/out/artifacts/examples not found for the web module.
at org.jetbrains.idea.tomcat.admin.TomcatAdminLocalServerImpl$DeployStep.perform(TomcatAdminLocalServerImpl.java:286)
at org.jetbrains.idea.tomcat.admin.TomcatAdminLocalServerImpl.doDeploy(TomcatAdminLocalServerImpl.java:132)
at com.intellij.javaee.oss.admin.jmx.JavaeeJmxAdminServerBase$4.doPerform(JavaeeJmxAdminServerBase.java:120)
at com.intellij.javaee.oss.admin.jmx.JavaeeJmxAdminServerBase$JmxOperation.perform(JavaeeJmxAdminServerBase.java:245)
at com.intellij.javaee.oss.admin.jmx.JavaeeJmxAdminServerBase.doStartDeploy(JavaeeJmxAdminServerBase.java:135)
at com.intellij.javaee.oss.admin.jmx.JavaeeJmxAdminServerBase$2.setDeploymentStatus(JavaeeJmxAdminServerBase.java:90)
at com.intellij.javaee.oss.admin.jmx.JavaeeJmxAdminServerBase$DeploymentModelOperation.doSetDeploymentStatus(JavaeeJmxAdminServerBase.java:272)
at com.intellij.javaee.oss.admin.jmx.JavaeeJmxAdminServerBase$3.doPerform(JavaeeJmxAdminServerBase.java:100)
at com.intellij.javaee.oss.admin.jmx.JavaeeJmxAdminServerBase$JmxOperation.perform(JavaeeJmxAdminServerBase.java:245)
at com.intellij.javaee.oss.admin.jmx.JavaeeJmxAdminServerBase.doStartDeployWithUndeploy(JavaeeJmxAdminServerBase.java:107)
at com.intellij.javaee.oss.admin.jmx.JavaeeJmxAdminServerBase.startDeploy(JavaeeJmxAdminServerBase.java:74)
at org.jetbrains.idea.tomcat.admin.TomcatAdminServerBase.startDeploy(TomcatAdminServerBase.java:121)
at org.jetbrains.idea.tomcat.admin.TomcatAdminLocalServerImpl.startDeploy(TomcatAdminLocalServerImpl.java:102)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.remoteServer.agent.impl.ThreadInvocationHandler.lambda$invoke$0(ThreadInvocationHandler.java:53)
at com.intellij.remoteServer.agent.impl.ThreadInvocationHandler.lambda$invoke$1(ThreadInvocationHandler.java:97)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:220)
at com.intellij.util.concurrency.BoundedTaskExecutor.access$100(BoundedTaskExecutor.java:26)
at com.intellij.util.concurrency.BoundedTaskExecutor$2.lambda$run$0(BoundedTaskExecutor.java:198)
at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:224)
at com.intellij.util.concurrency.BoundedTaskExecutor$2.run(BoundedTaskExecutor.java:194)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: com.intellij.execution.ExecutionException: /Users/home/IdeaProjects/oop-examples/j2ee-web/out/artifacts/examples not found for the web module.
at org.jetbrains.idea.tomcat.admin.TomcatAdminLocalServerImpl.addApplicationContext(TomcatAdminLocalServerImpl.java:224)
at org.jetbrains.idea.tomcat.admin.TomcatAdminLocalServerImpl$4.doPerform(TomcatAdminLocalServerImpl.java:128)
at org.jetbrains.idea.tomcat.admin.TomcatAdminLocalServerImpl$DeployStep.perform(TomcatAdminLocalServerImpl.java:283)
... 28 more
我尝试使缓存无效并重新启动。我还尝试清空“ out”文件夹并重建项目。
同样,我转到“运行”>“编辑配置”>“ Tomcat 9.0.17”>“部署”>“编辑工件”,并尝试更改设置,包括最明显的设置,即复选框,“包括在项目构建中”。
将out / artifacts文件夹及其内容构建为项目的一部分似乎没有任何作用,所以我希望有人知道会发生什么。
谢谢。