|
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
- 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.
- Back up InstalledApps directory WebSphere/AppServer/installedApps.
For example:
cd /usr/WebSphere/AppServer/installedApps; tar -cvf /tmp/installedApps.tar
.
- Export all enterprise applications from the console:
- Right click on Enterprise App,
- choose "Export",
- place exported EAR in /usr/WebSphere/AppServer/installableApps
directory.
This preserves any changes made to the EAR file after it has been
deployed.
- Stop all WebSphere processes (e.g. kill -9 for all java
processes)
- Save a copy of the admin database. For example;
- Oracle: use export.
- DB2: use db2 backup database
- Create a new repository:
- For Oracle:
- drop ejsadmin user (this drops the current repository)
- Recreate the esjadmin user with the same rights and privileges
- For DB2:
- db2 drop db repositoryname (this drops the current
repository)
- db2 create db repositoryname (this creates a new
repository)
- Modify admin.config to recreate tables:
com.ibm.ejs.sm.adminServer.createTables=true
- Remove existing directories under WebSphere/AppServer/installedApps:
For example:
cd /usr/WebSphere/AppServer/installedApps; rm -rf *
- Startup WebSphere (e.g. startupServer.sh):
/usr/WebSphere/AppServer/bin/startupServer.sh&
- 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
- Restore the configuration using XMLConfig. For example:
- For example:
XMLConfig.sh -import export.xml -adminNodeName hostname
- Verify Enterprise Applications successfully imported by starting the
Admin Console and reviewing the configuration.
|
|
|
|
|
|
|