英文:
Java web app error during deploying the artifact
问题
从IntelliJ启动我的Web应用程序时,遇到以下错误,错误发生在本地TomEE 8服务器上。
28-Aug-2020 20:28:52.797 SEVERE [http-nio-8080-exec-8] org.apache.openejb.core.transaction.EjbTransactionUtil.handleSystemException EjbTransactionUtil.handleSystemException:java.lang.IllegalArgumentException:子名称[/web_war_exploded]不唯一
org.apache.openejb.OpenEJBRuntimeException:java.lang.IllegalArgumentException:子名称[/web_war_exploded]不唯一
在 org.apache.tomee.catalina.deployment.TomcatWebappDeployer.deploy(TomcatWebappDeployer.java:58) 处抛出
在 org.apache.openejb.assembler.DeployerEjb.deploy(DeployerEjb.java:177) 处抛出
在 java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 处调用
在 java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 处调用
在 java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 处调用
在 java.base/java.lang.reflect.Method.invoke(Method.java:566) 处调用
在 org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:205) 处调用
在 org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:186) 处调用
在 org.apache.openejb.security.internal.InternalSecurityInterceptor.invoke(InternalSecurityInterceptor.java:35) 处调用
在 java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 处调用
在 java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 处调用
在 java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 处调用
在 java.base/java.lang.reflect.Method.invoke(Method.java:566) 处调用
在 org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:205) 处调用
在 org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:186) 处调用
在 org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:191) 处调用
在 org.apache.openejb.monitoring.StatsInterceptor.invoke(StatsInterceptor.java:102) 处调用
在 java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 处调用
在 java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 处调用
在 java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 处调用
在 java.base/java.lang.reflect.Method.invoke(Method.java:566) 处调用
在 org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:205) 处调用
在 org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:186) 处调用
在 org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:85) 处调用
在 org.apache.openejb.core.singleton.SingletonContainer._invoke(SingletonContainer.java:272) 处调用
在 org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:221) 处调用
在 org.apache.openejb.server.ejbd.EjbRequestHandler.doEjbObject_BUSINESS_METHOD(EjbRequestHandler.java:371) 处调用
在 org.apache.openejb.server.ejbd.EjbRequestHandler.processRequest(EjbRequestHandler.java:182) 处调用
在 org.apache.openejb.server.ejbd.EjbDaemon.processEjbRequest(EjbDaemon.java:360) 处调用
在 org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:247) 处调用
在 org.apache.openejb.server.ejbd.EjbServer.service(EjbServer.java:104) 处调用
在 org.apache.openejb.server.httpd.ServerServlet.service(ServerServlet.java:60) 处调用
在 javax.servlet.http.HttpServlet.service(HttpServlet.java:733) 处调用
在 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) 处调用
在 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 处调用
在 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) 处调用
在 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) 处调用
在 org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:45) 处调用
在 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) 处调用
在 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) 处调用
在 org.apache.tomee.catalina.OpenEJBSecurityListener$RequestCapturer.invoke(OpenEJBSecurityListener.java:97) 处调用
在 org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690) 处调用
在 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) 处调用
在 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) 处调用
在 org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373) 处调用
在 org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) 处调用
在 org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) 处调用
在 org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1589) 处调用
在 org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) 处调用
在 java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) 处调用
在 java.base/java.util.concurrent.ThreadPoolExecutor$Worker
<details>
<summary>英文:</summary>
Facing this error when start deploying my web app from IntelliJ on the local TomEE 8 server.
```28-Aug-2020 20:28:52.780 INFO [http-nio-8080-exec-8] org.apache.tomee.catalina.TomcatWebAppBuilder.deployWebApps using default host: localhost
28-Aug-2020 20:28:52.797 SEVERE [http-nio-8080-exec-8] org.apache.openejb.core.transaction.EjbTransactionUtil.handleSystemException EjbTransactionUtil.handleSystemException: java.lang.IllegalArgumentException: Child name [/web_war_exploded] is not unique
org.apache.openejb.OpenEJBRuntimeException: java.lang.IllegalArgumentException: Child name [/web_war_exploded] is not unique
at org.apache.tomee.catalina.deployment.TomcatWebappDeployer.deploy(TomcatWebappDeployer.java:58)
at org.apache.openejb.assembler.DeployerEjb.deploy(DeployerEjb.java:177)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:205)
at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:186)
at org.apache.openejb.security.internal.InternalSecurityInterceptor.invoke(InternalSecurityInterceptor.java:35)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:205)
at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:186)
at org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:191)
at org.apache.openejb.monitoring.StatsInterceptor.invoke(StatsInterceptor.java:102)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:205)
at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:186)
at org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:85)
at org.apache.openejb.core.singleton.SingletonContainer._invoke(SingletonContainer.java:272)
at org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:221)
at org.apache.openejb.server.ejbd.EjbRequestHandler.doEjbObject_BUSINESS_METHOD(EjbRequestHandler.java:371)
at org.apache.openejb.server.ejbd.EjbRequestHandler.processRequest(EjbRequestHandler.java:182)
at org.apache.openejb.server.ejbd.EjbDaemon.processEjbRequest(EjbDaemon.java:360)
at org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:247)
at org.apache.openejb.server.ejbd.EjbServer.service(EjbServer.java:104)
at org.apache.openejb.server.httpd.ServerServlet.service(ServerServlet.java:60)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:45)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.tomee.catalina.OpenEJBSecurityListener$RequestCapturer.invoke(OpenEJBSecurityListener.java:97)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1589)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.IllegalArgumentException: Child name [/web_war_exploded] is not unique
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:703)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
at org.apache.tomee.catalina.TomcatWebAppBuilder.deployWar(TomcatWebAppBuilder.java:658)
at org.apache.tomee.catalina.TomcatWebAppBuilder.deployWebApps(TomcatWebAppBuilder.java:598)
at org.apache.tomee.catalina.deployment.TomcatWebappDeployer.deploy(TomcatWebappDeployer.java:47)
... 52 more
**[2020-08-28 08:28:52,845] Artifact web:war exploded: Error during artifact deployment. See server log for details.**
[2020-08-28 08:28:52,845] Artifact web:war exploded: javax.ejb.EJBException: The bean encountered a non-application exception; nested exception is:
org.apache.openejb.OpenEJBRuntimeException: java.lang.IllegalArgumentException: Child name [/web_war_exploded] is not unique
答案1
得分: 1
org.apache.openejb.OpenEJBRuntimeException: java.lang.IllegalArgumentException: 子级名称[/web_war_exploded]不唯一
意味着一个网络应用的名称与另一个发生冲突。
您可以尝试使用一些不同的名称,或者如果您不再需要它,可以删除冲突的`.war`文件(以及在`/webapps`中找到的相应的爆炸文件夹)。
如何重命名项目打包?
在您的情况下有两种方法:
1. 如果您有一个Maven项目,您可以在pom.xml中添加以下代码段:
<build>
<finalName>your_war_name</finalName>
...
</build>
2. 如果您正在从IntelliJ直接部署应用程序(在嵌入式配置的TomEE服务器中),您可以按照[这里的说明](https://stackoverflow.com/questions/21986831/specify-artifact-name-with-intellij)配置`war`名称。
英文:
org.apache.openejb.OpenEJBRuntimeException: java.lang.IllegalArgumentException: Child name [/web_war_exploded] is not unique
means, that the name of one web application, conflicts with another one.
You can either try to use some different name, or remove conflicting .war
file (and its respective exploded folder which is found in /webapps
) if you no longer need it.
How to rename the project packaging?
There are two ways in your case:
-
If you have a Maven project, you can add this snippet in the pom.xml:
<build> <finalName>your_war_name</finalName> ... </build>
-
If you are deploying the application right from the IntelliJ (in the embedded configured TomEE server), you can configure the
war
name as explained here.
答案2
得分: 0
问题是 java.lang.IllegalArgumentException: 子名称 [/web_war_exploded] 不唯一。IntelliJ 没有删除先前部署。转到您的 Tomcat webapp 目录并删除 web_war_exploded 文件夹。或者您可以重新命名您的构件。
英文:
The problem is java.lang.IllegalArgumentException: Child name [/web_war_exploded] is not unique. InteliJ is not deleting previous deployment. go to your tomcat webapp directory and remove web_war_exploded folder. Or you could rename your artifact.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论