Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Elipse WTP OC4J Redeployment Problem i.e Unable to find/read file META-INF/appli
Elipse WTP OC4J Redeployment Problem i.e Unable to find/read file META-INF/appli [message #233705] Wed, 15 July 2009 10:33 Go to next message
George Badu is currently offline George Badu
Messages: 13
Registered: July 2009
Junior Member
I seem to come a problem with redeployment of EAR files to OC4J.

I am using OC4J (version 10.1.3.4 standalone) with Eclipse 3.5 i.e.
Galileo for development and testing a J2EE Enterprise Application (EAR
file) that contains an EJB and A client application that I'm working on.
On a first run, I am able to build all the components and deploy it fine
but if I make a change to any of the components e.g. make change to
component the EJB and try to redeploy the EAR file, I get the following
error:

C:\EclipseGalileo\eclipse\plugins\org.eclipse.jst.server.gen eric.oc4j_1.5.205.v200805140145\buildfiles\oracle.10.1.3.xml :97:
Deploy error: Operation failed with error:
Unable to find/read file META-INF/application.xml in
C:\product\OC4J_Standalone\j2ee\home\applications\BankEJB3.0 EAR
(META-INF/application.xml)

The only way that I can get the EAR to redeploy sucessfully is to make a
change in all the components i.e. the Client App and the EJB, and then
build it all again repackage into a new EAR file and then redeploy. It
seems to me that Eclipse will only build, package and deploy components
that have changed since the last build into a new EAR file and exclude the
other components(in this case the clientpplication) that have not changed
from the new EAR file. Hence the newly packaged EAR will contain only the
EJB. Since OC4J deletes the and recreates the folder containing the
application during redeployment i.e
(OC4J_HOME\applications\<APP_NAME_FOLDER>), it essentially tries to
redeploy part of EAR (i.e EAR containg only components that have changed
since last deployment) and I think this is what causes the failure.

After a few days spent trying to figure out what was wrong, I've finally
found
the culprit and it is to do with the publish process in eclipse (i.e.
clicking on the publish button in eclipse server view). Essesntially, what
happens when when you publish is , Eclipse jars up the updated component
and places it in TEMP_FOLDERi.e.
<ECLIPSE_WORKSPACE>\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\ <ARCHIVE_NAME>.
Then using the build file found @
<ECLIPSE_HOME> \plugins\org.eclipse.jst.server.generic.oc4j_1.5.205.v200805 140145\buildfiles\oracle.10.1.3.xml,
eclipse creates an a archive (EAR) containg only the updated
component(EJB) i.e.(components in the TEMP_FOLDER) and excludes all of the
components that have not been updated (in this case the appclient) and
tries to deploy this new "partial" Archive. The deployment descriptor
(application.xml) of this new "partial" archive will still however, have a
reference to the compnonent which has not changed although that is not
part of this new archive (i.e new Archive contains only the updated
components).


Oc4J then tries to deploy the new archive. However, during deployment,
oc4j undeploys the older application(which contains all components) and
tries to deploy teh new archive(which contains only the updated
components). The redeployment fails because of the references(in
application.xml) to the components that that are not part of the new
archive.

I have updated my version of the build file to correct this which I will
readily supply to anyone who needs it

However, the question is, is this supposed to be the behaivior? Surely, if
you update only certain parts of your application and redeploy the
application, eclipse should create a new archive containg both the updated
and non updated parts and then redeploy the new archive.


Also, am I the only person experiencing this? I seem to have come across a
few posts on the net but no credible soloution (although I have solved
it). I'm wondering if the wtp guys know about this behaviour and whether
it will ever be fixed? or is there a certain specifics steps to set up EAR
projects for deployment to OC4J?

Any answers to these questions will be greatly appreciated
Re: Elipse WTP OC4J Redeployment Problem i.e Unable to find/read file META-INF/appli [message #233890 is a reply to message #233705] Mon, 20 July 2009 12:24 Go to previous messageGo to next message
George Badu is currently offline George Badu
Messages: 13
Registered: July 2009
Junior Member
any ideas anyone?
Re: Elipse WTP OC4J Redeployment Problem i.e Unable to find/read file META-INF/appli [message #528473 is a reply to message #233705] Tue, 20 April 2010 16:15 Go to previous messageGo to next message
Denis  is currently offline Denis
Messages: 1
Registered: April 2010
Junior Member
George, I'm having exactly the same problem. It seems you've resolved the issue by customizing oracle.10.1.3.xml file. Could you send me your copy? Publishing it on forum wouldn't hurt either.
Re: Elipse WTP OC4J Redeployment Problem i.e Unable to find/read file META-INF/appli [message #530252 is a reply to message #233705] Thu, 29 April 2010 06:35 Go to previous message
Erhard Siegl is currently offline Erhard Siegl
Messages: 2
Registered: April 2010
Junior Member
This looks like https://bugs.eclipse.org/bugs/show_bug.cgi?id=289261, but I think it was fixed then. Didn't try it lately though.

Greetings
Erhard
Previous Topic:Re: OutlineView Filter
Next Topic:add WTP support to existing project
Goto Forum:
  


Current Time: Tue Sep 16 07:37:31 GMT 2014

Powered by FUDForum. Page generated in 0.01652 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software