Wooster created TOMEE-2338:
------------------------------
Summary: Guidance required on TomEE embedded with EAR/WAR
Key: TOMEE-2338
URL: https://issues.apache.org/jira/browse/TOMEE-2338
Project: TomEE
Issue Type: Bug
Components: TomEE Core Server
Reporter: Wooster
I'm having some troubles converting an application to running under TomEE
embedded.
The application is packaged as an EAR. It consists of an EJB JAR and a WAR.
Previously it was deploying okay under Glassfish but now I'd like to run it on
Heroku with TomEE embedded.
First I was wondering how to get the web.xml file picked up automatically. What
folder does it need to live in? I tried every combination of webapp, WEB-INF
and resources dir under the EAR and WAR and it never seemed like it was getting
loaded. I am able to get it to load if I specify
`appConfig.setWebXml("config/web.xml");` but I was wondering if it could be
loaded.
I have similar but different issues with persistence. It seems that if I create
a shaded EAR, persistence loads okay. If I don't shade everything together,
then I get a zillion warnings about a PersistenceUnit being defined multiple
times. Not sure what the difference is here.
What I would imagine is that when I call `deployClasspathAsWebApp()` it would
deploy the WAR inside my EAR. Instead it loads everything in the EJB JAR but
doesn't try deploying the webapp. If I specify a web.xml as I mentioned above
with references to servlets in the WAR, it is unable to locate the servlet
classes. They are present inside the WAR WEB-INF/classes dir. Why does it not
locate the classes? Why does it not pick up the web.xml in the WAR
automatically?
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)