Bug 238836 - Rename of ejb project to remove space does not update application.xml
Rename of ejb project to remove space does not update application.xml
Status: CLOSED WORKSFORME
Product: WTP EJB Tools
Classification: WebTools
Component: jst.ejb
3.0
PC Windows Vista
: P3 normal (vote)
: 3.0.2
Assigned To: Kaloyan Raev CLA Friend
Kaloyan Raev CLA Friend
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2008-06-27 14:49 EDT by Michael OBrien CLA Friend
Modified: 2008-10-06 06:57 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael OBrien CLA Friend 2008-06-27 14:49:45 EDT
Environment:
Eclipse 3.4Ganymede M5 with WTP

Reproduction:
3 projects in the enterprise app [ear, ejb, web].
I was testing deployment with a space in the ejb project - worked fine after a rename in the navigator view updated application.xml with
    <ejb>weblogic_EJB.jar</ejb>

When I renamed the project back, application.xml was not updated to revert back to 
    <ejb>weblogic_EJB.jar</ejb>

causing:
java.io.FileNotFoundException: Unable to find ejb-jar with uri weblogic_EJB.jar in ear at C:\opt\wls103\user_projects\domains\base_domain\servers\AdminServer\stage\_appsdir_weblogicEAR8_ear\weblogicEAR8.ear


final application.xml:
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:application="http://java.sun.com/xml/ns/javaee/application_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd" id="Application_ID" version="5">
  <display-name>EclipseLink Application</display-name>
  <module>
    <web>
      <web-uri>weblogicWeb.war</web-uri>
      <context-root>weblogicWebEL8</context-root>
    </web>
  </module>
  <module>
    <ejb>weblogic_EJB.jar</ejb>
  </module>
  <module>
    <ejb>weblogicEJB.jar</ejb>
  </module>
</application>


Fix: 
rename to the following and fully undeploy the broken ear.
    <ejb>weblogicEJB.jar</ejb>

Normally this would not be an issue but the initial broken deploy causes the ejb instance to register but not associate with the ear.

A second deploy results in the following even after an undeploy.
The fix is to undeploy the original "weblogig_EJB.jar" or use the admin console to remove it.


weblogic.descriptor.BeanAlreadyExistsException: Bean already exists: "weblogic.j2ee.descriptor.ModuleBeanImpl@7ea6c45(/Modules[weblogicEJB.jar])"
Comment 1 Kaloyan Raev CLA Friend 2008-09-09 08:18:28 EDT
I have tried to reproduce this with WTP 3.0.1 JBoss, but it seems it is no more an issue. I was able to rename from "MyEJB" to "My_EJB" forward and back several times. The application.xml of the EAR was updated correctly. 
Comment 2 Kaloyan Raev CLA Friend 2008-10-06 06:57:44 EDT
Closing