IBM Support

WebSphere Application Server Profile creation fails on doImportConfigArchive

Troubleshooting


Problem

Your profile creation fails on the doImportConfigArchive task after a successful installation of WebSphere Application Server, The failure is traced to the WAS_HOME/bin/setupCmdLine.bat script. The failure occurs when the system PATH environment variable is corrupt, because the WAS_PATH variable uses the PATH.

Symptom

Profile creation fails showing the following errors in the profile creation log. For example, this might appear in a file named AppSrv01_create.log:

<record>
    <date>Jul 7, 2009 2:05:47 PM</date>
    <millis>1246989947848</millis>
    <sequence>177946</sequence>
    <logger>com.ibm.ws.install.configmanager.actionengine.ant.utils.ANTLogToCmtLogAdapter</logger>
    <level>INFO</level>
    <class>com.ibm.ws.install.configmanager.actionengine.ant.utils.ANTLogToCmtLogAdapter</class>
    <method>targetStarted</method>
    <thread>1</thread>
    <message>Target started for: doImportConfigArchive</message>
</record>
....
....
<record>
    <date>Jul 7, 2009 2:45:50 PM</date>
    <millis>1246992350108</millis>
    <sequence>178003</sequence>
    <logger>com.ibm.ws.install.configmanager.actionengine.ant.utils.ANTLogToCmtLogAdapter</logger>
    <level>INFO</level>
    <class>com.ibm.ws.install.configmanager.actionengine.ant.utils.ANTLogToCmtLogAdapter</class>
    <method>targetFinished</method>
    <thread>1</thread>
    <message>Target stopped for: doImportConfigArchive - FAILURE</message>
</record>
...
...
<record>
    <date>Jul 7, 2009 2:45:50 PM</date>
    <millis>1246992350108</millis>
    <sequence>178008</sequence>
    <logger>com.ibm.ws.install.configmanager.actionengine.ant.utils.ANTLogToCmtLogAdapter</logger>
    <level>WARNING</level>
    <class>com.ibm.ws.install.configmanager.logging.LogUtils</class>
    <method>logException</method>
    <thread>1</thread>
    <message><WAS_HOME>\profileTemplates\default\actions\importConfigArchive.ant:199: wsadmin task failed with return code :-1
at com.ibm.websphere.ant.tasks.WsAdminInProcess.execute(WsAdminInProcess.java:333)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
--- truncated --
...
Caused by: wsadmin task failed with return code :-1
at com.ibm.ws.ant.utils.ProjectUtils.reportError(ProjectUtils.java:30)
at com.ibm.websphere.ant.tasks.WsAdminInProcess.execute(WsAdminInProcess.java:326)
... 29 more
--- Nested Exception ---
wsadmin task failed with return code :-1
at com.ibm.ws.ant.utils.ProjectUtils.reportError(ProjectUtils.java:30)
at com.ibm.websphere.ant.tasks.WsAdminInProcess.execute(WsAdminInProcess.java:326)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)


The profile directory structures are created, but the profile is unusable.

Cause

This occurs when the system PATH variable is corrupt. The script "setupCmdLine.bat" creates a variable named WAS_PATH, and its value uses the PATH environment variable. If the system's PATH variable is somehow corrupt, then the setupCmdLine script will be unable to properly set the WAS_PATH. As a result, most of the product's scripts will fail, including scripts which are critical to the profile creation process.

The line below shows an example of how the WAS_PATH is constructed in the setupCmdLine script on Windows. This line is split for readability but it is normally one continual line:

SET WAS_PATH=%WAS_HOME%\bin;%JAVA_HOME%\bin;
%JAVA_HOME%\jre\bin;
%PATH%

For Linux/Unix
path="$java_home" /ibm_bin:"$java_home"/bin/:"$java_home"/jre/bin:$path

This command sets the WAS_PATH and appends the users current PATH to the end. If the PATH variable is corrupt, then the command will fail.

Resolving The Problem

First, identify whether the PATH variable corruption is truly the cause of this issue. To do so, run the WAS_HOME/bin/setupCmdLIne.bat command. If the command indicates an error, especially if the error occurs after the output for the "set WAS_PATH" command, then continue to run the tests below.

If the setupCmdLine script succeeds, then the problem described in this technote is not the root cause of the issue.

If setupCmdLine is the source of the issue, then run the following command as an additional test:

SET WAS_PATH=C:\WebSphere\AppServer\bin

(You may substitute a different path for the value of "C:\WebSphere\AppServer".)


If that is successful, then run this command:

SET WAS_PATH=C:\WebSphere\AppServer\bin;%PATH%

If the above command fails, this would indicate that the current PATH value is corrupted. In that case, correct the system PATH variable to a valid value.

Remove the previously failed profile, then try to create the profile again.

[{"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Install","Platform":[{"code":"PF033","label":"Windows"}],"Version":"9.0;8.5.5;8.5;8.0;7.0","Edition":"Base;Express;Network Deployment","Line of Business":{"code":"LOB36","label":"IBM Automation"}},{"Product":{"code":"SS7JFU","label":"WebSphere Application Server - Express"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Install and migration","Platform":[{"code":"PF033","label":"Windows"}],"Version":"7.0;6.1","Edition":"Express","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
15 June 2018

UID

swg21393835