[
https://jira.jboss.org/jira/browse/JBWS-2384?page=com.atlassian.jira.plug...
]
Richard Opalka commented on JBWS-2384:
--------------------------------------
We provide WebContext annotation for EJB3 endpoints to support virtual hosts jboss web
feature. Here's the example code:
<code>
@Stateless
@WebService(endpointInterface =
"org.jboss.test.ws.jaxws.jbws981.EndpointInterface", targetNamespace =
"http://www.jboss.org/test/ws/jaxws/jbws981", serviceName =
"EndpointService")
@WebContext(virtualHosts = { "localhost", "www.jboss.org" })
public class EJB3Bean implements EJB3RemoteInterface
{
// bean impl
}
</code>
Our JBossWS VirtualHostDeploymentAspect processes this virtualHosts annotation parameter
and propagates it to our SPI metadata tree.
Later WebAppGeneratorDeploymentAspect (that generates JBossWebMetaData for such EJB3
deployments) reads VirtualHosts from SPI metadata and propagate it to JBossWebMetaData.
Later the JBossWebMetaData is picked up by TomcatDeployment deployer (next deployer in
deployers chain).
Both VirtualHostDeploymentAspect and WebAppGeneratorDeploymentAspect are injected to
WSDeploymentAspectManagerEJB which is registered with *DeployerHookEJB* deployers.
NameAlreadyBoundException when more than one virtual host are
specified in @WebContext(virtualHosts) annotation variable
------------------------------------------------------------------------------------------------------------------------
Key: JBWS-2384
URL:
https://jira.jboss.org/jira/browse/JBWS-2384
Project: JBoss Web Services
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: jbossws-integration
Reporter: Richard Opalka
Assignee: Richard Opalka
Fix For: jbossws-native-3.0.5, jbossws-metro-3.0.5, jbossws-cxf-3.0.5
To reproduce this problem uncomment the jaxws/jbws981 test case in test-excludes-jboss50x
files:
< 08:45:01,579 ERROR [AbstractKernelController] Error installing to Start:
name=jboss.web.deployment:war=/jaxws-jbws981 state=Create mode=Manual
requiredState=Installed
< org.jboss.deployers.spi.DeploymentException: URL
file:/opt/svn/jbossas/tags/JBoss_5_0_0_CR2/build/output/jboss-5.0.0.CR2/server/default/tmp/deploy/jaxws-jbws981.jar8416-exp.war/
deployment failed
< at
org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
< at
org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:358)
< at
org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:144)
< at
org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:459)
< at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
< at org.jboss.web.deployers.WebModule.start(WebModule.java:96)
< 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:157)
< at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
< 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:668)
< at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
< at $Proxy35.start(Unknown Source)
< at
org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
< at
org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
< at
org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
< at
org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
< at
org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
< at
org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
< at
org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
< at
org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
< at
org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
< at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
< at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
< at
org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
< at
org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
< at org.jboss.system.ServiceController.doChange(ServiceController.java:672)
< at org.jboss.system.ServiceController.start(ServiceController.java:444)
< at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:146)
< at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:104)
< at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:45)
< at
org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
< at
org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
< at
org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:169)
< at
org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1285)
< at
org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1003)
< at
org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1024)
< at
org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:944)
< at
org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
< at
org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
< at
org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
< at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
< at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
< at
org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
< at
org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
< at
org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:627)
< at
org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:541)
< at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:812)
< 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:157)
< at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
< 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:668)
< 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.jmx.connector.invoker.InvokerAdaptorService.invoke(InvokerAdaptorService.java:270)
< 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:157)
< at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
< at
org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:138)
< at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
< at
org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:140)
< at
org.jboss.jmx.connector.invoker.SerializableInterceptor.invoke(SerializableInterceptor.java:74)
< at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
< at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
< at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
< at
org.jboss.invocation.jrmp.server.JRMPProxyFactory.invoke(JRMPProxyFactory.java:179)
< 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:157)
< at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
< 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:668)
< at
org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:815)
< at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:416)
< 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 sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
< at sun.rmi.transport.Transport$1.run(Transport.java:153)
< at java.security.AccessController.doPrivileged(Native Method)
< at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
< at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
< at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
< at java.lang.Thread.run(Thread.java:595)
< Caused by: java.lang.RuntimeException: javax.naming.NameAlreadyBoundException
< at
org.jboss.web.tomcat.service.deployers.TomcatDeployment$EncListener.lifecycleEvent(TomcatDeployment.java:539)
< at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
< at org.apache.catalina.core.StandardContext.start(StandardContext.java:4365)
< at
org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:352)
< ... 100 more
< Caused by: javax.naming.NameAlreadyBoundException
< at org.jnp.server.NamingServer.bind(NamingServer.java:165)
< at org.jnp.interfaces.NamingContext.bind(NamingContext.java:593)
< at org.jnp.interfaces.NamingContext.bind(NamingContext.java:554)
< at
org.jboss.web.tomcat.service.deployers.TomcatDeployment$EncListener.lifecycleEvent(TomcatDeployment.java:522)
< ... 103 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira