1 2 Previous Next 22 Replies Latest reply on Nov 7, 2009 7:38 AM by Daniele Ulrich

    Undeploying multiple wars inside an ear causes NameAlreadyBo

    Klaus Marquart Newbie

      Hi.

      I want to deploy two war's in one ear.

      If I start JBoss, I get a NameAlreadyBoundException when JBoss tries to deploy the second war. I have run Jboss in Debug mode and find out that the Exception comes from a class named org/jboss/web/AbstractWebDeployer.
      There is a method parseWebAppDescriptors() which parses the web.xml in the war and at the end of the method a UserTransaction is bound to JNDI

      // Add a link to the global transaction manager
       envCtx.bind("UserTransaction", new LinkRef("UserTransaction"));
       log.debug("Linked java:comp/UserTransaction to JNDI name: UserTransaction");
       envCtx = envCtx.createSubcontext("env");
      


      I guess, when the second war is parsed, JBoss tries to bind a second UserTransaction with the same name what causes the NameAlreadyBound Exception.

      Now, my question. is it possible to deploy two war's in one ear and how can I solve the exception.

      Thanks

      Klaus

        • 1. Re: Undeploying multiple wars inside an ear causes NameAlrea
          jaikiran pai Master

          Can you post the entire exception stacktrace. Also, post the contents of the application.xml file.

          • 2. Re: Undeploying multiple wars inside an ear causes NameAlrea
            Klaus Marquart Newbie

            Ok, here comes the stacktrace:

            2007-12-10 13:54:55,994 INFO [org.jboss.web.tomcat.service.TomcatDeployer] deploy, ctxPath=/JSP1, warUrl=.../tmp/deploy/tmp3165pquantserver-app-1.0-SNAPSHOT.ear-contents/JSP1-exp.war/
            2007-12-10 13:54:56,369 WARN [org.jboss.web.tomcat.service.TomcatDeployer] Failed to setup clustering, clustering disabled. NoClassDefFoundError: org/jgroups/blocks/MethodCall
            2007-12-10 13:54:56,385 INFO [org.jboss.web.tomcat.service.TomcatDeployer] deploy, ctxPath=/JSP2, warUrl=.../tmp/deploy/tmp3165pquantserver-app-1.0-SNAPSHOT.ear-contents/JSP2-exp.war/
            2007-12-10 13:54:56,385 WARN [org.jboss.system.ServiceController] Problem starting service jboss.web.deployment:war=JSP2.war,id=261967674
            org.jboss.deployment.DeploymentException: Error during deploy; - nested throwable: (javax.naming.NameAlreadyBoundException)
            at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:384)
            at org.jboss.web.WebModule.startModule(WebModule.java:83)
            at org.jboss.web.WebModule.startService(WebModule.java:61)
            at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
            at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
            at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
            at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
            at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
            at $Proxy0.start(Unknown Source)
            at org.jboss.system.ServiceController.start(ServiceController.java:417)
            at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
            at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
            at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
            at $Proxy38.start(Unknown Source)
            at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
            at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
            at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
            at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
            at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
            at org.jboss.ws.integration.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:93)
            at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
            at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
            at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
            at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
            at $Proxy39.start(Unknown Source)
            at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
            at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
            at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
            at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
            at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
            at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
            at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
            at $Proxy9.deploy(Unknown Source)
            at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
            at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
            at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
            at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
            at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
            at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
            at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
            at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
            at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
            at $Proxy0.start(Unknown Source)
            at org.jboss.system.ServiceController.start(ServiceController.java:417)
            at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
            at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
            at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
            at $Proxy4.start(Unknown Source)
            at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
            at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
            at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
            at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
            at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
            at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
            at $Proxy5.deploy(Unknown Source)
            at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
            at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
            at org.jboss.Main.boot(Main.java:200)
            at org.jboss.Main$1.run(Main.java:508)
            at java.lang.Thread.run(Thread.java:619)
            Caused by: javax.naming.NameAlreadyBoundException
            at org.jnp.server.NamingServer.bind(NamingServer.java:144)
            at org.jnp.interfaces.NamingContext.bind(NamingContext.java:568)
            at org.jnp.interfaces.NamingContext.bind(NamingContext.java:532)
            at org.jboss.web.AbstractWebDeployer.parseWebAppDescriptors(AbstractWebDeployer.java:495)
            at org.jboss.web.AbstractWebDeployer$DescriptorParser.parseWebAppDescriptors(AbstractWebDeployer.java:878)
            at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:159)
            at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
            at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
            ... 113 more

            and the application.xml

            <?xml version="1.0" encoding="UTF-8"?>
            <application xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd" version="1.4">
             <description>The Server Project.</description>
             <display-name>pquantserver-app</display-name>
             <module>
             <ejb>Test1.jar</ejb>
             </module>
             <module>
             <ejb>Test2.jar</ejb>
             </module>
             <module>
             <web>
             <web-uri>JSP1.war</web-uri>
             <context-root>/JSP1</context-root>
             </web>
             </module>
             <module>
             <web>
             <web-uri>JSP2.war</web-uri>
             <context-root>/JSP2</context-root>
             </web>
             </module>
             <module>
             <java>databaseupdate-1.0.1-SNAPSHOT.jar</java>
             </module>
             <module>
             <java>jibx-run-1.1.5.jar</java>
             </module>
             <module>
             <java>xpp3-1.1.3.4.O.jar</java>
             </module>
            </application>


            Thanks

            Klaus

            • 3. Re: Undeploying multiple wars inside an ear causes NameAlrea
              jaikiran pai Master

              The application.xml looks fine to me. Which version of JBoss are you using? Also, the server.log file contains more verbose logs and those logs might explain what's going wrong. Do you have any other configuration files (like jboss-app.xml or jboss-web.xml in your application)? Can you post the contents of the following (from the command prompt):

              jar -tf myapp.ear


              where myapp.ear is the name of your application. That will print out the exact contents of your package.

              • 4. Re: Undeploying multiple wars inside an ear causes NameAlrea
                jaikiran pai Master

                By the way, i guess you have a typo in the subject line of your post. You mean "Deploying multiple wars inside an ear causes NameAlreadyBo", dont you?

                • 5. Re: Undeploying multiple wars inside an ear causes NameAlrea
                  Klaus Marquart Newbie

                  Yes, that's true. Sorry,
                  I will post the logs and the jboss-app.xml soon.

                  • 6. Re: Undeploying multiple wars inside an ear causes NameAlrea
                    Klaus Marquart Newbie

                    We use JBoss 4.2.1.

                    The jboss-app.xml looks like this:

                    <?xml version="1.0" encoding="ISO-8859-1"?>
                    <!DOCTYPE jboss-app PUBLIC '-//JBoss//DTD J2EE Application 1.3V2//EN' 'http://www.jboss.org/j2ee/dtd/jboss-app_3_2.dtd'>
                    <jboss-app>
                     <loader-repository>
                     jboss.loader:loader=de.bdal.pquant.server-pquantserver-1.0-SNAPSHOT
                     <loader-repository-config>java2ParentDelegation=true</loader-repository-config>
                     </loader-repository>
                    
                    </jboss-app>


                    and the contents of the ear are:

                    C:\Programme\Java\jboss-4.0.5.GA\server\bdal\deploy>jar -tf pquantserver-SNAPSHOT.ear
                    META-INF/
                    META-INF/MANIFEST.MF
                    acegi-security-1.0.5.jar
                    antlr-2.7.6.jar
                    aopalliance-1.0.jar
                    asm-1.5.3.jar
                    asm-attrs-1.5.3.jar
                    axis-1.4.jar
                    axis-jaxrpc-1.4.jar
                    axis-saaj-1.4.jar
                    backport-util-concurrent-3.0.jar
                    cglib-2.1_3.jar
                    commons-beanutils-1.7.0.jar
                    commons-codec-1.3.jar
                    commons-collections-3.2.jar
                    commons-fileupload-1.2.jar
                    commons-httpclient-3.0.1.jar
                    commons-lang-2.3.jar
                    dom4j-1.6.1.jar
                    ehcache-1.3.0.jar
                    hessian-3.0.20.jar
                    hibernate-3.2.5.ga.jar
                    jdom-1.0.jar
                    jibx-extras-1.1.5.jar
                    jibx-run-1.1.5.jar
                    joda-time-1.4.jar
                    jsr107cache-1.0.jar
                    META-INF/application.xml
                    META-INF/jboss-app.xml
                    oro-2.0.8.jar
                    Test1.jar
                    Test2.jar
                    quartz-1.5.2.jar
                    spring-2.0.7.jar
                    stax-api-1.0.1.jar
                    wstx-asl-3.2.1.jar
                    xpp3-1.1.3.4.O.jar
                    META-INF/maven/
                    META-INF/maven/de.bdal.pquant.server/
                    META-INF/maven/de.bdal.pquant.server/pquantserver-app/
                    META-INF/maven/de.bdal.pquant.server/pquantserver-app/pom.xml
                    META-INF/maven/de.bdal.pquant.server/pquantserver-app/pom.properties
                    JSP1.war
                    JSP2.war

                    and here is the rest of the server log

                    2007-12-10 17:42:33,932 ERROR [org.jboss.deployment.MainDeployer] Could not start deployment: file:/C:/Programme/Java/jboss-4.0.5.GA/server/bdal/tmp/deploy/tmp4256pquantserver-app-1.0-SNAPSHOT.ear-contents/JSP2.war
                    org.jboss.deployment.DeploymentException: Error during deploy; - nested throwable: (javax.naming.NameAlreadyBoundException)
                    at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:384)
                    at org.jboss.web.WebModule.startModule(WebModule.java:83)
                    at org.jboss.web.WebModule.startService(WebModule.java:61)
                    at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
                    at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
                    at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:597)
                    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
                    at $Proxy0.start(Unknown Source)
                    at org.jboss.system.ServiceController.start(ServiceController.java:417)
                    at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:597)
                    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                    at $Proxy38.start(Unknown Source)
                    at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:597)
                    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                    at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
                    at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
                    at org.jboss.ws.integration.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:93)
                    at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
                    at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                    at $Proxy39.start(Unknown Source)
                    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
                    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
                    at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:597)
                    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                    at $Proxy9.deploy(Unknown Source)
                    at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
                    at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
                    at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
                    at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
                    at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
                    at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
                    at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:597)
                    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
                    at $Proxy0.start(Unknown Source)
                    at org.jboss.system.ServiceController.start(ServiceController.java:417)
                    at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:597)
                    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                    at $Proxy4.start(Unknown Source)
                    at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
                    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:597)
                    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                    at $Proxy5.deploy(Unknown Source)
                    at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
                    at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
                    at org.jboss.Main.boot(Main.java:200)
                    at org.jboss.Main$1.run(Main.java:508)
                    at java.lang.Thread.run(Thread.java:619)
                    Caused by: javax.naming.NameAlreadyBoundException
                    at org.jnp.server.NamingServer.bind(NamingServer.java:144)
                    at org.jnp.interfaces.NamingContext.bind(NamingContext.java:568)
                    at org.jnp.interfaces.NamingContext.bind(NamingContext.java:532)
                    at org.jboss.web.AbstractWebDeployer.parseWebAppDescriptors(AbstractWebDeployer.java:495)
                    at org.jboss.web.AbstractWebDeployer$DescriptorParser.parseWebAppDescriptors(AbstractWebDeployer.java:878)
                    at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:159)
                    at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
                    at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
                    ... 113 more

                    Thanks

                    Klaus

                    • 7. Re: Undeploying multiple wars inside an ear causes NameAlrea
                      Klaus Marquart Newbie

                      So, the problem has been solved. It seems, that in our configuration the binding procedure of transactionManager was called twice. When the first transactionManager was bound, the initizialization of the second failed. I have correct this. Thank you for your help.

                      So long!

                      Klaus

                      • 8. Re: Undeploying multiple wars inside an ear causes NameAlrea
                        Johann Bengler Newbie

                        Hello Klaus,

                        please can you give me a more detailed description, what you changed to get this running. It looks like I have exactly the same problem at deploying.


                        John

                        • 9. Re: Undeploying multiple wars inside an ear causes NameAlrea
                          Veera Rao Newbie

                          Hi Klaus,

                          Could you please elobare how you have done deployment for multiple wars. I am als facing same issue.

                          Thanks

                          • 10. Re: Undeploying multiple wars inside an ear causes NameAlrea
                            Chip Schoch Novice

                            Has anyone any idea what the fix is to this?

                            • 11. Re: Undeploying multiple wars inside an ear causes NameAlrea
                              Chip Schoch Novice

                              Has anyone any idea what the fix is to this?

                              • 12. Re: Undeploying multiple wars inside an ear causes NameAlrea
                                Daniele Ulrich Newbie

                                All of the sudden we were facing the same problem in our PROD environment while on all other environments we don't have this issue. We are running a 4.2.3.GA and have 3 wars in one ear. The only way we could solve the problem is to take the wars outside the ear. As the wars depend on jars in the ear we had to do the following configuration changes:

                                a) /conf/jboss-service.xml: activate org.jboss.deployment.scanner.PrefixDeploymentSorter

                                b) prefix the ear with 01, the wars with 02, 03, 04

                                This way the wars are deployed after the ear and can use the libraries within the ear.

                                We hope that this bug is fixed in the JBoss 5!

                                • 13. Re: Undeploying multiple wars inside an ear causes NameAlrea
                                  jaikiran pai Master

                                  I am not sure this is a bug in AS. Do you by any chance package any jboss specific jars files in the application? Or any jar files contain jnp.* packages? If yes, try removing them.

                                  If none of this applies, please post the entire exception stacktrace and also the appropriate contents of the EAR, which you can get using:

                                  jar -tf myapp.ear


                                  While posting logs or xml content or code, please remember to wrap it in a code block by using the Code button in the message editor window. Please use the Preview button to ensure that your post is correctly formatted.

                                  • 14. Re: Undeploying multiple wars inside an ear causes NameAlrea
                                    Daniele Ulrich Newbie

                                     

                                    "daniele.ulrich" wrote:
                                    All of the sudden we were facing the same problem in our PROD environment while on all other environments we don't have this issue. We are running a 4.2.3.GA and have 3 wars in one ear. The only way we could solve the problem is to take the wars outside the ear. As the wars depend on jars in the ear we had to do the following configuration changes:

                                    a) /conf/jboss-service.xml: activate <attribute name="URLComparator">org.jboss.deployment.scanner.PrefixDeploymentSorter</attribute>

                                    b) prefix the ear with 01, the wars with 02, 03, 04

                                    This way the wars are deployed after the ear and can use the libraries within the ear.

                                    We hope that this bug is fixed in the JBoss 5!

                                    see also https://jira.jboss.org/jira/browse/JBAS-7092

                                    1 2 Previous Next