[ 
https://issues.apache.org/jira/browse/TOMEE-1445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14230369#comment-14230369
 ] 

Chris Harris commented on TOMEE-1445:
-------------------------------------

[~romain.manni-bucau],

O.K.  I'll check out that JIRA.

I'm not using any specific EE features.  I have a datasource defined for a db 
in tomee.xml.  I have 2 stateless EJB's, of which only 1 is really needed.  
That's it.  Further development has been stalled by time wasted on outage 
issues, some of them caused by OutOfMemoryException's.  I was always suspect of 
the app being deployed twice, especially since I can locally run my app on a 
64Mb heap, whereas the web host is providing a 128Mb heap.  I've provided 
VisualVM screen shots, that show my app performing as expected under a 64Mb 
heap and 128Mb heap, to my web host, asking why there's a difference between 
our 2 environments.  This JIRA and similar JIRA's provide me the smoking gun 
that there is in fact 2 deployments occurring.

I don't consider myself an expert regarding hosts and aliases, but it doesn't 
make sense to me that there are indeed 2 deployments that are occurring.  This 
seems like a Tomcat issue, since I noticed this behavior when initially running 
Tomcat 7 and OpenWebBeans and MyFaces.

I agree.  I don't understand why it worked before and now it doesn't.  I'm 
always suspecting that my web host is messing around with my server.xml 
regarding the domain name mapping.  What's weird is that I started rolling back 
to previous TomEE versions: 1.6.0.2, 1.6.0.1, 1.6.0.  I experienced the same 
error.  I've been using 1.6.0 for over a year, starting with the SNAPSHOT 
version, since 1.5.x suffered from some bug regarding using MyFaces 2.2.x (my 
memory was jogged regarding this fact after attempting 1.5.x again and 
realizing that I couldn't start my app).

I'm back from vacation/holiday, so I intend to further investigate this issue 
this week.

> org.apache.openejb.DuplicateDeploymentIdException error when using mutliple 
> Host elements in server.xml
> -------------------------------------------------------------------------------------------------------
>
>                 Key: TOMEE-1445
>                 URL: https://issues.apache.org/jira/browse/TOMEE-1445
>             Project: TomEE
>          Issue Type: Bug
>    Affects Versions: 1.7.0
>         Environment: CentOS, Apache HTTPd Web Server as front-end
>            Reporter: Chris Harris
>
> I started receiving the following error as of TomEE 1.7.0:
> SEVERE: Unable to deploy collapsed ear in war 
> StandardEngine[Catalina].StandardHost[localhost].StandardContext[/os]
> org.apache.openejb.DuplicateDeploymentIdException: Application cannot be 
> deployed as it contains deployment-ids which are in use: app: 
> /home/user/tomee-plus-1.7.0/webapps/os
>     ContactService
>     PersistenceTester
>       at 
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:663)
>       at 
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:623)
>       at 
> org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1248)
>       at 
> org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1087)
>       at 
> org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:130)
>       at 
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
>       at 
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
>       at 
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5378)
>       at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>       at 
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
>       at 
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
>       at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
>       at 
> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1083)
>       at 
> org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1880)
>       at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
>       at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
>       at java.util.concurrent.FutureTask.run(Unknown Source)
>       at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
>       at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>       at java.lang.Thread.run(Unknown Source)
> The relevant server.xml config:
> <Host name="localhost" appBase="webapps" 
>             unpackWARs="true" autoDeploy="false">
>         <!-- SingleSignOn valve, share authentication between web applications
>              Documentation at: /docs/config/valve.html -->
>         <!--
>         <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
>         -->
>         <!-- Access log processes all example.
>              Documentation at: /docs/config/valve.html
>              Note: The pattern used is equivalent to using pattern="common" 
> -->
>         <Valve className="org.apache.catalina.valves.AccessLogValve" 
> directory="logs"
>                prefix="localhost_access_log." suffix=".txt"
>                pattern="%h %l %u %t &quot;%r&quot; %s %b" />
>       </Host>
>       <Host name="blah.com" appBase="/home/user/tomee-plus-1.7.0/webapps">
>           <Alias>www.blah.com</Alias>
>           <Context path="/os" reloadable="true" 
> docBase="/home/user/tomee-plus-1.7.0/webapps/os/"/>
>           <Context path="" reloadable="true" 
> docBase="/home/user/public_html"/>
>           <Context path="/tomee" privileged="true" 
> docBase="/home/user/tomee-plus-1.7.0/webapps/tomee"/>
>       </Host>
> The issue is that I can't get my website to launch in Prd anymore.  It's 
> looks like TomEE is attempting to launch the same web app twice and then 
> running into the duplicate EJB id issue.  I notice in catalina.out that the 
> app is started for localhost and then my domain name.
> I can't get rid of either Host definition either.  Without either, I need to 
> type in my site's domain name WITH TomEE's port number to access the web app. 
>  That scenario will not suffice.
> I don't recall having this issue in TomEE 1.6.0.1 or 1.6.0.2.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to