Hi, 
This seems to be similar to the bugs, 
https://bugs.eclipse.org/bugs/show_bug.cgi?id=278291 and 
https://bugs.eclipse.org/bugs/show_bug.cgi?id=282228 . Please add your comments 
to the appropriate bug. 
-Raghu 
----- Original Message ----- 
From: "Quophyie" <[email protected]> 
To: "Wtp-Dev" <[email protected]> 
Sent: Tuesday, July 28, 2009 1:31:14 AM GMT -08:00 US/Canada Pacific 
Subject: [wtp-dev] EAR Redeployment To OC4J 



Hi 



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.generic.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.0EAR 
(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.v200805140145\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'm wondering if this is the expected 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 

_______________________________________________
wtp-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/wtp-dev

Reply via email to