Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (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 #233697] Wed, 15 July 2009 10:28
George Badu is currently offline George BaduFriend
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 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

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

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
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

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
Previous Topic:Strange Launcher Behavior
Next Topic:Properties available in JST server deployment build file
Goto Forum:

Current Time: Tue Jun 19 09:10:55 GMT 2018

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

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

Back to the top