[Installation, Configuration & DEPLOYMENT] - 5.0.0 beta 2 and virtual hosts
by worldofnic
Hi,
firstly I'm new to JBoss (But I've experience with Tomcat, Sun Java System Application Server and a bit with Jetty). I'm having a problem with virtual hosts. All my wars seem to ignore the virtual-host setting and try to overwrite each other in all hosts?
In each (unexploded) war, I've put a WEB-INF/jboss-web.xml
| <!DOCTYPE jboss-web PUBLIC
| "-//JBoss//DTD Web Application 5.0//EN"
| "http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">
| <jboss-web>
| <context-root>/</context-root>
| <virtual-host>domain.example</virtual-host>
| </jboss-web>
|
And multiple instances of the Host section in server.xml
| <Host name="domain.example" autoDeploy="false"
| deployOnStartup="false"
| deployXML="false">
|
| <!-- Add all your aliases here -->
| <Alias>www.domain.example</Alias>
|
| <!-- Set up logging -->
| <Valve className="org.apache.catalina.valves.FastCommonAccessLogValve" prefix="domain.example" suffix=".log" pattern="common" directory="${jboss.server.home.dir}/log"/>
| <DefaultContext cookies="true" crossContext="true" override="true"/>
| </Host>
|
However, all the contexts overlap, ignoring the virtual-host setting in jboss-web.xml. Clearly, I've made a mistake and missed something. Any clues people?
The errors in stdout/err are:
| 22:06:17,476 ERROR [ServiceDeployer] Error during deployment: vfsfile:/opt/jboss-5.0.0.Beta2/server/default/deploy/example.war
| org.jboss.deployment.DeploymentException: Error during install jboss.web.deployment:war=/
| at org.jboss.deployment.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:52)
| at org.jboss.system.ServiceController.install(ServiceController.java:277)
| at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:94)
| at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
| at org.jboss.deployers.plugins.deployers.helpers.AbstractSimpleRealDeployer.deploy(AbstractSimpleRealDeployer.java:56)
| at org.jboss.deployers.plugins.deployer.AbstractSimpleDeployer.commitDeploy(AbstractSimpleDeployer.java:52)
| at org.jboss.deployers.plugins.deployer.DeployerWrapper.commitDeploy(DeployerWrapper.java:170)
| at org.jboss.deployers.plugins.deployment.MainDeployerImpl.commitDeploy(MainDeployerImpl.java:592)
| at org.jboss.deployers.plugins.deployment.MainDeployerImpl.process(MainDeployerImpl.java:476)
| at org.jboss.deployers.plugins.deployment.MainDeployerImpl.process(MainDeployerImpl.java:406)
| 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.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:121)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:110)
| at org.jboss.profileservice.aop.MainDeployerAspect.process(MainDeployerAspect.java:53)
| at org.jboss.aop.advice.org.jboss.profileservice.aop.MainDeployerAspect_z_process_10410279.invoke(MainDeployerAspect_z_process_10410279.java)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at AOPContainerProxy$0.process(AOPContainerProxy$0.java)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:371)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.bootstrap(ProfileServiceBootstrap.java:247)
| at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.run(AbstractBootstrap.java:89)
| at org.jboss.system.server.profileservice.ServerImpl.doStart(ServerImpl.java:403)
| at org.jboss.system.server.profileservice.ServerImpl.start(ServerImpl.java:342)
| at org.jboss.Main.boot(Main.java:210)
| at org.jboss.Main$1.run(Main.java:522)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: java.lang.IllegalStateException: jboss.web.deployment:war=/ is already installed.
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:264)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:192)
| at org.jboss.system.ServiceController.doInstall(ServiceController.java:638)
| at org.jboss.system.ServiceController.install(ServiceController.java:271)
| ... 26 more
| \[...\]
| *** DEPLOYMENTS IN ERROR: Name -> Error
|
| vfsfile:/opt/jboss-5.0.0.Beta2/server/default/deploy/exampl.war -> java.lang.IllegalStateException: jboss.web.deployment:war=/ is already installed.
|
|
|
MTIA,
nic
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4095422#4095422
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4095422
18Â years, 9Â months
[Messaging, JMS & JBossMQ] - Setting up a non-server specific EAR
by Juan Bustamante
I am currently working on a project that uses an MDB to read messages off of an MQ queue, process them, and then write the response to another queue on the same queue manager.
The issue that we are having is that we have server specific data such as the hostname, queue name to drain from etc. within our ejb-jar.xml. This is a hastle for our build team because they require a new EAR file for each JBoss server they deploy the application on. My question is the following. Is there a way to separate the server specific data from the ejb-jar.xml?
The technologies that we use are IBM Websphere MQ Explorer with fixpack 6.0.2, JBoss AS 4.0.5.GA, java 1.5_011.
The following is a sample EJB definition from our ejb-jar.xml.
<message-driven>
| <ejb-name>Listener1</ejb-name>
| <ejb-class>qualified class name</ejb-class>
| <messaging-type>javax.jms.MessageListener</messaging-type>
| <transaction-type>Container</transaction-type>
| <env-entry>
| <env-entry-name>EJBName</env-entry-name>
| <env-entry-type>java.lang.String</env-entry-type>
| <env-entry-value>Listener1</env-entry-value>
| </env-entry>
| <env-entry>
| <!-- The JNDI name of the connection factory used -->
| <!-- to send the response. -->
| <env-entry-name>connectionFactory</env-entry-name>
| <env-entry-type>java.lang.String</env-entry-type>
| <env-entry-value>java:WSMQueueConnectionFactory</env-entry-value>
| </env-entry>
| <env-entry>
| <!-- The JNDI location of the queue used -->
| <!-- to send the response. -->
| <env-entry-name>queueJndi</env-entry-name>
| <env-entry-type>java.lang.String</env-entry-type>
| <env-entry-value>java:queue</env-entry-value>
| </env-entry>
| <activation-config>
| <activation-config-property>
| <activation-config-property-name>destination</activation-config-property-name>
| <activation-config-property-value>QUEUE.NAME</activation-config-property-value>
| </activation-config-property>
| <activation-config-property>
| <activation-config-property-name>destinationType</activation-config-property-name>
| <activation-config-property-value>javax.jms.Queue</activation-config-property-value>
| </activation-config-property>
| <activation-config-property>
| <activation-config-property-name>useJNDI</activation-config-property-name>
| <activation-config-property-value>false</activation-config-property-value>
| </activation-config-property>
| <activation-config-property>
| <activation-config-property-name>hostName</activation-config-property-name>
| <activation-config-property-value>ourHost</activation-config-property-value>
| </activation-config-property>
| <activation-config-property>
| <activation-config-property-name>queueManager</activation-config-property-name>
| <activation-config-property-value>ourQM</activation-config-property-value>
| </activation-config-property>
| <activation-config-property>
| <activation-config-property-name>transportType</activation-config-property-name>
| <activation-config-property-value>CLIENT</activation-config-property-value>
| </activation-config-property>
| <activation-config-property>
| <activation-config-property-name>port</activation-config-property-name>
| <activation-config-property-value>1414</activation-config-property-value>
| </activation-config-property>
| </activation-config>
| </message-driven>
We followed the WIKI site about how to set up JBoss with WS MQ part 4.
Thank you very much in advance,
Juan
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4095420#4095420
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4095420
18Â years, 9Â months