I migrated an application from Tomcat to TomEE. Finally, everything seems to
work, except for my virtual host, that worked fine on Tomcat. The host part
in my server.xml looks like this:

<Host name="MYAPPCONTEXT.com">
        <Context path="" docBase="MYAPPCONTEXT" />
        <Alias>www.MYAPPCONTEXT.com</Alias>
</Host>

TomEE is located in /opt/tomcat/ (I just mention it so you don't get
confused). On startup, TomEE fails with this exception:

INFO: using context file
/opt/tomcat/webapps/MYAPPCONTEXT/META-INF/context.xml
Apr 12, 2013 11:38:42 PM org.apache.openejb.assembler.classic.Assembler
createApplication
INFO: Deployed Application(path=/opt/tomcat/webapps/MYAPPCONTEXT)
Apr 12, 2013 11:38:42 PM org.apache.catalina.core.ContainerBase
startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException:
org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[MYAPPCONTEXT.com].StandardContext[]]
        at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)
        at java.util.concurrent.FutureTask.get(FutureTask.java:111)
        at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
        at
org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:800)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
        at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:722)
Caused by: org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[MYAPPCONTEXT.com].StandardContext[]]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
        ... 7 more
Caused by: *java.lang.IllegalArgumentException: can't find path under
current webapp deployment []*
        at
org.apache.tomee.catalina.OpenEJBContextConfig.processAnnotationsUrl(OpenEJBContextConfig.java:382)
        at
org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1307)
        at
org.apache.tomee.catalina.OpenEJBContextConfig.webConfig(OpenEJBContextConfig.java:273)
        at
org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
        at
org.apache.tomee.catalina.OpenEJBContextConfig.configureStart(OpenEJBContextConfig.java:83)
        at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:369)
        at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
        at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5179)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        ... 7 more

Is virtual host configuration any different in TomEE? How can I fix this?

*Note:* I'm using apache-tomee-webprofile-1.5.3-SNAPSHOT. I have an Apache
in front of TomEE, that proxys requests to MYAPPCONTEXT.com and passes them
to ajp://serverhost:8009/. I can access my application via
MYAPPCONTEXT.com:8080/MYAPPCONTEXT (as long as I dont define the virtual
host in server.xml, since startup then fails). I need the virtual host, so I
can access my app via MYAPPCONTEXT.COM. If it's possible, I don't want to
change the Apache configuration, since this works fine on Tomcat 7.



--
View this message in context: 
http://openejb.979440.n4.nabble.com/Virtual-host-not-working-tp4662204.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Reply via email to