Omid
Omid

Reputation: 51

Java web app error during deploying the artifact

Facing this error when start deploying my web app from IntelliJ on the local TomEE 8 server.

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

Upvotes: 1

Views: 2294

Answers (2)

Giorgi Tsiklauri
Giorgi Tsiklauri

Reputation: 11120

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:

  1. If you have a Maven project, you can add this snippet in the pom.xml:

    <build>
        <finalName>your_war_name</finalName>
        ...
    </build>
    
  2. 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.

Upvotes: 1

Vlad Ulshin
Vlad Ulshin

Reputation: 480

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.

Upvotes: 0

Related Questions