Redeployment of EAR Files into a New WebSphere Repository
 Technote (FAQ)
 
Problem
EAR files will not deploy properly into a new WebSphere Application Server repository if the EAR file has already been expanded.
 
Solution
Background
This problem occurs when an EAR has already been deployed into a repository, then the repository needs to be replaced. Since the EAR file was previously deployed, the directory structure already exists in the installedApps directory.

Steps to Redeploy an EAR file into a Blank Repository
  1. Export the current configuration using XMLConfig:
    • For example:
      XMLConfig.sh -export export.xml -adminNodeName hostname
    • The export.xml file will be created
    • Where hostnameis the name of the node. The Unix hostname command provides this information.
  2. Back up InstalledApps directory WebSphere/AppServer/installedApps.
    For example:
    cd /usr/WebSphere/AppServer/installedApps; tar -cvf /tmp/installedApps.tar .
  3. Export all enterprise applications from the console:
    1. Right click on Enterprise App,
    2. choose "Export",
    3. place exported EAR in /usr/WebSphere/AppServer/installableApps directory.
      This preserves any changes made to the EAR file after it has been deployed.
  4. Stop all WebSphere processes (e.g. kill -9 for all java processes)
  5. Save a copy of the admin database. For example;
    • Oracle: use export.
    • DB2: use db2 backup database
  6. Create a new repository:
    • For Oracle:
      1. drop ejsadmin user (this drops the current repository)
      2. Recreate the esjadmin user with the same rights and privileges
    • For DB2:
      1. db2 drop db repositoryname (this drops the current repository)
      2. db2 create db repositoryname (this creates a new repository)
  7. Modify admin.config to recreate tables:
    com.ibm.ejs.sm.adminServer.createTables=true
  8. Remove existing directories under WebSphere/AppServer/installedApps:
    For example:
    cd /usr/WebSphere/AppServer/installedApps; rm -rf *
  9. Startup WebSphere (e.g. startupServer.sh):
    /usr/WebSphere/AppServer/bin/startupServer.sh&
  10. Ensure database tables are created successfully. The technote, How to tell if WebSphere has started properly, identifies processes that should be running: http://www-1.ibm.com/support/manager.wss?rs=180&rt=1&ndocfound=4&nid=3755&r=10&q=1007096
  11. Restore the configuration using XMLConfig. For example:
    • For example:
      XMLConfig.sh -import export.xml -adminNodeName hostname
  12. Verify Enterprise Applications successfully imported by starting the Admin Console and reviewing the configuration.
 
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Deploy (for example: AAT or ANT or EAR/WAR/JAR)
Operating system(s): HP-UX
Software version: 4.0
Software edition:
Reference #: 1052184
IBM Group: Software Group
Modified date: Feb 28, 2005