-
15. Re: Undeploying multiple wars inside an ear causes NameAlrea
daniele.ulrich Oct 23, 2009 4:08 AM (in response to klausma)Hi jaikiran
The ear with the content listed below was running for a year without problems in all our environments. Now it does not run in PROD anymore; that's why I doubt that it helps to analyze the content. But I appreciate your help!
mpu.ear:
META-INF/
META-INF/MANIFEST.MF
META-INF/application.xml
META-INF/jboss-app.xml
mpu-util-18.1.jar
adInfuse-18.1.jar
externalProvisioningNotification-18.1.jar
messagemanagermodel-18.1.jar
alertmodel-18.1.jar
emsmodel-18.1.jar
vasrestriction-cronjob-18.1.jar
content-push-processor-18.1.jar
content-delivery-processor-18.1.jar
xtrazone-delivery-processor-18.1.jar
content-billing-processor-18.1.jar
ems-ejb-18.1.jar
mpu-war-18.1.war
ssimpu-war-18.1.war
messagebroker-delivery-interface-18.1.war
mmlsupportejb-18.1.jar
apscomponent-18.1.jar
messagemanager-18.1.jar
smtpservercomp-18.1.jar
jsch-0.1.39.jar
pbiclient-18.1.jar
pbiclientInterface-18.1.jar
access-18.1.jar
accessChannelInterface-18.1.jar
accessInterface-18.1.jar
apsproducer-18.1.jar
jmsproducerframework-18.1.jar
mailclient-18.1.jar
mailclientInterface-18.1.jar
onNetInterface-18.1.jar
smstestdevice-18.1.jar
soap-2.3.jar
subscriptioninfoInterface-18.1.jar
subscriptioninfo-18.1.jar
deregistration-18.1.jar
aplclient-18.1.jar
mmlsupport-18.1.jar
mmcpmmsfetcher-18.1.jar
mmcpmmsfetcherInterface-18.1.jar
rbtclient-18.1.jar
registrationUtil-18.1.jar
management-18.1.jar
exception-18.1.jar
propertyPool-18.1.jar
propertyPoolInterface-18.1.jar
util-18.1.jar
ssiframework-18.1.jar
msgsender-18.1.jar
dbConn-18.1.jar
dbConnInterface-18.1.jar
dbLayer-18.1.jar
utildb-18.1.jar
jmx-18.1.jar
httpframework-18.1.jar
mpslog-18.1.jar
wapPushSender-18.1.jar
lifecycle-18.1.jar
jmxtools-1.2.1.jar
commons-io-1.2.jar
commons-httpclient-3.0.jar
jdom-1.0.jar
asm-1.5.3.jar
aqapi-1.0.jar
axis-1.4.jar
otaclient-18.1.jar
oab-18.1.jar
emsInterface-18.1.jar
rilInterface-18.1.jar
xml-resolver-1.1.jar
oabschema-1.0.jar
sis2_corbaclient-1.0.0.jar
smsservices-18.1.jar
commons-discovery-0.4.jar
axis-wsdl4j-1.5.1.jar
alertClient-18.1.jar
purchase-18.1.jar
ccch-2.1.0.jar
axis-jaxrpc-1.4.jar
lbiclient-18.1.jar
lbsclient-3.2.0.jar
mclib_base-0.1.jar
mclib_conf-0.1.jar
mclib_log-0.1.jar
XMLA_net-1.0.18.jar
xmlaproxy-2.1.1.21.jar
axis-saaj-1.4.jar
promoClient-18.1.jar
cpeClient-18.1.jar
xml_apis-2.0.2.jar
wss4j-1.5.3.jar
addressing-2.0.jar
mbclient-18.1.jar
castor-1.0.3.jar
jargs-1.0.jar
oro-2.0.8.jar
avalon-framework-4.1.5.jar
contentdelivery-core-1.10.jar
contentdelivery-api-1.10.jar
trove-2.1.1.jar
commons-dbcp-1.2.1.jar
commons-pool-1.2.jar
xml-apis-1.0.b2.jar
jsr173-1.0.jar
mindterm-1.0.jar
saaj-1.2.jar
opensaml-1.0.1.jar
moss-gateway-security-2.1.0.2.jar
ehcache-1.1.jar
META-INF/maven/
META-INF/maven/com.swisscom.live/
META-INF/maven/com.swisscom.live/mpu/
META-INF/maven/com.swisscom.live/mpu/pom.xml
META-INF/maven/com.swisscom.live/mpu/pom.properties
I think others also faced this problem: https://jira.jboss.org/jira/browse/JBAS-7092
To be very precise: we had 3 wars in that ear:
mpu-war-18.1.war
ssimpu-war-18.1.war
messagebroker-delivery-interface-18.1.war
now we had to put 2 wars outside the ear:
ssimpu-war-18.1.war
messagebroker-delivery-interface-18.1.war -
16. Re: Undeploying multiple wars inside an ear causes NameAlrea
daniele.ulrich Oct 23, 2009 4:13 AM (in response to klausma)Hi jaikiran
You wanted it, now you get it:
12:35:11,995 INFO [TomcatDeployer] deploy, ctxPath=/ssimpu, warUrl=file:/opt/sp/messaging/tmp/deploy/tmp63416mpu.ear-contents/ssimpu-war-18.1-exp.war/
12:35:12,102 WARN [ServiceController] Problem starting service jboss.web.deployment:war=ssimpu-war-18.1.war,id=902438857
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.GeneratedMethodAccessor5.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
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.server.jmx.LazyMBeanServer.invoke(LazyMBeanServer.java:291)
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.GeneratedMethodAccessor11.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
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.server.jmx.LazyMBeanServer.invoke(LazyMBeanServer.java:291)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy44.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:585)
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.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:87)
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.system.server.jmx.LazyMBeanServer.invoke(LazyMBeanServer.java:291)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy45.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.GeneratedMethodAccessor24.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
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.system.server.jmx.LazyMBeanServer.invoke(LazyMBeanServer.java:291)
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.GeneratedMethodAccessor5.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
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.server.jmx.LazyMBeanServer.invoke(LazyMBeanServer.java:291)
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.GeneratedMethodAccessor11.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
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.server.jmx.LazyMBeanServer.invoke(LazyMBeanServer.java:291)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:304)
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:585)
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:595)
Caused by: javax.naming.NameAlreadyBoundException
at org.jnp.server.NamingServer.bind(NamingServer.java:144)
at org.jnp.interfaces.NamingContext.bind(NamingContext.java:591)
at org.jnp.interfaces.NamingContext.bind(NamingContext.java:552)
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)
... 119 more -
17. Re: Undeploying multiple wars inside an ear causes NameAlrea
jaikiran Oct 23, 2009 10:04 AM (in response to klausma)If it's possible, could you please attach the application which reproduces this issue, to that JIRA?
-
18. Re: Undeploying multiple wars inside an ear causes NameAlrea
daniele.ulrich Oct 26, 2009 5:12 AM (in response to klausma)"jaikiran" wrote:
If it's possible, could you please attach the application which reproduces this issue, to that JIRA?
Sorry, this is not possible because there are a) too many dependencies and b) I am not allowed to post code of the enterprise I'm working for.
It is exactly the same behaviour like described in https://jira.jboss.org/jira/browse/JBAS-7092, the first *.war gets deployed but on deploying the second ".war the exception occurs and the deployment of the following components stops. -
19. Re: Undeploying multiple wars inside an ear causes NameAlrea
daniele.ulrich Nov 6, 2009 10:11 AM (in response to klausma)I had a second problem that seems to be related, the Exception thrown is a little bit different:
2009-11-06 10:20:45,628 INFO [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (main) deploy, ctxPath=/pa 2009-11-06 10:20:45,677 ERROR [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (main) ENC setup failed javax.naming.NameAlreadyBoundException: TransactionSynchronizationRegistry at org.jnp.server.NamingServer.bind(NamingServer.java:209) at org.jnp.interfaces.NamingContext.bind(NamingContext.java:650) at org.jnp.interfaces.NamingContext.bind(NamingContext.java:611) at org.jboss.web.tomcat.service.deployers.TomcatDeployment$EncListener.lifecycleEvent(TomcatDeployment.java:466)
We are using JBoss 5.0.1.GA and are deploying two EARs containing muliple web service JARs (EJB endpoints). For these endpoints a web context is deployed from the TomcatDeployer. The first gets deployed successfully all subsequent are failing.
After some code inspection I patched the EncListener in the following way:try {
envCtx.bind("TransactionSynchronizationRegistry", new LinkRef("java:TransactionSynchronizationRegistry"));
log.debug("Linked java:comp/TransactionSynchronizationRegistry to JNDI name: java:TransactionSynchronizationRegistry");
envCtx.bind("UserTransaction", new LinkRef("UserTransaction"));
log.debug("Linked java:comp/UserTransaction to JNDI name: UserTransaction");
envCtx = envCtx.createSubcontext("env");
} catch (javax.naming.NameAlreadyBoundException nabe) {
log.warn("tried to create java:/comp again");
}
This is a simple try catch block around the binding calls.
Frankly, I don't really understand what is happening here. From the code I have to assume that each web service component within the ear gets the same java:/comp context, the first component can successfully bind and all subsequent have to fail... But if I check the JNDIView afer the deployment I find a java:comp listed for EACH component!
This problem could be related to https://jira.jboss.org/jira/browse/JBWS-2384, because when we use the web service stack from JBoss WS native it works perfectly, with Metro 3.2.0.GA this problem occurs.
With this patch everything works perfectly but it would be very nice to have a convincing explanation for this effect. -
20. Re: Undeploying multiple wars inside an ear causes NameAlrea
jaikiran Nov 6, 2009 10:19 AM (in response to klausma)I haven't been able to reproduce this. So without any sample application which reproduces this, it's difficult to figure out what going on. If there's someone else who too is running into this issue, then maybe they could provide a sample application for testing.
-
21. Re: Undeploying multiple wars inside an ear causes NameAlrea
daniele.ulrich Nov 6, 2009 4:27 PM (in response to klausma)OK, I spent some time to reproduce the error with a sample application.
Steps to reproduce the error:
jboss-5.1.0.GA on Windows or Solaris
patch default configuration with jbossws-metro-3.2.1.GA http://jboss.org/file-access/default/members/jbossws/downloads//jbossws-metro-3.2.1.GA.zip
deploy the sample app http://www.niceneasy.ch/sampleAppEar-1.0.ear
And you will seeCaused by: java.lang.RuntimeException: javax.naming.NameAlreadyBoundException: TransactionSynchronizationRegistry at org.jboss.web.tomcat.service.deployers.TomcatDeployment$EncListener.lifecycleEvent(TomcatDeployment.java:483) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4388) at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)
Apply the patch I proposed and the error disappears.
The sources for the sample app can be found here http://www.niceneasy.ch/sampleApp.zip
As I said before I assume there is a problem with the JNDI binding... -
22. Re: Undeploying multiple wars inside an ear causes NameAlrea
daniele.ulrich Nov 7, 2009 7:38 AM (in response to klausma)"daniele.ulrich" wrote:
OK, I spent some time to reproduce the error with a sample application.
Steps to reproduce the error:
jboss-5.1.0.GA on Windows or Solaris
patch default configuration with jbossws-metro-3.2.1.GA http://jboss.org/file-access/default/members/jbossws/downloads//jbossws-metro-3.2.1.GA.zip
deploy the sample app http://www.niceneasy.ch/sampleAppEar-1.0.ear
And you will seeCaused by: java.lang.RuntimeException: javax.naming.NameAlreadyBoundException: TransactionSynchronizationRegistry at org.jboss.web.tomcat.service.deployers.TomcatDeployment$EncListener.lifecycleEvent(TomcatDeployment.java:483) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4388) at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)
Apply the patch I proposed and the error disappears.
The sources for the sample app can be found here http://www.niceneasy.ch/sampleApp.zip
As I said before I assume there is a problem with the JNDI binding...
see also https://jira.jboss.org/jira/browse/JBWS-2823